Skip to content

Commit

Permalink
test: Updating Dapr conflict prompt with new building block Configura…
Browse files Browse the repository at this point in the history
…tionStore again

Signed-off-by: SoTrx <[email protected]>
  • Loading branch information
SoTrx authored and lakshmimsft committed Sep 18, 2024
1 parent 726a587 commit e655e73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,6 @@ func Test_Process(t *testing.T) {
err = processor.Process(context.Background(), resource, options)
require.Error(t, err)
assert.IsType(t, &processors.ValidationError{}, err)
assert.Equal(t, fmt.Sprintf("the Dapr component name '\"%s\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again", componentName), err.Error())
assert.Equal(t, fmt.Sprintf("the Dapr component name '\"%s\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again.", componentName), err.Error())
})
}
2 changes: 1 addition & 1 deletion pkg/daprrp/processors/pubsubbrokers/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,6 @@ func Test_Process(t *testing.T) {
err = processor.Process(context.Background(), resource, options)
require.Error(t, err)
assert.IsType(t, &processors.ValidationError{}, err)
assert.Equal(t, "the Dapr component name '\"test-dapr-pubsub-broker\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again", err.Error())
assert.Equal(t, "the Dapr component name '\"test-dapr-pubsub-broker\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again.", err.Error())
})
}
2 changes: 1 addition & 1 deletion pkg/daprrp/processors/secretstores/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,6 @@ func Test_Process(t *testing.T) {
err = processor.Process(context.Background(), resource, options)
require.Error(t, err)
assert.IsType(t, &processors.ValidationError{}, err)
assert.Equal(t, "the Dapr component name '\"test-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again", err.Error())
assert.Equal(t, "the Dapr component name '\"test-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again.", err.Error())
})
}
2 changes: 1 addition & 1 deletion pkg/daprrp/processors/statestores/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,6 @@ func Test_Process(t *testing.T) {
err = processor.Process(context.Background(), resource, options)
require.Error(t, err)
assert.IsType(t, &processors.ValidationError{}, err)
assert.Equal(t, "the Dapr component name '\"test-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again", err.Error())
assert.Equal(t, "the Dapr component name '\"test-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again.", err.Error())
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Test_DaprComponentNameConflict(t *testing.T) {
Details: []step.DeploymentErrorDetail{
{
Code: v1.CodeInternal,
MessageContains: "the Dapr component name '\"dapr-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again",
MessageContains: "the Dapr component name '\"dapr-component\"' is already in use by another resource. Dapr component and resource names must be unique across all Dapr types (e.g., StateStores, PubSubBrokers, SecretStores, ConfigurationStores, etc.). Please select a new name and try again.",
},
},
})
Expand Down

0 comments on commit e655e73

Please sign in to comment.