Merge pull request #27368 from morelena/move_close

integration-cli: move Close() after error check
This commit is contained in:
Tõnis Tiigi 2016-10-14 18:25:36 -07:00 committed by GitHub
commit 1221294386

View file

@ -929,10 +929,10 @@ func (s *DockerSuite) TestRunSeccompProfileDenyUnshare(c *check.C) {
]
}`
tmpFile, err := ioutil.TempFile("", "profile.json")
defer tmpFile.Close()
if err != nil {
c.Fatal(err)
}
defer tmpFile.Close()
if _, err := tmpFile.Write([]byte(jsonData)); err != nil {
c.Fatal(err)
@ -1000,10 +1000,10 @@ func (s *DockerSuite) TestRunSeccompProfileDenyUnshareUserns(c *check.C) {
]
}`, uint64(0x10000000))
tmpFile, err := ioutil.TempFile("", "profile.json")
defer tmpFile.Close()
if err != nil {
c.Fatal(err)
}
defer tmpFile.Close()
if _, err := tmpFile.Write([]byte(jsonData)); err != nil {
c.Fatal(err)