Skip to content

Commit

Permalink
test: api_add_restart_policy_test: add new checkpoints
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jia <[email protected]>
  • Loading branch information
chuanchang authored and fuweid committed Oct 19, 2018
1 parent 4ff1fb2 commit e110aa9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions apis/opts/restart_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ func TestParseRestartPolicy(t *testing.T) {
expectedCount: 0,
err: fmt.Errorf("invalid restart policy: %s", "on-failure:1:2"),
},
{
input: "",
expectedName: "no",
expectedCount: 0,
},
{
input: "on-failure:foo",
expectedName: "on-failure",
expectedCount: 0,
err: fmt.Errorf("invalid restart policy: strconv.Atoi: parsing \"foo\": invalid syntax"),
},
{
input: "default",
expectedName: "nil",
expectedCount: 0,
err: fmt.Errorf("invalid restart policy: default"),
},
}

for _, cs := range cases {
Expand Down

0 comments on commit e110aa9

Please sign in to comment.