Skip to content

Commit

Permalink
tests: added separate tests for gateway ee feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashansa-K committed Oct 10, 2024
1 parent 813bef9 commit 3cf721a
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tests/integration/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,46 @@ func Test_Validate_Gateway(t *testing.T) {
setup(t)
runWhen(t, "kong", ">=2.8.0")

tests := []struct {
name string
stateFile string
additionalArgs []string
errorExpected bool
}{
{
name: "validate format version 1.1",
stateFile: "testdata/validate/kong.yaml",
additionalArgs: []string{},
},
{
name: "validate format version 3.0",
stateFile: "testdata/validate/kong3x.yaml",
additionalArgs: []string{},
},
{
name: "validate with --konnect-compatibility",
stateFile: "testdata/validate/konnect.yaml",
additionalArgs: []string{"--konnect-compatibility"},
},
}

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

err := validate(true, validateOpts...)
assert.NoError(t, err)
})
}
}

func Test_Validate_Gateway_EE(t *testing.T) {
setup(t)
runWhen(t, "enterprise", ">=2.8.0")

tests := []struct {
name string
stateFile string
Expand Down

0 comments on commit 3cf721a

Please sign in to comment.