Skip to content

Commit d48b55b

Browse files
authored
tests: gateway 3.12 tests (#1736)
* tests: corrected deck dump tests for gateway 3.12 * tests: corrected sync tests for gateway 3.12
1 parent 0eed563 commit d48b55b

File tree

6 files changed

+1220
-13
lines changed

6 files changed

+1220
-13
lines changed

tests/integration/dump_test.go

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ func Test_Dump_SelectTags_3x(t *testing.T) {
7878
name: "dump with select-tags >=3.11.0",
7979
stateFile: "testdata/dump/001-entities-with-tags/kong.yaml",
8080
expectedFile: "testdata/dump/001-entities-with-tags/expected311.yaml",
81-
runWhen: ">=3.11.0",
81+
runWhen: ">=3.11.0 <3.12.0",
82+
},
83+
{
84+
name: "dump with select-tags >=3.12.0",
85+
stateFile: "testdata/dump/001-entities-with-tags/kong.yaml",
86+
expectedFile: "testdata/dump/001-entities-with-tags/expected312.yaml",
87+
runWhen: ">=3.12.0",
8288
},
8389
}
8490
for _, tc := range tests {
@@ -171,7 +177,14 @@ func Test_Dump_SkipConsumers(t *testing.T) {
171177
stateFile: "testdata/dump/002-skip-consumers/kong34.yaml",
172178
expectedFile: "testdata/dump/002-skip-consumers/expected-no-skip-310.yaml",
173179
skipConsumers: false,
174-
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0") },
180+
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0 <3.12.0") },
181+
},
182+
{
183+
name: ">=3.12.0 dump with no skip-consumers",
184+
stateFile: "testdata/dump/002-skip-consumers/kong34.yaml",
185+
expectedFile: "testdata/dump/002-skip-consumers/expected-no-skip-312.yaml",
186+
skipConsumers: false,
187+
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.12.0") },
175188
},
176189
}
177190
for _, tc := range tests {
@@ -505,7 +518,14 @@ func Test_Dump_ConsumerGroupPlugin_PolicyOverrides(t *testing.T) {
505518
stateFile: "testdata/sync/037-consumer-group-policy-overrides/kong39x-no-info.yaml",
506519
expectedFile: "testdata/sync/037-consumer-group-policy-overrides/kong39x.yaml",
507520
errorExpected: false,
508-
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.9.0") },
521+
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.9.0 <3.12.0") },
522+
},
523+
{
524+
name: "dump with flag --consumer-group-policy-overrides set: >=3.12.0",
525+
stateFile: "testdata/sync/037-consumer-group-policy-overrides/kong39x-no-info.yaml",
526+
expectedFile: "testdata/sync/037-consumer-group-policy-overrides/kong312x.yaml",
527+
errorExpected: false,
528+
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.12.0") },
509529
},
510530
}
511531

0 commit comments

Comments
 (0)