diff --git a/tests/integration/validate_test.go b/tests/integration/validate_test.go index 9259d7e7b..0173e9fde 100644 --- a/tests/integration/validate_test.go +++ b/tests/integration/validate_test.go @@ -127,6 +127,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