From a0136aaa6f036d9c83799c76d23b95f07ce68604 Mon Sep 17 00:00:00 2001 From: erikzaadi Date: Tue, 10 Dec 2024 18:11:05 +0200 Subject: [PATCH] [SQUASH] Align tests with new init logic --- pkg/defaults/defaults_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/defaults/defaults_test.go b/pkg/defaults/defaults_test.go index 6b0262c..234ba93 100644 --- a/pkg/defaults/defaults_test.go +++ b/pkg/defaults/defaults_test.go @@ -131,13 +131,13 @@ func Test_InitIntegration_BlueprintExists(t *testing.T) { assert.Nil(t, e) i, err := integration.GetIntegration(f.portClient, f.stateKey) - assert.Nil(t, i.Config.Resources) + assert.NotNil(t, i.Config.Resources) assert.Nil(t, err) _, err = blueprint.GetBlueprint(f.portClient, "workload") assert.Nil(t, err) - testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) + testUtils.CheckResourcesExistence(true, false, f.portClient, f.t, []string{"namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}, []string{}) } func Test_InitIntegration_PageExists(t *testing.T) { @@ -157,13 +157,13 @@ func Test_InitIntegration_PageExists(t *testing.T) { assert.Nil(t, e) i, err := integration.GetIntegration(f.portClient, f.stateKey) - assert.Nil(t, i.Config.Resources) + assert.NotNil(t, i.Config.Resources) assert.Nil(t, err) _, err = page.GetPage(f.portClient, "workload_overview_dashboard") assert.Nil(t, err) - testUtils.CheckResourcesExistence(false, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"availability_scorecard_dashboard"}, []string{}) + testUtils.CheckResourcesExistence(true, false, f.portClient, f.t, []string{"workload", "namespace", "cluster"}, []string{"availability_scorecard_dashboard"}, []string{}) } func Test_InitIntegration_ExistingIntegration(t *testing.T) {