Skip to content

Commit

Permalink
more format replacements
Browse files Browse the repository at this point in the history
Signed-off-by: Ramon Petgrave <[email protected]>
  • Loading branch information
ramonpetgrave64 committed Oct 7, 2024
1 parent b7eef8c commit 9f72986
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion verifiers/internal/gcb/provenance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func Test_VerifyBuilder(t *testing.T) {
}

if err := outBuilderID.MatchesLoose(tt.builderID, false); err != nil {
t.Errorf(fmt.Sprintf("matches failed: %v", err))
t.Errorf("matches failed: %v", err)
}
})
}
Expand Down
26 changes: 13 additions & 13 deletions verifiers/internal/gha/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func Test_isTrustedDelegatorBuilder(t *testing.T) {

trustedBuilderID, err := utils.TrustedBuilderIDNew(tt.certBuilderID, true)
if err != nil {
t.Fatalf(err.Error())
t.Fatal(err.Error())
}

res := isTrustedDelegatorBuilder(trustedBuilderID, tt.trustedBuilderIDs)
Expand Down Expand Up @@ -829,64 +829,64 @@ func Test_GetWorkflowInfoFromCertificate(t *testing.T) {
trigger := "workflow_dispatch"
encodedTrigger, err := asn1.MarshalWithParams(trigger, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
repo := "org/repo"
encodedRepoURI, err := asn1.MarshalWithParams(httpsGithubCom+repo, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
issuer := "the-issuer"
encodedIssuer, err := asn1.MarshalWithParams(issuer, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
digest := "abcdef"
encodedDigest, err := asn1.MarshalWithParams(digest, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
encodedHosted, err := asn1.MarshalWithParams("github-hosted", "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
hosted := HostedGitHub
ref := "refs/tags/v1.2.3"
encodedRef, err := asn1.MarshalWithParams(ref, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
sourceID := "12345"
encodedSourceID, err := asn1.MarshalWithParams(sourceID, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
sourceOwnerID := "12345"
encodedSourceOwnerID, err := asn1.MarshalWithParams(sourceOwnerID, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

buildConfigSha1 := "abcdef"
encodedBuildConfigSha1, err := asn1.MarshalWithParams(buildConfigSha1, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
buildConfigPath := "path/to/workflow"
encodedBuildConfigURI, err := asn1.MarshalWithParams(httpsGithubCom+repo+"/"+buildConfigPath+"@"+ref, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

invocationID := "9207262"
encodedInvocationURI, err := asn1.MarshalWithParams(httpsGithubCom+repo+"/actions/runs/"+invocationID, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}
subjectSha1 := "subjectSha1"
encodedSubjectSha1, err := asn1.MarshalWithParams(subjectSha1, "utf8")
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

tests := []struct {
Expand Down

0 comments on commit 9f72986

Please sign in to comment.