Skip to content

Commit

Permalink
fix: integration test fixes for 3.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashansa-K committed Oct 28, 2024
1 parent 947e349 commit 7280798
Show file tree
Hide file tree
Showing 5 changed files with 634 additions and 5 deletions.
2 changes: 2 additions & 0 deletions tests/integration/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,8 @@ func Test_Diff_Unmasked_NewerThan3x(t *testing.T) {

// test scope:
// - 3.5
//
// Failed for 3.8.1.0
func Test_Diff_NoDiffUnorderedArray(t *testing.T) {
runWhen(t, "enterprise", ">=3.5.0")
setup(t)
Expand Down
24 changes: 22 additions & 2 deletions tests/integration/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,31 @@ func Test_Dump_SelectTags_30(t *testing.T) {
}
}

// Fails on 3.8.1
// "ai_metrics: false" present in actual, but not expected
func Test_Dump_SelectTags_3x(t *testing.T) {
tests := []struct {
name string
stateFile string
expectedFile string
runWhen string
}{
{
name: "dump with select-tags",
name: "dump with select-tags >=3.1.0 <3.8.1",
stateFile: "testdata/dump/001-entities-with-tags/kong.yaml",
expectedFile: "testdata/dump/001-entities-with-tags/expected.yaml",
runWhen: ">=3.1.0 <3.8.1",
},
{
name: "dump with select-tags 3.8.1",
stateFile: "testdata/dump/001-entities-with-tags/kong.yaml",
expectedFile: "testdata/dump/001-entities-with-tags/expected381.yaml",
runWhen: ">=3.8.1",
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
runWhen(t, "kong", ">=3.1.0")
runWhen(t, "kong", tc.runWhen)
setup(t)

assert.NoError(t, sync(tc.stateFile))
Expand Down Expand Up @@ -118,11 +128,21 @@ func Test_Dump_SkipConsumers(t *testing.T) {
skipConsumers: true,
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.5.0") },
},
// Failing on 3.8.1
// Schema changes?
// nulls for port, timeouts, etc expected but found real values in actual
{
name: "3.5 dump with no skip-consumers",
stateFile: "testdata/dump/002-skip-consumers/kong34.yaml",
expectedFile: "testdata/dump/002-skip-consumers/expected-no-skip-35.yaml",
skipConsumers: false,
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.5.0 <3.8.1") },
},
{
name: "3.8.1 dump with no skip-consumers",
stateFile: "testdata/dump/002-skip-consumers/kong34.yaml",
expectedFile: "testdata/dump/002-skip-consumers/expected-no-skip-381.yaml",
skipConsumers: false,
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.5.0") },
},
}
Expand Down
Loading

0 comments on commit 7280798

Please sign in to comment.