@@ -283,6 +283,7 @@ func testGitBuildcontextHelper(t *testing.T, url string, commit string, branch s
283283 "-f" , dockerfile ,
284284 DockerGitRepo (url , commit , branch ),
285285 }... )
286+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
286287 out , err := RunCommandWithoutTest (dockerCmd )
287288 if err != nil {
288289 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -356,6 +357,7 @@ func TestGitBuildcontextSubPath(t *testing.T) {
356357 "-f" , filepath .Join (integrationPath , dockerfilesPath , dockerfile ),
357358 DockerGitRepo (url , "" , branch ),
358359 }... )
360+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
359361 out , err := RunCommandWithoutTest (dockerCmd )
360362 if err != nil {
361363 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -402,6 +404,7 @@ func TestBuildViaRegistryMirrors(t *testing.T) {
402404 "-f" , dockerfile ,
403405 DockerGitRepo (url , "" , branch ),
404406 }... )
407+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
405408 out , err := RunCommandWithoutTest (dockerCmd )
406409 if err != nil {
407410 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -446,6 +449,7 @@ func TestBuildViaRegistryMap(t *testing.T) {
446449 "-f" , dockerfile ,
447450 DockerGitRepo (url , "" , branch ),
448451 }... )
452+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
449453 out , err := RunCommandWithoutTest (dockerCmd )
450454 if err != nil {
451455 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -515,6 +519,7 @@ func TestKanikoDir(t *testing.T) {
515519 "-f" , dockerfile ,
516520 DockerGitRepo (url , "" , branch ),
517521 }... )
522+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
518523 out , err := RunCommandWithoutTest (dockerCmd )
519524 if err != nil {
520525 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -561,6 +566,7 @@ func TestBuildWithLabels(t *testing.T) {
561566 "--label" , testLabel ,
562567 DockerGitRepo (url , "" , branch ),
563568 }... )
569+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
564570 out , err := RunCommandWithoutTest (dockerCmd )
565571 if err != nil {
566572 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
@@ -605,6 +611,7 @@ func TestBuildWithHTTPError(t *testing.T) {
605611 "-f" , dockerfile ,
606612 DockerGitRepo (url , "" , branch ),
607613 }... )
614+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
608615 out , err := RunCommandWithoutTest (dockerCmd )
609616 if err == nil {
610617 t .Errorf ("an error was expected, got %s" , string (out ))
@@ -963,6 +970,7 @@ func TestBuildWithAnnotations(t *testing.T) {
963970 "-f" , dockerfile ,
964971 DockerGitRepo (url , "" , branch ),
965972 )
973+ dockerCmd .Env = []string {"BUILDX_NO_DEFAULT_ATTESTATIONS=1" }
966974 out , err := RunCommandWithoutTest (dockerCmd )
967975 if err != nil {
968976 t .Errorf ("Failed to build image %s with docker command %q: %s %s" , dockerImage , dockerCmd .Args , err , string (out ))
0 commit comments