mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration-cli: TestBuildAddBadLinks, TestBuildAddBadLinksVolume: simplify check
This fixes the following lint warning: > integration-cli/docker_cli_build_test.go:1001:59: nilness: tautological condition: non-nil != nil (govet) > if _, err := os.Stat(nonExistingFile); err == nil || err != nil && !os.IsNotExist(err) { > ^ Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
cbc3cfe101
commit
6aadd436a9
1 changed files with 2 additions and 2 deletions
|
@ -998,7 +998,7 @@ func (s *DockerSuite) TestBuildAddBadLinks(c *testing.T) {
|
|||
}
|
||||
|
||||
buildImageSuccessfully(c, name, build.WithExternalBuildContext(ctx))
|
||||
if _, err := os.Stat(nonExistingFile); err == nil || err != nil && !os.IsNotExist(err) {
|
||||
if _, err := os.Stat(nonExistingFile); err == nil || !os.IsNotExist(err) {
|
||||
c.Fatalf("%s shouldn't have been written and it shouldn't exist", nonExistingFile)
|
||||
}
|
||||
|
||||
|
@ -1039,7 +1039,7 @@ func (s *DockerSuite) TestBuildAddBadLinksVolume(c *testing.T) {
|
|||
}
|
||||
|
||||
buildImageSuccessfully(c, "test-link-absolute-volume", build.WithExternalBuildContext(ctx))
|
||||
if _, err := os.Stat(nonExistingFile); err == nil || err != nil && !os.IsNotExist(err) {
|
||||
if _, err := os.Stat(nonExistingFile); err == nil || !os.IsNotExist(err) {
|
||||
c.Fatalf("%s shouldn't have been written and it shouldn't exist", nonExistingFile)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue