mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration-cli: move Close() after error check
Signed-off-by: Elena Morozova <lelenanam@gmail.com>
This commit is contained in:
parent
245bd4c3d2
commit
2b9786a9b3
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue