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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user