1
0
mirror of https://github.com/moby/moby.git synced 2025-10-24 09:13:09 +03:00

Check for valid daemon in TearDownTest.

SetupTest could fail creating a Daemon object (eg, out of space when
creating daemon root dir). In such a case, TearDownTest fails when
accessing the daemon object. This commit adds the required nil check.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
This commit is contained in:
Anusha Ragunathan
2016-11-21 09:37:13 -08:00
parent ca4d907851
commit 5890091cc0
6 changed files with 30 additions and 18 deletions

View File

@@ -51,8 +51,10 @@ func (s *DockerNetworkSuite) SetUpTest(c *check.C) {
}
func (s *DockerNetworkSuite) TearDownTest(c *check.C) {
s.d.Stop()
s.ds.TearDownTest(c)
if s.d != nil {
s.d.Stop()
s.ds.TearDownTest(c)
}
}
func (s *DockerNetworkSuite) SetUpSuite(c *check.C) {