Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
170d0802
Commit
170d0802
authored
6 years ago
by
Mahmood Ali
Browse files
Options
Download
Email Patches
Plain Diff
remove dev test
parent
c1d28bcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/shared/executor/executor_test.go
+0
-38
drivers/shared/executor/executor_test.go
with
0 additions
and
38 deletions
+0
-38
drivers/shared/executor/executor_test.go
+
0
-
38
View file @
170d0802
...
...
@@ -22,7 +22,6 @@ import (
"github.com/hashicorp/nomad/nomad/mock"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/plugins/drivers"
dproto
"github.com/hashicorp/nomad/plugins/drivers/proto"
tu
"github.com/hashicorp/nomad/testutil"
ps
"github.com/mitchellh/go-ps"
"github.com/stretchr/testify/assert"
...
...
@@ -604,40 +603,3 @@ func TestExecutor_Start_NonExecutableBinaries(pt *testing.T) {
}
}
func
TestExecutorExec
(
t
*
testing
.
T
)
{
t
.
Parallel
()
exec
:=
NewExecutor
(
testlog
.
HCLogger
(
t
))
ctx
:=
context
.
Background
()
input
:=
make
(
chan
*
drivers
.
ExecTaskStreamingRequestMsg
)
output
:=
make
(
chan
*
drivers
.
ExecTaskStreamingResponseMsg
)
doneCh
:=
make
(
chan
error
,
1
)
go
func
()
{
input
<-
&
drivers
.
ExecTaskStreamingRequestMsg
{
Stdin
:
&
dproto
.
ExecTaskStreamingOperation
{
Data
:
[]
byte
(
"echo hi; exit 0"
),
},
}
}()
go
func
()
{
for
o
:=
range
output
{
t
.
Logf
(
"received output: %v"
,
o
)
}
doneCh
<-
nil
}()
err
:=
exec
.
ExecStreaming
(
ctx
,
[]
string
{
"nomad"
,
"--version"
},
true
,
input
,
output
)
require
.
NoError
(
t
,
err
)
select
{
case
<-
doneCh
:
case
<-
time
.
After
(
5
*
time
.
Second
)
:
require
.
Fail
(
t
,
"timed out"
)
}
t
.
Fatal
(
"fail now"
)
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help