Skip to content

Commit

Permalink
test: update tests w/ connectivity field in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmontanari committed Jan 17, 2024
1 parent 4a36054 commit 0ca126e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion clabverter/assets/topology.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}

connectivity: vxlan
definition:
containerlab: |-
{{- .ClabConfig }}
2 changes: 1 addition & 1 deletion clabverter/test-fixtures/golden/srl02.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: srl02
namespace: notclabernetes
spec:
connectivity: vxlan
definition:
containerlab: |-
name: srl02
Expand Down Expand Up @@ -57,7 +58,6 @@ spec:
resources: null
scheduling:
tolerations: null
enableSlurpeeth: false
expose:
disableAutoExpose: false
disableExpose: false
Expand Down
7 changes: 7 additions & 0 deletions controllers/topology/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ func TestRenderDeployment(t *testing.T) {
Namespace: "clabernetes",
},
Spec: clabernetesapisv1alpha1.TopologySpec{
Connectivity: clabernetesconstants.ConnectivityVXLAN,
Definition: clabernetesapisv1alpha1.Definition{
Containerlab: `---
name: test
Expand Down Expand Up @@ -201,6 +202,7 @@ func TestRenderDeployment(t *testing.T) {
Namespace: "clabernetes",
},
Spec: clabernetesapisv1alpha1.TopologySpec{
Connectivity: clabernetesconstants.ConnectivityVXLAN,
Deployment: clabernetesapisv1alpha1.Deployment{
PrivilegedLauncher: clabernetesutil.ToPointer(true),
},
Expand Down Expand Up @@ -261,6 +263,7 @@ func TestRenderDeployment(t *testing.T) {
Namespace: "clabernetes",
},
Spec: clabernetesapisv1alpha1.TopologySpec{
Connectivity: clabernetesconstants.ConnectivityVXLAN,
Deployment: clabernetesapisv1alpha1.Deployment{
ContainerlabDebug: clabernetesutil.ToPointer(true),
},
Expand Down Expand Up @@ -321,6 +324,7 @@ func TestRenderDeployment(t *testing.T) {
Namespace: "clabernetes",
},
Spec: clabernetesapisv1alpha1.TopologySpec{
Connectivity: clabernetesconstants.ConnectivityVXLAN,
Deployment: clabernetesapisv1alpha1.Deployment{
LauncherLogLevel: "debug",
},
Expand Down Expand Up @@ -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"},
},
Expand Down Expand Up @@ -441,6 +446,7 @@ func TestRenderDeployment(t *testing.T) {
Namespace: "clabernetes",
},
Spec: clabernetesapisv1alpha1.TopologySpec{
Connectivity: clabernetesconstants.ConnectivityVXLAN,
ImagePull: clabernetesapisv1alpha1.ImagePull{
DockerDaemonConfig: "sneakydockerdaemonconfig",
},
Expand Down Expand Up @@ -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{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: clabverter-basic
namespace: NAMESPACE
spec:
connectivity: vxlan
definition:
containerlab: |-
---
Expand All @@ -25,7 +26,6 @@ spec:
persistence:
enabled: false
scheduling: {}
enableSlurpeeth: false
expose:
disableAutoExpose: false
disableExpose: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
name: topology-basic
namespace: NAMESPACE
spec:
connectivity: vxlan
definition:
containerlab: |-
name: topology-basic
Expand All @@ -18,7 +19,6 @@ spec:
persistence:
enabled: false
scheduling: {}
enableSlurpeeth: false
expose:
disableAutoExpose: false
disableExpose: false
Expand Down

0 comments on commit 0ca126e

Please sign in to comment.