Skip to content

Commit

Permalink
fixed errors with unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Mar 20, 2024
1 parent 4960dac commit de6321d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion hack/oci-pin/sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func runSum(cmd *cobra.Command, _ []string) error {
log.Debug(fmt.Sprintf(
`Parsed flags:
image-repo-tag: %q
oci-path: %q`
oci-path: %q`,
flags.imageRepoTag, flags.ociPath))

registry, prefix, name, tag, err := splitRepoTag(flags.imageRepoTag)
Expand Down
10 changes: 5 additions & 5 deletions internal/grpc/grpclog/grpclog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func TestLogStateChanges(t *testing.T) {
},
assert: func(t *testing.T, lg *spyLog, isReadyCallbackCalled bool) {
require.Len(t, lg.msgs, 3)
assert.Equal(t, "Connection state started as CONNECTING", lg.msgs[0])
assert.Equal(t, "Connection state changed to CONNECTING", lg.msgs[1])
assert.Equal(t, "Connection state started as \"CONNECTING\"", lg.msgs[0])
assert.Equal(t, "Connection state changed to \"CONNECTING\"", lg.msgs[1])
assert.Equal(t, "Connection ready", lg.msgs[2])
assert.True(t, isReadyCallbackCalled)
},
Expand All @@ -49,7 +49,7 @@ func TestLogStateChanges(t *testing.T) {
},
assert: func(t *testing.T, lg *spyLog, isReadyCallbackCalled bool) {
require.Len(t, lg.msgs, 2)
assert.Equal(t, "Connection state started as READY", lg.msgs[0])
assert.Equal(t, "Connection state started as \"READY\"", lg.msgs[0])
assert.Equal(t, "Connection ready", lg.msgs[1])
assert.True(t, isReadyCallbackCalled)
},
Expand All @@ -64,8 +64,8 @@ func TestLogStateChanges(t *testing.T) {
},
assert: func(t *testing.T, lg *spyLog, isReadyCallbackCalled bool) {
require.Len(t, lg.msgs, 2)
assert.Equal(t, "Connection state started as CONNECTING", lg.msgs[0])
assert.Equal(t, "Connection state ended with CONNECTING", lg.msgs[1])
assert.Equal(t, "Connection state started as \"CONNECTING\"", lg.msgs[0])
assert.Equal(t, "Connection state ended with \"CONNECTING\"", lg.msgs[1])
assert.False(t, isReadyCallbackCalled)
},
},
Expand Down

0 comments on commit de6321d

Please sign in to comment.