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
f7ee9452
Commit
f7ee9452
authored
6 years ago
by
Mahmood Ali
Browse files
Options
Download
Email Patches
Plain Diff
test exec
parent
6169b021
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/exec/driver_unix_test.go
+30
-0
drivers/exec/driver_unix_test.go
with
30 additions
and
0 deletions
+30
-0
drivers/exec/driver_unix_test.go
+
30
-
0
View file @
f7ee9452
...
...
@@ -77,3 +77,33 @@ func TestExecDriver_StartWaitStop(t *testing.T) {
require
.
NoError
(
harness
.
DestroyTask
(
task
.
ID
,
true
))
}
func
TestExec_ExecTaskStreaming
(
t
*
testing
.
T
)
{
t
.
Parallel
()
require
:=
require
.
New
(
t
)
d
:=
NewExecDriver
(
testlog
.
HCLogger
(
t
))
harness
:=
dtestutil
.
NewDriverHarness
(
t
,
d
)
defer
harness
.
Kill
()
task
:=
&
drivers
.
TaskConfig
{
ID
:
uuid
.
Generate
(),
Name
:
"sleep"
,
}
cleanup
:=
harness
.
MkAllocDir
(
task
,
false
)
defer
cleanup
()
tc
:=
&
TaskConfig
{
Command
:
"/bin/sleep"
,
Args
:
[]
string
{
"9000"
},
}
require
.
NoError
(
task
.
EncodeConcreteDriverConfig
(
&
tc
))
_
,
_
,
err
:=
harness
.
StartTask
(
task
)
require
.
NoError
(
err
)
defer
d
.
DestroyTask
(
task
.
ID
,
true
)
dtestutil
.
ExecTaskStreamingConformanceTests
(
t
,
harness
,
task
.
ID
)
}
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