From 7f380ce69b2ff026250990c3b28f28ef777a4bd7 Mon Sep 17 00:00:00 2001 From: Carl Montanari Date: Tue, 16 Jan 2024 16:30:33 -0800 Subject: [PATCH] test: update tests w/ connectivity field in spec --- clabverter/assets/topology.yaml.template | 2 +- clabverter/test-fixtures/golden/srl02.yaml | 2 +- controllers/topology/deployment_test.go | 7 +++++++ .../test-fixtures/golden/10-topology.clabverter-basic.yaml | 2 +- .../test-fixtures/golden/10-topology.topology-basic.yaml | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/clabverter/assets/topology.yaml.template b/clabverter/assets/topology.yaml.template index 31685390..123923a9 100644 --- a/clabverter/assets/topology.yaml.template +++ b/clabverter/assets/topology.yaml.template @@ -36,7 +36,7 @@ spec: {{- end }} {{- end }} {{- end }} - + connectivity: vxlan definition: containerlab: |- {{- .ClabConfig }} diff --git a/clabverter/test-fixtures/golden/srl02.yaml b/clabverter/test-fixtures/golden/srl02.yaml index e9de2873..3b2e304c 100755 --- a/clabverter/test-fixtures/golden/srl02.yaml +++ b/clabverter/test-fixtures/golden/srl02.yaml @@ -5,6 +5,7 @@ metadata: name: srl02 namespace: notclabernetes spec: + connectivity: vxlan definition: containerlab: |- name: srl02 @@ -57,7 +58,6 @@ spec: resources: null scheduling: tolerations: null - enableSlurpeeth: false expose: disableAutoExpose: false disableExpose: false diff --git a/controllers/topology/deployment_test.go b/controllers/topology/deployment_test.go index 0d1953a4..8915911d 100644 --- a/controllers/topology/deployment_test.go +++ b/controllers/topology/deployment_test.go @@ -144,6 +144,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, Definition: clabernetesapisv1alpha1.Definition{ Containerlab: `--- name: test @@ -201,6 +202,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, Deployment: clabernetesapisv1alpha1.Deployment{ PrivilegedLauncher: clabernetesutil.ToPointer(true), }, @@ -261,6 +263,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, Deployment: clabernetesapisv1alpha1.Deployment{ ContainerlabDebug: clabernetesutil.ToPointer(true), }, @@ -321,6 +324,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, Deployment: clabernetesapisv1alpha1.Deployment{ LauncherLogLevel: "debug", }, @@ -381,6 +385,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, ImagePull: clabernetesapisv1alpha1.ImagePull{ InsecureRegistries: []string{"1.2.3.4", "potato.com"}, }, @@ -441,6 +446,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, ImagePull: clabernetesapisv1alpha1.ImagePull{ DockerDaemonConfig: "sneakydockerdaemonconfig", }, @@ -501,6 +507,7 @@ func TestRenderDeployment(t *testing.T) { Namespace: "clabernetes", }, Spec: clabernetesapisv1alpha1.TopologySpec{ + Connectivity: clabernetesconstants.ConnectivityVXLAN, Deployment: clabernetesapisv1alpha1.Deployment{ Scheduling: clabernetesapisv1alpha1.Scheduling{ NodeSelector: map[string]string{ diff --git a/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml b/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml index e3105863..812e7637 100755 --- a/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml +++ b/e2e/clabverter/test-fixtures/golden/10-topology.clabverter-basic.yaml @@ -5,6 +5,7 @@ metadata: name: clabverter-basic namespace: NAMESPACE spec: + connectivity: vxlan definition: containerlab: |- --- @@ -25,7 +26,6 @@ spec: persistence: enabled: false scheduling: {} - enableSlurpeeth: false expose: disableAutoExpose: false disableExpose: false diff --git a/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml b/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml index eb5ee146..e7fa4a01 100755 --- a/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml +++ b/e2e/topology/basic/test-fixtures/golden/10-topology.topology-basic.yaml @@ -5,6 +5,7 @@ metadata: name: topology-basic namespace: NAMESPACE spec: + connectivity: vxlan definition: containerlab: |- name: topology-basic @@ -18,7 +19,6 @@ spec: persistence: enabled: false scheduling: {} - enableSlurpeeth: false expose: disableAutoExpose: false disableExpose: false