fix(test): started fixing tests
Some checks failed
test / test (push) Failing after 12s

This commit is contained in:
Richard Robert Reitz 2025-10-07 17:05:35 +02:00
parent b958acd94e
commit e04370a376
2 changed files with 25 additions and 26 deletions

View file

@ -35,7 +35,6 @@ func TestParseExampleConfig(t *testing.T) {
// Check infrastructure template // Check infrastructure template
require.Len(t, config.Spec.InfraTemplate, 1) require.Len(t, config.Spec.InfraTemplate, 1)
infra := config.Spec.InfraTemplate[0] infra := config.Spec.InfraTemplate[0]
assert.Equal(t, "edp2", infra.Organization)
assert.Equal(t, "EU", infra.Region) assert.Equal(t, "EU", infra.Region)
assert.Equal(t, "TelekomOP", infra.CloudletOrg) assert.Equal(t, "TelekomOP", infra.CloudletOrg)
assert.Equal(t, "Munich", infra.CloudletName) assert.Equal(t, "Munich", infra.CloudletName)
@ -73,6 +72,7 @@ func TestValidateExampleStructure(t *testing.T) {
Metadata: Metadata{ Metadata: Metadata{
Name: "edge-app-demo", Name: "edge-app-demo",
AppVersion: "1.0.0", AppVersion: "1.0.0",
Organization: "edp2",
}, },
Spec: Spec{ Spec: Spec{
DockerApp: &DockerApp{ // Use DockerApp to avoid manifest file validation DockerApp: &DockerApp{ // Use DockerApp to avoid manifest file validation
@ -80,7 +80,6 @@ func TestValidateExampleStructure(t *testing.T) {
}, },
InfraTemplate: []InfraTemplate{ InfraTemplate: []InfraTemplate{
{ {
Organization: "edp2",
Region: "EU", Region: "EU",
CloudletOrg: "TelekomOP", CloudletOrg: "TelekomOP",
CloudletName: "Munich", CloudletName: "Munich",

View file

@ -33,12 +33,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
k8sApp: k8sApp:
manifestFile: "./test-manifest.yaml" manifestFile: "./test-manifest.yaml"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -53,12 +53,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
dockerApp: dockerApp:
image: "nginx:latest" image: "nginx:latest"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -71,12 +71,12 @@ spec:
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
k8sApp: k8sApp:
manifestFile: "./test-manifest.yaml" manifestFile: "./test-manifest.yaml"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -91,12 +91,12 @@ kind: invalid-kind
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
dockerApp: dockerApp:
image: "nginx:latest" image: "nginx:latest"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -111,10 +111,10 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -129,6 +129,7 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
k8sApp: k8sApp:
manifestFile: "./test-manifest.yaml" manifestFile: "./test-manifest.yaml"
@ -136,8 +137,7 @@ spec:
appName: "test-app" appName: "test-app"
image: "nginx:latest" image: "nginx:latest"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -167,12 +167,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
dockerApp: dockerApp:
image: "nginx:latest" image: "nginx:latest"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -223,12 +223,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
dockerApp: dockerApp:
image: "nginx:latest" image: "nginx:latest"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -285,12 +285,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
k8sApp: k8sApp:
manifestFile: "./manifest.yaml" manifestFile: "./manifest.yaml"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"
@ -321,16 +321,16 @@ func TestEdgeConnectConfig_Validate(t *testing.T) {
config: EdgeConnectConfig{ config: EdgeConnectConfig{
Kind: "edgeconnect-deployment", Kind: "edgeconnect-deployment",
Metadata: Metadata{ Metadata: Metadata{
Name: "test-app", Name: "test-app",
AppVersion: "1.0.0", AppVersion: "1.0.0",
Organization: "testorg",
}, },
Spec: Spec{ Spec: Spec{
DockerApp: &DockerApp{ DockerApp: &DockerApp{
Image: "nginx:latest", Image: "nginx:latest",
}, },
InfraTemplate: []InfraTemplate{ InfraTemplate: []InfraTemplate{
{ {
Organization: "testorg",
Region: "US", Region: "US",
CloudletOrg: "TestOP", CloudletOrg: "TestOP",
CloudletName: "TestCloudlet", CloudletName: "TestCloudlet",
@ -579,12 +579,12 @@ kind: edgeconnect-deployment
metadata: metadata:
name: "test-app" name: "test-app"
appVersion: "1.0.0" appVersion: "1.0.0"
organization: "testorg"
spec: spec:
k8sApp: k8sApp:
manifestFile: "./manifest.yaml" manifestFile: "./manifest.yaml"
infraTemplate: infraTemplate:
- organization: "testorg" - region: "US"
region: "US"
cloudletOrg: "TestOP" cloudletOrg: "TestOP"
cloudletName: "TestCloudlet" cloudletName: "TestCloudlet"
flavorName: "small" flavorName: "small"