Merge pull request #32197 from FengtuWang/fix_TestDaemonRestartWithInvalidBasesize

fix TestDaemonRestartWithInvalidBasesize
This commit is contained in:
Lei Jitang 2017-03-30 10:15:48 +08:00 коммит произвёл GitHub
Родитель f16d1a47cc 1d74b4f6d4
Коммит f459e3af9e
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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)
}