Skip to content

Commit

Permalink
SCALRCORE-27243 add dots to the error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mermoldy committed Aug 30, 2023
1 parent e5ee335 commit ac0fa2f
Show file tree
Hide file tree
Showing 24 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion access_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func TestAccessPoliciesDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("IamAccessPolicy with ID '%v' not found or user unauthorized", apTest.ID),
Message: fmt.Sprintf("IamAccessPolicy with ID '%v' not found or user unauthorized.", apTest.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion access_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestAccessTokenUpdate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AccessToken with ID '%s' not found or user unauthorized", "at-123"),
Message: fmt.Sprintf("AccessToken with ID '%s' not found or user unauthorized.", "at-123"),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestAccountRead(t *testing.T) {
_, err := client.Accounts.Read(ctx, accId)
assert.Equal(
t,
fmt.Sprintf("Clients with ID '%s' not found or user unauthorized", accId),
fmt.Sprintf("Clients with ID '%s' not found or user unauthorized.", accId),
err.Error(),
)
})
Expand Down
10 changes: 5 additions & 5 deletions agent_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func TestAgentPoolsCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized", accountId),
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized.", accountId),
}.Error(),
err.Error(),
)
Expand All @@ -233,7 +233,7 @@ func TestAgentPoolsCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nEnvironment with ID '%s' not found or user unauthorized", envID),
Message: fmt.Sprintf("Invalid Relationship\n\nEnvironment with ID '%s' not found or user unauthorized.", envID),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -274,7 +274,7 @@ func TestAgentPoolsCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nRelationship 'workspaces' with ID '%s' not found or user unauthorized", wsID),
Message: fmt.Sprintf("Invalid Relationship\n\nRelationship 'workspaces' with ID '%s' not found or user unauthorized.", wsID),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -305,7 +305,7 @@ func TestAgentPoolsRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized", apID),
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized.", apID),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -392,7 +392,7 @@ func TestAgentPoolsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized", pool.ID),
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized.", pool.ID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions agent_pool_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestAgentPoolTokenList(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized", "ap-123"),
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized.", "ap-123"),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -89,7 +89,7 @@ func TestAgentPoolTokenCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized", apID),
Message: fmt.Sprintf("AgentPool with ID '%s' not found or user unauthorized.", apID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion configuration_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestConfigurationVersionsRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ConfigurationVersion with ID '%s' not found or user unauthorized", cvName),
Message: fmt.Sprintf("ConfigurationVersion with ID '%s' not found or user unauthorized.", cvName),
}.Error(),
err.Error(),
)
Expand Down
6 changes: 3 additions & 3 deletions environment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func TestEnvironmentsRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized", envId),
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized.", envId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -261,7 +261,7 @@ func TestEnvironmentsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized", envTest.ID),
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized.", envTest.ID),
}.Error(),
err.Error(),
)
Expand All @@ -273,7 +273,7 @@ func TestEnvironmentsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized", envId),
Message: fmt.Sprintf("Environment with ID '%s' not found or user unauthorized.", envId),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestModulesCreate(t *testing.T) {
})
assert.Nil(t, w)
assert.EqualError(t, err, ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nVcsProvider with ID '%s' not found or user unauthorized", badIdentifier),
Message: fmt.Sprintf("Invalid Relationship\n\nVcsProvider with ID '%s' not found or user unauthorized.", badIdentifier),
}.Error())
})

Expand Down
6 changes: 3 additions & 3 deletions policy_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestPolicyGroupsCreate(t *testing.T) {
t,
err,
ResourceNotFoundError{
Message: fmt.Sprintf("Clients with ID '%s' not found or user unauthorized", accID),
Message: fmt.Sprintf("Clients with ID '%s' not found or user unauthorized.", accID),
}.Error(),
)
})
Expand All @@ -165,7 +165,7 @@ func TestPolicyGroupsCreate(t *testing.T) {
t,
err,
ResourceNotFoundError{
Message: fmt.Sprintf("VcsProvider with ID '%s' not found or user unauthorized", vcsID),
Message: fmt.Sprintf("VcsProvider with ID '%s' not found or user unauthorized.", vcsID),
}.Error(),
)
})
Expand Down Expand Up @@ -268,7 +268,7 @@ func TestPolicyGroupsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("PolicyGroups with ID '%s' not found or user unauthorized", policyGroup.ID),
Message: fmt.Sprintf("PolicyGroups with ID '%s' not found or user unauthorized.", policyGroup.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion provider_configuration_link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestProviderConfigurationLinkDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ProviderConfigurationLink with ID '%s' not found or user unauthorized", link.ID),
Message: fmt.Sprintf("ProviderConfigurationLink with ID '%s' not found or user unauthorized.", link.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion provider_configuration_parameter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func TestProviderConfigurationParameterDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ProviderConfigurationParameter with ID '%s' not found or user unauthorized", parameter.ID),
Message: fmt.Sprintf("ProviderConfigurationParameter with ID '%s' not found or user unauthorized.", parameter.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion provider_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ func TestProviderConfigurationDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ProviderConfiguration with ID '%s' not found or user unauthorized", configuration.ID),
Message: fmt.Sprintf("ProviderConfiguration with ID '%s' not found or user unauthorized.", configuration.ID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func TestRolesCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized", accountId),
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized.", accountId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -259,7 +259,7 @@ func TestRolesDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("IamRole with ID '%s' not found or user unauthorized", rTest.ID),
Message: fmt.Sprintf("IamRole with ID '%s' not found or user unauthorized.", rTest.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestRunsRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Run with ID '%s' not found or user unauthorized", runId),
Message: fmt.Sprintf("Run with ID '%s' not found or user unauthorized.", runId),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion run_triggers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestRunTriggersDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("RunTrigger with ID '%s' not found or user unauthorized", createdTrigger.ID),
Message: fmt.Sprintf("RunTrigger with ID '%s' not found or user unauthorized.", createdTrigger.ID),
}.Error(),
err.Error(),
)
Expand Down
6 changes: 3 additions & 3 deletions service_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestServiceAccountsCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized", accountId),
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized.", accountId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -165,7 +165,7 @@ func TestServiceAccountsRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized", saID),
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized.", saID),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -225,7 +225,7 @@ func TestServiceAccountsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized", saTest.ID),
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized.", saTest.ID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions service_account_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestServiceAccountTokenList(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized", saId),
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized.", saId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -102,7 +102,7 @@ func TestServiceAccountTokenCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized", saID),
Message: fmt.Sprintf("ServiceAccount with ID '%s' not found or user unauthorized.", saID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func TestTagsCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized", accountId),
Message: fmt.Sprintf("Invalid Relationship\n\nAccount with ID '%s' not found or user unauthorized.", accountId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -189,7 +189,7 @@ func TestTagsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("AccountTag with ID '%s' not found or user unauthorized", tagTest.ID),
Message: fmt.Sprintf("AccountTag with ID '%s' not found or user unauthorized.", tagTest.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func TestTeamsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Team with ID '%s' not found or user unauthorized", testTeam.ID),
Message: fmt.Sprintf("Team with ID '%s' not found or user unauthorized.", testTeam.ID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions variable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func TestVariablesRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Variable with ID '%s' not found or user unauthorized", variableId),
Message: fmt.Sprintf("Variable with ID '%s' not found or user unauthorized.", variableId),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -270,7 +270,7 @@ func TestVariablesDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Variable with ID '%s' not found or user unauthorized", variableId),
Message: fmt.Sprintf("Variable with ID '%s' not found or user unauthorized.", variableId),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions vcs_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestVcsProvidersCreate(t *testing.T) {
t,
ResourceNotFoundError{
Message: fmt.Sprintf(
"Invalid Relationship\n\nRelationship 'environments' with ID '%s' not found or user unauthorized",
"Invalid Relationship\n\nRelationship 'environments' with ID '%s' not found or user unauthorized.",
badIdentifier,
),
}.Error(),
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestVcsProvidersDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("VcsProvider with ID '%s' not found or user unauthorized", vcsTest.ID),
Message: fmt.Sprintf("VcsProvider with ID '%s' not found or user unauthorized.", vcsTest.ID),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion vcs_revision_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestVCSRevisionRead(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("VcsRevisionBinding with ID '%s' not found or user unauthorized", vcsId),
Message: fmt.Sprintf("VcsRevisionBinding with ID '%s' not found or user unauthorized.", vcsId),
}.Error(),
err.Error(),
)
Expand Down
2 changes: 1 addition & 1 deletion webhook_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestWebhookIntegrationsDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Webhook with ID '%s' not found or user unauthorized", whTest.ID),
Message: fmt.Sprintf("Webhook with ID '%s' not found or user unauthorized.", whTest.ID),
}.Error(),
err.Error(),
)
Expand Down
4 changes: 2 additions & 2 deletions workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func TestWorkspacesCreate(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Invalid Relationship\n\nEnvironment with ID '%s' not found or user unauthorized", badIdentifier),
Message: fmt.Sprintf("Invalid Relationship\n\nEnvironment with ID '%s' not found or user unauthorized.", badIdentifier),
}.Error(),
err.Error(),
)
Expand Down Expand Up @@ -481,7 +481,7 @@ func TestWorkspacesDelete(t *testing.T) {
assert.Equal(
t,
ResourceNotFoundError{
Message: fmt.Sprintf("Workspace with ID '%s' not found or user unauthorized", wTest.ID),
Message: fmt.Sprintf("Workspace with ID '%s' not found or user unauthorized.", wTest.ID),
}.Error(),
err.Error(),
)
Expand Down

0 comments on commit ac0fa2f

Please sign in to comment.