Skip to content

Commit

Permalink
chore: added corrections based on PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashansa-K committed Oct 18, 2024
1 parent cf17473 commit 382bf1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 1 addition & 3 deletions tests/integration/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,5 @@ func validate(online bool, opts ...string) error {
}
deckCmd.SetArgs(args)

cmdErr := deckCmd.ExecuteContext(context.Background())

return cmdErr
return deckCmd.ExecuteContext(context.Background())
}
17 changes: 11 additions & 6 deletions tests/integration/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import (
"github.com/stretchr/testify/assert"
)

const (
ONLINE = true
OFFLINE = false
)

func Test_Validate_Konnect(t *testing.T) {
setup(t)
runWhen(t, "konnect", "")
Expand Down Expand Up @@ -70,21 +75,21 @@ func Test_Validate_Konnect(t *testing.T) {

for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
validateOpts := []string{
validateOpts := append([]string{
tc.stateFile,
}
validateOpts = append(validateOpts, tc.additionalArgs...)
}, tc.additionalArgs...)

err := validate(true, validateOpts...)
err := validate(ONLINE, validateOpts...)

if tc.errorExpected {
assert.Error(t, err)
if tc.errorString != "" {
assert.Contains(t, err.Error(), tc.errorString)
}
} else {
assert.NoError(t, err)
return
}

assert.NoError(t, err)
})
}
}

0 comments on commit 382bf1b

Please sign in to comment.