Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sj26 committed Jan 17, 2023
1 parent 8289002 commit e07f7de
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/server/grpc_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,13 +767,13 @@ func TestAPIWithBuildkite(t *testing.T) {
if len(leafCert.URIs) != 1 {
t.Fatalf("unexpected length of leaf certificate URIs, expected 1, got %d", len(leafCert.URIs))
}
buildkiteUrl := fmt.Sprintf("https://buildkite.com/%s/%s", claims.OrganizationSlug, claims.PipelineSlug)
buildkiteUri, err := url.Parse(buildkiteUrl)
buildkiteURL := fmt.Sprintf("https://buildkite.com/%s/%s", claims.OrganizationSlug, claims.PipelineSlug)
buildkiteURI, err := url.Parse(buildkiteURL)
if err != nil {
t.Fatalf("failed to parse subject URI")
}
if *leafCert.URIs[0] != *buildkiteUri {
t.Fatalf("URIs do not match: Expected %v, got %v", buildkiteUri, leafCert.URIs[0])
if *leafCert.URIs[0] != *buildkiteURI {
t.Fatalf("URIs do not match: Expected %v, got %v", buildkiteURI, leafCert.URIs[0])
}
}

Expand Down Expand Up @@ -865,13 +865,13 @@ func TestAPIWithGitHub(t *testing.T) {
if len(leafCert.URIs) != 1 {
t.Fatalf("unexpected length of leaf certificate URIs, expected 1, got %d", len(leafCert.URIs))
}
githubUrl := fmt.Sprintf("https://github.com/%s", claims.JobWorkflowRef)
githubUri, err := url.Parse(githubUrl)
githubURL := fmt.Sprintf("https://github.com/%s", claims.JobWorkflowRef)
githubURI, err := url.Parse(githubURL)
if err != nil {
t.Fatalf("failed to parse expected url")
}
if *leafCert.URIs[0] != *githubUri {
t.Fatalf("URIs do not match: Expected %v, got %v", githubUri, leafCert.URIs[0])
if *leafCert.URIs[0] != *githubURI {
t.Fatalf("URIs do not match: Expected %v, got %v", githubURI, leafCert.URIs[0])
}
// Verify custom OID values
triggerExt, found := findCustomExtension(leafCert, asn1.ObjectIdentifier{1, 3, 6, 1, 4, 1, 57264, 1, 2})
Expand Down

0 comments on commit e07f7de

Please sign in to comment.