mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix TestDaemonRestartWithInvalidBasesize
NotNil is expected behaviour, daemon should not start with invalid base size. Signed-off-by: Fengtu Wang <wangfengtu@huawei.com>
This commit is contained in:
parent
4180211d80
commit
1d74b4f6d4
1 changed files with 6 additions and 1 deletions
|
@ -198,7 +198,12 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithInvalidBasesize(c *check.C) {
|
|||
|
||||
if newBasesizeBytes < oldBasesizeBytes {
|
||||
err := s.d.RestartWithError("--storage-opt", fmt.Sprintf("dm.basesize=%d", newBasesizeBytes))
|
||||
c.Assert(err, check.IsNil, check.Commentf("daemon should not have started as new base device size is less than existing base device size: %v", err))
|
||||
c.Assert(err, check.NotNil, check.Commentf("daemon should not have started as new base device size is less than existing base device size: %v", err))
|
||||
// 'err != nil' is expected behaviour, no new daemon started,
|
||||
// so no need to stop daemon.
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
s.d.Stop(c)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue