Skip to content

Commit

Permalink
Update logr to v1.4.1 (#414)
Browse files Browse the repository at this point in the history
This wasn't able to get done automatically by dependabot because rpcauth_test.go was looking for a snippet of json and go-logr/logr@44c6ac8 changed `:` to `=` in some places. Switchingour test logger to strict json mode makes the existing test pass with both old and new logr versions.
  • Loading branch information
stvnrhodes authored Mar 29, 2024
1 parent 2950c48 commit b11f15b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions auth/opa/rpcauth/rpcauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ type IntExtension struct {
func TestAuthzHook(t *testing.T) {
ctx := context.Background()
var logs string
fn := func(p, a string) {
logs = a
}
logger := funcr.New(fn, funcr.Options{Verbosity: 2})
logger := funcr.NewJSON(func(obj string) { logs = obj }, funcr.Options{Verbosity: 2})
ctx = logr.NewContext(ctx, logger)
// This way the tests exercise the logging code.
policy, err := opa.NewAuthzPolicy(ctx, policyString)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/coreos/go-systemd/v22 v22.5.0
github.com/euank/go-kmsg-parser/v2 v2.1.0
github.com/go-logr/logr v1.3.0
github.com/go-logr/logr v1.4.1
github.com/go-logr/stdr v1.2.2
github.com/google/go-cmp v0.6.0
github.com/google/subcommands v1.2.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b11f15b

Please sign in to comment.