Skip to content

Commit

Permalink
Fix message prefix on common messages
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
  • Loading branch information
peterbroadhurst committed May 4, 2022
1 parent aceb848 commit c8ae191
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/httpserver/httpserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestMissingCAFile(t *testing.T) {
InitCORSConfig(cc)
cp.Set(HTTPConfTLSCAFile, "badness")
_, err := NewHTTPServer(context.Background(), "ut", mux.NewRouter(), make(chan error), cp, cc)
assert.Regexp(t, "FF10153", err)
assert.Regexp(t, "FF00153", err)
}

func TestBadCAFile(t *testing.T) {
Expand All @@ -127,7 +127,7 @@ func TestBadCAFile(t *testing.T) {
InitCORSConfig(cc)
cp.Set(HTTPConfTLSCAFile, configDir+"/firefly.common.yaml")
_, err := NewHTTPServer(context.Background(), "ut", mux.NewRouter(), make(chan error), cp, cc)
assert.Regexp(t, "FF10152", err)
assert.Regexp(t, "FF00152", err)
}

func TestTLSServerSelfSignedWithClientAuth(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions pkg/i18n/en_base_error_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ var (
MsgWSConnectFailed = FFE("FF00148", "Websocket connect failed")
MsgInvalidURL = FFE("FF00149", "Invalid URL: '%s'")
MsgWSHeartbeatTimeout = FFE("FF00150", "Websocket heartbeat timed out after %.2fms", 500)
MsgAPIServerStartFailed = FFE("FF10151", "Unable to start listener on %s: %s")
MsgInvalidCAFile = FFE("FF10152", "Invalid CA certificates file")
MsgTLSConfigFailed = FFE("FF10153", "Failed to initialize TLS configuration")
MsgContextCanceled = FFE("FF10154", "Context canceled")
MsgAPIServerStartFailed = FFE("FF00151", "Unable to start listener on %s: %s")
MsgInvalidCAFile = FFE("FF00152", "Invalid CA certificates file")
MsgTLSConfigFailed = FFE("FF00153", "Failed to initialize TLS configuration")
MsgContextCanceled = FFE("FF00154", "Context canceled")
)
4 changes: 2 additions & 2 deletions pkg/retry/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestRetryDeadlineTimeout(t *testing.T) {
err := r.DoCustomLog(ctx, func(i int) (retry bool, err error) {
return true, fmt.Errorf("pop")
})
assert.Regexp(t, "FF10154", err)
assert.Regexp(t, "FF00154", err)
}

func TestRetryContextCanceled(t *testing.T) {
Expand All @@ -63,5 +63,5 @@ func TestRetryContextCanceled(t *testing.T) {
err := r.Do(ctx, "unit test", func(i int) (retry bool, err error) {
return true, fmt.Errorf("pop")
})
assert.Regexp(t, "FF10154", err)
assert.Regexp(t, "FF00154", err)
}

0 comments on commit c8ae191

Please sign in to comment.