Skip to content

Commit 9152ff4

Browse files
committed
validation: create: don't skip errors on state
If the runtime fails to give us the state, don't just ignore this and skip the test but ensure we print "not ok" in the TAP output. Signed-off-by: Alban Crequy <[email protected]>
1 parent 9185c46 commit 9152ff4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

validation/create.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@ func main() {
7070

7171
if err == nil {
7272
state, err := r.State()
73+
t.Ok(err == nil && state.ID == c.id, "'state' MUST return the state of a container")
7374
if err == nil {
74-
t.Ok(state.ID == c.id, "'state' MUST return the state of a container")
7575
t.YAML(map[string]string{
7676
"container ID": c.id,
7777
"state ID": state.ID,
7878
})
7979
} else {
80-
t.Skip(1, "'state' MUST return the state of a container")
8180
diagnostic = map[string]string{
8281
"error": err.Error(),
8382
}

0 commit comments

Comments
 (0)