mirror of https://github.com/docker/docs.git
integration-cli: check nil before Close'ing
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
a79f96828f
commit
11a95b9514
|
@ -57,10 +57,10 @@ func (s *DockerRegistrySuite) TearDownTest(c *check.C) {
|
||||||
if s.reg != nil {
|
if s.reg != nil {
|
||||||
s.reg.Close()
|
s.reg.Close()
|
||||||
}
|
}
|
||||||
if s.ds != nil {
|
if s.d != nil {
|
||||||
s.ds.TearDownTest(c)
|
s.d.Stop()
|
||||||
}
|
}
|
||||||
s.d.Stop()
|
s.ds.TearDownTest(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -85,10 +85,10 @@ func (s *DockerSchema1RegistrySuite) TearDownTest(c *check.C) {
|
||||||
if s.reg != nil {
|
if s.reg != nil {
|
||||||
s.reg.Close()
|
s.reg.Close()
|
||||||
}
|
}
|
||||||
if s.ds != nil {
|
if s.d != nil {
|
||||||
s.ds.TearDownTest(c)
|
s.d.Stop()
|
||||||
}
|
}
|
||||||
s.d.Stop()
|
s.ds.TearDownTest(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -109,7 +109,9 @@ func (s *DockerDaemonSuite) SetUpTest(c *check.C) {
|
||||||
|
|
||||||
func (s *DockerDaemonSuite) TearDownTest(c *check.C) {
|
func (s *DockerDaemonSuite) TearDownTest(c *check.C) {
|
||||||
testRequires(c, DaemonIsLinux)
|
testRequires(c, DaemonIsLinux)
|
||||||
s.d.Stop()
|
if s.d != nil {
|
||||||
|
s.d.Stop()
|
||||||
|
}
|
||||||
s.ds.TearDownTest(c)
|
s.ds.TearDownTest(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +133,11 @@ func (s *DockerTrustSuite) SetUpTest(c *check.C) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *DockerTrustSuite) TearDownTest(c *check.C) {
|
func (s *DockerTrustSuite) TearDownTest(c *check.C) {
|
||||||
s.reg.Close()
|
if s.reg != nil {
|
||||||
s.not.Close()
|
s.reg.Close()
|
||||||
|
}
|
||||||
|
if s.not != nil {
|
||||||
|
s.not.Close()
|
||||||
|
}
|
||||||
s.ds.TearDownTest(c)
|
s.ds.TearDownTest(c)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue