From 2e90a44595ad34fc3e6c80ecb16e83d782745ccc Mon Sep 17 00:00:00 2001 From: yair Date: Thu, 8 Feb 2024 12:21:32 +0200 Subject: [PATCH] added tests and did some renaming --- pkg/defaults/defaults_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/defaults/defaults_test.go b/pkg/defaults/defaults_test.go index a0ff870..dc75d16 100644 --- a/pkg/defaults/defaults_test.go +++ b/pkg/defaults/defaults_test.go @@ -256,7 +256,7 @@ func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_EmptyC func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_WithConfiguration_WithOverwriteConfigurationOnRestartFlag(t *testing.T) { f := NewFixture(t) - expectedResources := &port.IntegrationAppConfig{ + expectedConfig := &port.IntegrationAppConfig{ Resources: []port.Resource{ { Kind: "workload", @@ -278,16 +278,16 @@ func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_WithCo }, }, } - err := integration.CreateIntegration(f.portClient, f.stateKey, "POLLING", expectedResources) + err := integration.CreateIntegration(f.portClient, f.stateKey, "POLLING", expectedConfig) if err != nil { t.Errorf("Error creating Port integration: %s", err.Error()) } - expectedResources.Resources[0].Kind = "namespace" + expectedConfig.Resources[0].Kind = "namespace" e := InitIntegration(f.portClient, &port.Config{ StateKey: f.stateKey, EventListenerType: "KAFKA", - Resources: expectedResources.Resources, + Resources: expectedConfig.Resources, CreateDefaultResources: true, OverwriteConfigurationOnRestart: true, }) @@ -295,7 +295,7 @@ func Test_InitIntegration_LocalResourcesConfiguration_ExistingIntegration_WithCo i, err := integration.GetIntegration(f.portClient, f.stateKey) assert.Nil(t, err) - assert.Equal(t, expectedResources, i.Config.Resources) + assert.Equal(t, expectedConfig.Resources, i.Config.Resources) checkResourcesDoesNotExist(f, []string{"workload", "namespace", "cluster"}, []string{"workload_overview_dashboard", "availability_scorecard_dashboard"}) }