Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
431d7af2
Unverified
Commit
431d7af2
authored
6 years ago
by
Nick Ethier
Browse files
Options
Download
Email Patches
Plain Diff
fix test
parent
145827d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
command/job_status_test.go
+18
-0
command/job_status_test.go
with
18 additions
and
0 deletions
+18
-0
command/job_status_test.go
+
18
-
0
View file @
431d7af2
...
...
@@ -262,6 +262,24 @@ func TestJobStatusCommand_WithAccessPolicy(t *testing.T) {
token
:=
srv
.
RootToken
assert
.
NotNil
(
token
,
"failed to bootstrap ACL token"
)
// Wait for client ready
client
.
SetSecretID
(
token
.
SecretID
)
testutil
.
WaitForResult
(
func
()
(
bool
,
error
)
{
nodes
,
_
,
err
:=
client
.
Nodes
()
.
List
(
nil
)
if
err
!=
nil
{
return
false
,
err
}
if
len
(
nodes
)
==
0
{
return
false
,
fmt
.
Errorf
(
"missing node"
)
}
if
_
,
ok
:=
nodes
[
0
]
.
Drivers
[
"mock_driver"
];
!
ok
{
return
false
,
fmt
.
Errorf
(
"mock_driver not ready"
)
}
return
true
,
nil
},
func
(
err
error
)
{
t
.
Fatalf
(
"err: %s"
,
err
)
})
// Register a job
j
:=
testJob
(
"job1_sfx"
)
...
...
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