Skip to content

Commit

Permalink
update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Oct 17, 2024
1 parent d456287 commit 2e63e9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/service/contentprovider/moduleconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/kyma-project/modulectl/internal/common/types"
)

var ErrDuplicateResourceNames = errors.New("list contains duplicate entries")
var ErrDuplicateResourceNames = errors.New("resources contain duplicate entries")

type ModuleConfigProvider struct {
yamlConverter ObjectToYAMLConverter
Expand Down
2 changes: 1 addition & 1 deletion internal/service/contentprovider/moduleconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ resources:
err := yaml.Unmarshal([]byte(moduleConfigData), moduleConfig)

require.Error(t, err)
assert.Equal(t, "list contains duplicate entries", err.Error())
assert.Equal(t, "resources contain duplicate entries", err.Error())
}

func Test_ModuleConfig_Marshal_Resources_Success(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var _ = Describe("Test 'create' command", Ordered, func() {
It("Then the command should fail", func() {
err := cmd.execute()
Expect(err).Should(HaveOccurred())
Expect(err.Error()).Should(ContainSubstring("failed to parse module config file: list contains duplicate entries"))
Expect(err.Error()).Should(ContainSubstring("failed to parse module config file: resources contain duplicate entries"))
})
})

Expand Down

0 comments on commit 2e63e9e

Please sign in to comment.