Skip to content

Commit 8ffed24

Browse files
committed
test: more and more meaingful e2e test for basic c9s functionality
1 parent f2440ea commit 8ffed24

15 files changed

+894
-17
lines changed

.github/vars.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
GO_VERSION=1.22
2-
DEVSPACE_VERSION=v6.3.11
2+
DEVSPACE_VERSION=v6.3.12
33
GCI_VERSION=v0.12.3
44
GOFUMPT_VERSION=v0.6.0
5-
GOLANGCI_LINT_VERSION=v1.56.2
5+
GOLANGCI_LINT_VERSION=v1.57.1
66
GOLINES_VERSION=v0.12.2
77
GOTESTSUM_VERSION=v1.11.0
88
HELM_VERSION=v3.14.2

.golangci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ issues:
177177
# prefer to sprintf -- feels more consistent overall
178178
- linters:
179179
- perfsprint
180-
text: "can be replaced with string addition"
180+
text: "can be replaced with string concatenation"
181181

182182
run:
183183
go: '1.21'
@@ -189,4 +189,4 @@ output:
189189
uniq-by-line: false
190190

191191
service:
192-
golangci-lint-version: 1.56.x
192+
golangci-lint-version: 1.57.x
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
apiVersion: clabernetes.containerlab.dev/v1alpha1
3+
kind: Topology
4+
metadata:
5+
name: topology-basic
6+
spec:
7+
definition:
8+
containerlab: |-
9+
name: topology-basic
10+
11+
topology:
12+
nodes:
13+
srl1:
14+
kind: srl
15+
image: ghcr.io/nokia/srlinux
16+
srl2:
17+
kind: srl
18+
image: ghcr.io/nokia/srlinux
19+
links:
20+
- endpoints: ["srl1:e1-1", "srl2:e1-1"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: clabernetes.containerlab.dev/v1alpha1
2+
kind: Connectivity
3+
metadata:
4+
labels:
5+
clabernetes/app: clabernetes
6+
clabernetes/name: topology-basic
7+
clabernetes/topologyKind: containerlab
8+
clabernetes/topologyOwner: topology-basic
9+
name: topology-basic
10+
namespace: NAMESPACE
11+
ownerReferences:
12+
- apiVersion: clabernetes.containerlab.dev/v1alpha1
13+
kind: Topology
14+
name: topology-basic
15+
spec:
16+
pointToPointTunnels: {}
17+
status: {}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
annotations: {}
5+
labels:
6+
app.kubernetes.io/name: topology-basic-srl1
7+
clabernetes/app: clabernetes
8+
clabernetes/name: topology-basic-srl1
9+
clabernetes/topologyNode: srl1
10+
clabernetes/topologyOwner: topology-basic
11+
name: topology-basic-srl1
12+
namespace: NAMESPACE
13+
ownerReferences:
14+
- apiVersion: clabernetes.containerlab.dev/v1alpha1
15+
kind: Topology
16+
name: topology-basic
17+
spec:
18+
progressDeadlineSeconds: 600
19+
replicas: 1
20+
revisionHistoryLimit: 0
21+
selector:
22+
matchLabels:
23+
app.kubernetes.io/name: topology-basic-srl1
24+
clabernetes/app: clabernetes
25+
clabernetes/name: topology-basic-srl1
26+
clabernetes/topologyNode: srl1
27+
clabernetes/topologyOwner: topology-basic
28+
strategy:
29+
type: Recreate
30+
template:
31+
metadata:
32+
creationTimestamp: null
33+
labels:
34+
app.kubernetes.io/name: topology-basic-srl1
35+
clabernetes/app: clabernetes
36+
clabernetes/name: topology-basic-srl1
37+
clabernetes/topologyNode: srl1
38+
clabernetes/topologyOwner: topology-basic
39+
spec:
40+
containers:
41+
- command:
42+
- /clabernetes/manager
43+
- launch
44+
env:
45+
- name: NODE_NAME
46+
valueFrom:
47+
fieldRef:
48+
apiVersion: v1
49+
fieldPath: spec.nodeName
50+
- name: POD_NAME
51+
valueFrom:
52+
fieldRef:
53+
apiVersion: v1
54+
fieldPath: metadata.name
55+
- name: POD_NAMESPACE
56+
valueFrom:
57+
fieldRef:
58+
apiVersion: v1
59+
fieldPath: metadata.namespace
60+
- name: APP_NAME
61+
value: clabernetes
62+
- name: MANAGER_NAMESPACE
63+
value: clabernetes
64+
- name: LAUNCHER_CRI_KIND
65+
value: containerd
66+
- name: LAUNCHER_IMAGE_PULL_THROUGH_MODE
67+
value: auto
68+
- name: LAUNCHER_LOGGER_LEVEL
69+
value: debug
70+
- name: LAUNCHER_TOPOLOGY_NAME
71+
value: topology-basic
72+
- name: LAUNCHER_NODE_NAME
73+
value: srl1
74+
- name: LAUNCHER_NODE_IMAGE
75+
value: ghcr.io/nokia/srlinux
76+
- name: LAUNCHER_CONNECTIVITY_KIND
77+
value: vxlan
78+
- name: LAUNCHER_CONTAINERLAB_VERSION
79+
- name: LAUNCHER_CONTAINERLAB_TIMEOUT
80+
- name: LAUNCHER_PRIVILEGED
81+
value: "true"
82+
image: 172.31.254.11/clabernetes-launcher:dev-latest
83+
imagePullPolicy: IfNotPresent
84+
name: srl1
85+
ports:
86+
- containerPort: 14789
87+
name: vxlan
88+
protocol: UDP
89+
- containerPort: 4799
90+
name: slurpeeth
91+
protocol: TCP
92+
resources:
93+
requests:
94+
cpu: 200m
95+
memory: 512Mi
96+
securityContext:
97+
privileged: true
98+
runAsUser: 0
99+
terminationMessagePath: /dev/termination-log
100+
terminationMessagePolicy: File
101+
volumeMounts:
102+
- mountPath: /clabernetes/topo.clab.yaml
103+
name: topology-basic-config
104+
readOnly: true
105+
subPath: srl1
106+
- mountPath: /clabernetes/files-from-url.yaml
107+
name: topology-basic-config
108+
readOnly: true
109+
subPath: srl1-files-from-url
110+
- mountPath: /clabernetes/configured-pull-secrets.yaml
111+
name: topology-basic-config
112+
readOnly: true
113+
subPath: configured-pull-secrets
114+
- mountPath: /clabernetes/.node/containerd.sock
115+
name: cri-sock
116+
readOnly: true
117+
subPath: containerd.sock
118+
workingDir: /clabernetes
119+
dnsPolicy: ClusterFirst
120+
hostname: srl1
121+
restartPolicy: Always
122+
schedulerName: default-scheduler
123+
securityContext: {}
124+
serviceAccount: clabernetes-launcher-service-account
125+
serviceAccountName: clabernetes-launcher-service-account
126+
terminationGracePeriodSeconds: 30
127+
volumes:
128+
- configMap:
129+
defaultMode: 493
130+
name: topology-basic
131+
name: topology-basic-config
132+
- hostPath:
133+
path: /run/containerd
134+
type: ""
135+
name: cri-sock
136+
status: {}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
clabernetes/app: clabernetes
6+
clabernetes/name: topology-basic-srl1
7+
clabernetes/topologyKind: containerlab
8+
clabernetes/topologyNode: srl1
9+
clabernetes/topologyOwner: topology-basic
10+
clabernetes/topologyServiceType: fabric
11+
name: topology-basic-srl1-vx
12+
namespace: NAMESPACE
13+
ownerReferences:
14+
- apiVersion: clabernetes.containerlab.dev/v1alpha1
15+
kind: Topology
16+
name: topology-basic
17+
spec:
18+
internalTrafficPolicy: Cluster
19+
ipFamilies:
20+
- IPv4
21+
ipFamilyPolicy: SingleStack
22+
ports:
23+
- name: vxlan
24+
port: 14789
25+
protocol: UDP
26+
targetPort: 14789
27+
- name: slurpeeth
28+
port: 4799
29+
protocol: TCP
30+
targetPort: 4799
31+
selector:
32+
clabernetes/app: clabernetes
33+
clabernetes/name: topology-basic-srl1
34+
clabernetes/topologyNode: srl1
35+
clabernetes/topologyOwner: topology-basic
36+
sessionAffinity: None
37+
type: ClusterIP
38+
status:
39+
loadBalancer: {}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: clabernetes.containerlab.dev/v1alpha1
2+
kind: Connectivity
3+
metadata:
4+
labels:
5+
clabernetes/app: clabernetes
6+
clabernetes/name: topology-basic
7+
clabernetes/topologyKind: containerlab
8+
clabernetes/topologyOwner: topology-basic
9+
name: topology-basic
10+
namespace: NAMESPACE
11+
spec:
12+
pointToPointTunnels:
13+
srl1:
14+
- destination: topology-basic-srl2-vx.NAMESPACE.svc.cluster.local
15+
localInterface: e1-1
16+
localNode: srl1
17+
remoteInterface: e1-1
18+
remoteNode: srl2
19+
tunnelID: 1
20+
srl2:
21+
- destination: topology-basic-srl1-vx.NAMESPACE.svc.cluster.local
22+
localInterface: e1-1
23+
localNode: srl2
24+
remoteInterface: e1-1
25+
remoteNode: srl1
26+
tunnelID: 1
27+
status: {}

0 commit comments

Comments
 (0)