From a72341356b97c9fc61789f3e27031d74f834a0f7 Mon Sep 17 00:00:00 2001 From: Richard Robert Reitz Date: Tue, 7 Oct 2025 17:05:35 +0200 Subject: [PATCH] fix(test): started fixing tests --- internal/config/example_test.go | 3 +-- internal/config/parser_test.go | 48 ++++++++++++++++----------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/internal/config/example_test.go b/internal/config/example_test.go index 7316430..dfa3840 100644 --- a/internal/config/example_test.go +++ b/internal/config/example_test.go @@ -35,7 +35,6 @@ func TestParseExampleConfig(t *testing.T) { // Check infrastructure template require.Len(t, config.Spec.InfraTemplate, 1) infra := config.Spec.InfraTemplate[0] - assert.Equal(t, "edp2", infra.Organization) assert.Equal(t, "EU", infra.Region) assert.Equal(t, "TelekomOP", infra.CloudletOrg) assert.Equal(t, "Munich", infra.CloudletName) @@ -73,6 +72,7 @@ func TestValidateExampleStructure(t *testing.T) { Metadata: Metadata{ Name: "edge-app-demo", AppVersion: "1.0.0", + Organization: "edp2", }, Spec: Spec{ DockerApp: &DockerApp{ // Use DockerApp to avoid manifest file validation @@ -80,7 +80,6 @@ func TestValidateExampleStructure(t *testing.T) { }, InfraTemplate: []InfraTemplate{ { - Organization: "edp2", Region: "EU", CloudletOrg: "TelekomOP", CloudletName: "Munich", diff --git a/internal/config/parser_test.go b/internal/config/parser_test.go index c713ff5..cb672ae 100644 --- a/internal/config/parser_test.go +++ b/internal/config/parser_test.go @@ -33,12 +33,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: k8sApp: manifestFile: "./test-manifest.yaml" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -53,12 +53,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: dockerApp: image: "nginx:latest" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -71,12 +71,12 @@ spec: metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: k8sApp: manifestFile: "./test-manifest.yaml" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -91,12 +91,12 @@ kind: invalid-kind metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: dockerApp: image: "nginx:latest" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -111,10 +111,10 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -129,6 +129,7 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: k8sApp: manifestFile: "./test-manifest.yaml" @@ -136,8 +137,7 @@ spec: appName: "test-app" image: "nginx:latest" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -167,12 +167,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: dockerApp: image: "nginx:latest" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -223,12 +223,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: dockerApp: image: "nginx:latest" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -285,12 +285,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: k8sApp: manifestFile: "./manifest.yaml" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small" @@ -321,16 +321,16 @@ func TestEdgeConnectConfig_Validate(t *testing.T) { config: EdgeConnectConfig{ Kind: "edgeconnect-deployment", Metadata: Metadata{ - Name: "test-app", - AppVersion: "1.0.0", + Name: "test-app", + AppVersion: "1.0.0", + Organization: "testorg", }, Spec: Spec{ DockerApp: &DockerApp{ - Image: "nginx:latest", + Image: "nginx:latest", }, InfraTemplate: []InfraTemplate{ { - Organization: "testorg", Region: "US", CloudletOrg: "TestOP", CloudletName: "TestCloudlet", @@ -579,12 +579,12 @@ kind: edgeconnect-deployment metadata: name: "test-app" appVersion: "1.0.0" + organization: "testorg" spec: k8sApp: manifestFile: "./manifest.yaml" infraTemplate: - - organization: "testorg" - region: "US" + - region: "US" cloudletOrg: "TestOP" cloudletName: "TestCloudlet" flavorName: "small"