From a52455504fb6591c30fdb80cb8496a6aa7e5f3a6 Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Thu, 11 Mar 2021 16:18:15 -0600 Subject: [PATCH] Capitalize "Concierge" in these error messages as well, for consistency. Signed-off-by: Matt Moyer --- cmd/pinniped/cmd/login_oidc.go | 4 ++-- cmd/pinniped/cmd/login_oidc_test.go | 6 +++--- cmd/pinniped/cmd/login_static.go | 4 ++-- cmd/pinniped/cmd/login_static_test.go | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/pinniped/cmd/login_oidc.go b/cmd/pinniped/cmd/login_oidc.go index 3887ccf7..a3125475 100644 --- a/cmd/pinniped/cmd/login_oidc.go +++ b/cmd/pinniped/cmd/login_oidc.go @@ -144,7 +144,7 @@ func runOIDCLogin(cmd *cobra.Command, deps oidcLoginCommandDeps, flags oidcLogin conciergeclient.WithAPIGroupSuffix(flags.conciergeAPIGroupSuffix), ) if err != nil { - return fmt.Errorf("invalid concierge parameters: %w", err) + return fmt.Errorf("invalid Concierge parameters: %w", err) } } @@ -178,7 +178,7 @@ func runOIDCLogin(cmd *cobra.Command, deps oidcLoginCommandDeps, flags oidcLogin cred, err = deps.exchangeToken(ctx, concierge, token.IDToken.Token) if err != nil { - return fmt.Errorf("could not complete concierge credential exchange: %w", err) + return fmt.Errorf("could not complete Concierge credential exchange: %w", err) } } return json.NewEncoder(cmd.OutOrStdout()).Encode(cred) diff --git a/cmd/pinniped/cmd/login_oidc_test.go b/cmd/pinniped/cmd/login_oidc_test.go index 7bba6d9b..976e3adf 100644 --- a/cmd/pinniped/cmd/login_oidc_test.go +++ b/cmd/pinniped/cmd/login_oidc_test.go @@ -92,7 +92,7 @@ func TestLoginOIDCCommand(t *testing.T) { }, wantError: true, wantStderr: here.Doc(` - Error: invalid concierge parameters: endpoint must not be empty + Error: invalid Concierge parameters: endpoint must not be empty `), }, { @@ -131,7 +131,7 @@ func TestLoginOIDCCommand(t *testing.T) { }, wantError: true, wantStderr: here.Doc(` - Error: invalid concierge parameters: invalid API group suffix: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') + Error: invalid Concierge parameters: invalid API group suffix: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') `), }, { @@ -161,7 +161,7 @@ func TestLoginOIDCCommand(t *testing.T) { wantOptionsCount: 3, wantError: true, wantStderr: here.Doc(` - Error: could not complete concierge credential exchange: some concierge error + Error: could not complete Concierge credential exchange: some concierge error `), }, { diff --git a/cmd/pinniped/cmd/login_static.go b/cmd/pinniped/cmd/login_static.go index 4e8bef67..4aa6d5eb 100644 --- a/cmd/pinniped/cmd/login_static.go +++ b/cmd/pinniped/cmd/login_static.go @@ -93,7 +93,7 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams conciergeclient.WithAPIGroupSuffix(flags.conciergeAPIGroupSuffix), ) if err != nil { - return fmt.Errorf("invalid concierge parameters: %w", err) + return fmt.Errorf("invalid Concierge parameters: %w", err) } } @@ -121,7 +121,7 @@ func runStaticLogin(out io.Writer, deps staticLoginDeps, flags staticLoginParams var err error cred, err = deps.exchangeToken(ctx, concierge, token) if err != nil { - return fmt.Errorf("could not complete concierge credential exchange: %w", err) + return fmt.Errorf("could not complete Concierge credential exchange: %w", err) } } return json.NewEncoder(out).Encode(cred) diff --git a/cmd/pinniped/cmd/login_static_test.go b/cmd/pinniped/cmd/login_static_test.go index fc81edc4..1d097123 100644 --- a/cmd/pinniped/cmd/login_static_test.go +++ b/cmd/pinniped/cmd/login_static_test.go @@ -78,7 +78,7 @@ func TestLoginStaticCommand(t *testing.T) { }, wantError: true, wantStderr: here.Doc(` - Error: invalid concierge parameters: endpoint must not be empty + Error: invalid Concierge parameters: endpoint must not be empty `), }, { @@ -126,7 +126,7 @@ func TestLoginStaticCommand(t *testing.T) { conciergeErr: fmt.Errorf("some concierge error"), wantError: true, wantStderr: here.Doc(` - Error: could not complete concierge credential exchange: some concierge error + Error: could not complete Concierge credential exchange: some concierge error `), }, { @@ -141,7 +141,7 @@ func TestLoginStaticCommand(t *testing.T) { }, wantError: true, wantStderr: here.Doc(` - Error: invalid concierge parameters: invalid API group suffix: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') + Error: invalid Concierge parameters: invalid API group suffix: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') `), }, {