From 1a96192467f75507629492b418f7f6043ae3824d Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Fri, 25 Jul 2025 13:48:18 +0530 Subject: [PATCH 1/2] fix: Added Ignore addresses in the tests --- tests/other_test.go | 10 ++++++++++ tests/pr_test.go | 14 +++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/other_test.go b/tests/other_test.go index 69998d8..96b332c 100644 --- a/tests/other_test.go +++ b/tests/other_test.go @@ -21,6 +21,11 @@ func setupOptions(t *testing.T, prefix string, dir string) *testhelper.TestOptio Prefix: prefix, ResourceGroup: resourceGroup, Region: validRegions[rand.Intn(len(validRegions))], + IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check + List: []string{ + "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", + }, + }, }) return options } @@ -54,6 +59,11 @@ func TestRunAdvancedExampleInSchematics(t *testing.T) { Tags: []string{"test-schematic"}, DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, + IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check + List: []string{ + "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", + }, + }, }) options.TerraformVars = []testschematic.TestSchematicTerraformVar{ diff --git a/tests/pr_test.go b/tests/pr_test.go index bea7dfa..3e87fc5 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -75,7 +75,9 @@ func TestRunFullyConfigurable(t *testing.T) { DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: IgnoreUpdates, + List: []string{ + "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", + }, }, }) @@ -148,6 +150,11 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) { Tags: []string{"test-schematic"}, DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, + IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check + List: []string{ + "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", + }, + }, }) options.TerraformVars = []testschematic.TestSchematicTerraformVar{ @@ -200,6 +207,11 @@ func TestRunAccountSettings(t *testing.T) { Tags: []string{"mr-da-test"}, DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, + IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check + List: []string{ + "module.metrics_router_account_settings.ibm_metrics_router_settings.metrics_router_settings[0]", + }, + }, }) options.TerraformVars = []testschematic.TestSchematicTerraformVar{ From 5d451ff48b7a5595dde9c571fb0d8a820200889d Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Fri, 25 Jul 2025 15:15:14 +0530 Subject: [PATCH 2/2] Updated test --- tests/other_test.go | 8 ++------ tests/pr_test.go | 15 ++++++--------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/tests/other_test.go b/tests/other_test.go index 96b332c..1c3bf6f 100644 --- a/tests/other_test.go +++ b/tests/other_test.go @@ -22,9 +22,7 @@ func setupOptions(t *testing.T, prefix string, dir string) *testhelper.TestOptio ResourceGroup: resourceGroup, Region: validRegions[rand.Intn(len(validRegions))], IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: []string{ - "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", - }, + List: IgnoreUpdates, }, }) return options @@ -60,9 +58,7 @@ func TestRunAdvancedExampleInSchematics(t *testing.T) { DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: []string{ - "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", - }, + List: IgnoreUpdates, }, }) diff --git a/tests/pr_test.go b/tests/pr_test.go index 3e87fc5..9e746c8 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -28,6 +28,9 @@ const AccountSettingsDADir = "solutions/metrics-routing-account-settings" var IgnoreUpdates = []string{ "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", } +var IgnoreUpdatesAccountSettings = []string{ + "module.metrics_router_account_settings.ibm_metrics_router_settings.metrics_router_settings[0]", +} var validRegions = []string{ "au-syd", @@ -75,9 +78,7 @@ func TestRunFullyConfigurable(t *testing.T) { DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: []string{ - "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", - }, + List: IgnoreUpdates, }, }) @@ -151,9 +152,7 @@ func TestRunUpgradeFullyConfigurable(t *testing.T) { DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: []string{ - "module.metrics_routing[0].ibm_metrics_router_settings.metrics_router_settings[0]", - }, + List: IgnoreUpdates, }, }) @@ -208,9 +207,7 @@ func TestRunAccountSettings(t *testing.T) { DeleteWorkspaceOnFail: false, WaitJobCompleteMinutes: 60, IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check - List: []string{ - "module.metrics_router_account_settings.ibm_metrics_router_settings.metrics_router_settings[0]", - }, + List: IgnoreUpdatesAccountSettings, }, })