Skip to content

Commit

Permalink
remove assertion duplication as require.errorAs is included in the re…
Browse files Browse the repository at this point in the history
…quire.errorIs
  • Loading branch information
medmes committed Nov 26, 2024
1 parent 5f1c942 commit da3ba26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/modulectl/create/cmd.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package create

import (
_ "embed"
"fmt"

"github.com/spf13/cobra"

commonerrors "github.com/kyma-project/modulectl/internal/common/errors"
"github.com/kyma-project/modulectl/internal/service/create"
iotools "github.com/kyma-project/modulectl/tools/io"

_ "embed"
)

//go:embed use.txt
Expand Down
3 changes: 2 additions & 1 deletion cmd/modulectl/scaffold/cmd.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package scaffold

import (
_ "embed"
"fmt"

"github.com/spf13/cobra"

commonerrors "github.com/kyma-project/modulectl/internal/common/errors"
"github.com/kyma-project/modulectl/internal/service/scaffold"
iotools "github.com/kyma-project/modulectl/tools/io"

_ "embed"
)

//go:embed use.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ func Test_ValidateModuleConfig(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
err := moduleconfigreader.ValidateModuleConfig(test.moduleConfig)
if test.expectedError != nil {
require.ErrorAs(t, err, &test.expectedError)
require.ErrorIs(t, err, test.expectedError, test.expectedError.Error())
return
}
Expand Down

0 comments on commit da3ba26

Please sign in to comment.