Skip to content

Commit

Permalink
Merge pull request #1856 from JohnStrunk/fix-zap-test
Browse files Browse the repository at this point in the history
🐛 zap-time-encoding test should allow negative tz offset
  • Loading branch information
k8s-ci-robot committed Apr 7, 2022
2 parents 8996162 + 3847eeb commit 188b486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/log/zap/zap_test.go
Expand Up @@ -528,7 +528,7 @@ var _ = Describe("Zap log level flag options setup", func() {

It("Should propagate time encoder to logger", func() {
// zaps ISO8601TimeEncoder uses 2006-01-02T15:04:05.000Z0700 as pattern for iso8601 encoding
iso8601Pattern := `^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}(\+[0-9]{4}|Z)`
iso8601Pattern := `^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}([-+][0-9]{4}|Z)`

args := []string{"--zap-time-encoding=iso8601"}
fromFlags.BindFlags(&fs)
Expand Down

0 comments on commit 188b486

Please sign in to comment.