Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper committed May 22, 2024
1 parent e974df9 commit 34d115f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions database/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,8 @@ func testJWKs(t *testing.T, db Interface, resources *Resources) {
t.Errorf("unable to list jwks: %v", err)
}

if diff := cmp.Diff(resources.JWKs, list); diff != "" {
t.Errorf("ListJWKs() mismatch (-want +got):\n%s", diff)
if !reflect.DeepEqual(resources.JWKs, list) {
t.Errorf("ListJWKs() mismatch, want %v, got %v", resources.JWKs, list)
}

methods["ListJWKs"] = true
Expand All @@ -910,7 +910,7 @@ func testJWKs(t *testing.T, db Interface, resources *Resources) {
t.Errorf("unable to get jwk %s: %v", jkPub.KeyID(), err)
}

if !cmp.Equal(jkPub, got, testutils.JwkOpts) {
if !cmp.Equal(jkPub, got, testutils.JwkKeyOpts) {
t.Errorf("GetJWK() is %v, want %v", got, jkPub)
}
}
Expand Down
2 changes: 1 addition & 1 deletion database/jwk/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestJWK_Engine_GetJWK(t *testing.T) {
t.Errorf("GetActiveJWK for %s returned err: %v", test.name, err)
}

if diff := cmp.Diff(test.want, got, testutils.JwkOpts); diff != "" {
if diff := cmp.Diff(test.want, got, testutils.JwkKeyOpts); diff != "" {
t.Errorf("GetActiveJWK mismatch (-want +got):\n%s", diff)
}
})
Expand Down
2 changes: 1 addition & 1 deletion database/testutils/mock_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (t NowTimestamp) Match(v driver.Value) bool {
return now-ts < 10
}

var JwkOpts = cmp.Options{
var JwkKeyOpts = cmp.Options{
cmp.FilterValues(func(x, y interface{}) bool {
_, xOk := x.(jwk.RSAPublicKey)
_, yOk := y.(jwk.RSAPublicKey)
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ require (
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/stretchr/testify v1.9.0 // indirect
)

require (
Expand Down

0 comments on commit 34d115f

Please sign in to comment.