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) {
>	                                                         ^
@@ -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)
}
