@@ -731,64 +731,64 @@ func Test_runVerifyGHAArtifactImage(t *testing.T) {
731
731
// When true, this does not iterate over all builder versions.
732
732
noversion bool
733
733
}{
734
- // {
735
- // name: "valid main branch default",
736
- // artifact: "container_workflow_dispatch",
737
- // source: "github.com/slsa-framework/example-package",
738
- // },
739
- // {
740
- // name: "valid main branch default - invalid builderID",
741
- // artifact: "container_workflow_dispatch",
742
- // source: "github.com/slsa-framework/example-package",
743
- // pBuilderID: pString("https://github.com/slsa-framework/slsa-github-generator/.github/workflows/not-trusted.yml"),
744
- // err: serrors.ErrorUntrustedReusableWorkflow,
745
- // },
746
- // {
747
- // name: "valid main branch set",
748
- // artifact: "container_workflow_dispatch",
749
- // source: "github.com/slsa-framework/example-package",
750
- // pbranch: pString("main"),
751
- // },
734
+ {
735
+ name : "valid main branch default" ,
736
+ artifact : "container_workflow_dispatch" ,
737
+ source : "github.com/slsa-framework/example-package" ,
738
+ },
739
+ {
740
+ name : "valid main branch default - invalid builderID" ,
741
+ artifact : "container_workflow_dispatch" ,
742
+ source : "github.com/slsa-framework/example-package" ,
743
+ pBuilderID : pString ("https://github.com/slsa-framework/slsa-github-generator/.github/workflows/not-trusted.yml" ),
744
+ err : serrors .ErrorUntrustedReusableWorkflow ,
745
+ },
746
+ {
747
+ name : "valid main branch set" ,
748
+ artifact : "container_workflow_dispatch" ,
749
+ source : "github.com/slsa-framework/example-package" ,
750
+ pbranch : pString ("main" ),
751
+ },
752
752
753
- // {
754
- // name: "wrong branch master",
755
- // artifact: "container_workflow_dispatch",
756
- // source: "github.com/slsa-framework/example-package",
757
- // pbranch: pString("master"),
758
- // err: serrors.ErrorMismatchBranch,
759
- // },
760
- // {
761
- // name: "wrong source append A",
762
- // artifact: "container_workflow_dispatch",
763
- // source: "github.com/slsa-framework/example-packageA",
764
- // err: serrors.ErrorMismatchSource,
765
- // },
766
- // {
767
- // name: "wrong source prepend A",
768
- // artifact: "container_workflow_dispatch",
769
- // source: "Agithub.com/slsa-framework/example-package",
770
- // err: serrors.ErrorMismatchSource,
771
- // },
772
- // {
773
- // name: "wrong source middle A",
774
- // artifact: "container_workflow_dispatch",
775
- // source: "github.com/Aslsa-framework/example-package",
776
- // err: serrors.ErrorMismatchSource,
777
- // },
778
- // {
779
- // name: "tag no match empty tag workflow_dispatch",
780
- // artifact: "container_workflow_dispatch",
781
- // source: "github.com/slsa-framework/example-package",
782
- // ptag: pString("v1.2.3"),
783
- // err: serrors.ErrorMismatchTag,
784
- // },
785
- // {
786
- // name: "versioned tag no match empty tag workflow_dispatch",
787
- // artifact: "container_workflow_dispatch",
788
- // source: "github.com/slsa-framework/example-package",
789
- // pversiontag: pString("v1"),
790
- // err: serrors.ErrorInvalidSemver,
791
- // },
753
+ {
754
+ name : "wrong branch master" ,
755
+ artifact : "container_workflow_dispatch" ,
756
+ source : "github.com/slsa-framework/example-package" ,
757
+ pbranch : pString ("master" ),
758
+ err : serrors .ErrorMismatchBranch ,
759
+ },
760
+ {
761
+ name : "wrong source append A" ,
762
+ artifact : "container_workflow_dispatch" ,
763
+ source : "github.com/slsa-framework/example-packageA" ,
764
+ err : serrors .ErrorMismatchSource ,
765
+ },
766
+ {
767
+ name : "wrong source prepend A" ,
768
+ artifact : "container_workflow_dispatch" ,
769
+ source : "Agithub.com/slsa-framework/example-package" ,
770
+ err : serrors .ErrorMismatchSource ,
771
+ },
772
+ {
773
+ name : "wrong source middle A" ,
774
+ artifact : "container_workflow_dispatch" ,
775
+ source : "github.com/Aslsa-framework/example-package" ,
776
+ err : serrors .ErrorMismatchSource ,
777
+ },
778
+ {
779
+ name : "tag no match empty tag workflow_dispatch" ,
780
+ artifact : "container_workflow_dispatch" ,
781
+ source : "github.com/slsa-framework/example-package" ,
782
+ ptag : pString ("v1.2.3" ),
783
+ err : serrors .ErrorMismatchTag ,
784
+ },
785
+ {
786
+ name : "versioned tag no match empty tag workflow_dispatch" ,
787
+ artifact : "container_workflow_dispatch" ,
788
+ source : "github.com/slsa-framework/example-package" ,
789
+ pversiontag : pString ("v1" ),
790
+ err : serrors .ErrorInvalidSemver ,
791
+ },
792
792
}
793
793
for _ , tt := range tests {
794
794
tt := tt // Re-initializing variable so it is not changed while executing the closure below
@@ -810,7 +810,7 @@ func Test_runVerifyGHAArtifactImage(t *testing.T) {
810
810
// 3. With only the name of the builder.
811
811
// 4. With no builder ID.
812
812
builderIDs := []* string {
813
- pString (builder + "@" + sv ),
813
+ // pString(builder + "@" + sv),
814
814
pString (builder + "@refs/tags/" + sv ),
815
815
pString (builder ),
816
816
nil ,
0 commit comments