fix(test): started fixing tests

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

View file

@ -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",

View file

@ -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"