Skip to content

Commit 155acd1

Browse files
authored
[testing] : convert existing e2e tests to chainsaw tests (#253)
* convert e2e tests to chainsaw tests * fix dir naming and test failures * fix failing tests * add fw test, add script and run 2 tests in parallel * add check for error to be null * fix install failures by pinning bootstrap and control-plane versions * fix typos
1 parent 5426f27 commit 155acd1

File tree

68 files changed

+3260
-2760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3260
-2760
lines changed

.chainsaw.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/configuration-chainsaw-v1alpha1.json
2+
apiVersion: chainsaw.kyverno.io/v1alpha1
3+
kind: Configuration
4+
metadata:
5+
name: configuration
6+
spec:
7+
timeouts:
8+
assert: 5m0s
9+
cleanup: 5m0s
10+
delete: 5m0s
11+
error: 5m0s
12+
exec: 5m0s

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ HELM_VERSION ?= v3.16.3
1515
#####################################################################
1616
CLUSTER_NAME ?= ccm-$(shell git rev-parse --short HEAD)
1717
K8S_VERSION ?= "v1.31.2"
18-
CAPI_VERSION ?= "v1.6.3"
18+
CAPI_VERSION ?= "v1.8.5"
1919
CAAPH_VERSION ?= "v0.2.1"
2020
CAPL_VERSION ?= "v0.7.1"
2121
CONTROLPLANE_NODES ?= 1
@@ -24,6 +24,7 @@ LINODE_FIREWALL_ENABLED ?= true
2424
LINODE_REGION ?= us-lax
2525
LINODE_OS ?= linode/ubuntu22.04
2626
KUBECONFIG_PATH ?= $(CURDIR)/test-cluster-kubeconfig.yaml
27+
MGMT_KUBECONFIG_PATH ?= $(CURDIR)/mgmt-cluster-kubeconfig.yaml
2728

2829
# if the $DEVBOX_PACKAGES_DIR env variable exists that means we are within a devbox shell and can safely
2930
# use devbox's bin for our tools
@@ -174,8 +175,11 @@ mgmt-cluster:
174175
--wait-providers \
175176
--wait-provider-timeout 600 \
176177
--core cluster-api:$(CAPI_VERSION) \
178+
--bootstrap kubeadm:$(CAPI_VERSION) \
179+
--control-plane kubeadm:$(CAPI_VERSION) \
177180
--addon helm:$(CAAPH_VERSION) \
178181
--infrastructure linode-linode:$(CAPL_VERSION)
182+
kind get kubeconfig --name=caplccm > $(MGMT_KUBECONFIG_PATH)
179183

180184
.PHONY: cleanup-cluster
181185
cleanup-cluster:
@@ -186,7 +190,12 @@ cleanup-cluster:
186190

187191
.PHONY: e2e-test
188192
e2e-test:
189-
$(MAKE) -C e2e test LINODE_API_TOKEN=$(LINODE_TOKEN) SUITE_ARGS="--region=$(LINODE_REGION) --use-existing --timeout=5m --kubeconfig=$(KUBECONFIG_PATH) --image=$(IMG) --linode-url https://api.linode.com/"
193+
CLUSTER_NAME=$(CLUSTER_NAME) \
194+
MGMT_KUBECONFIG=$(MGMT_KUBECONFIG_PATH) \
195+
KUBECONFIG=$(KUBECONFIG_PATH) \
196+
REGION=$(LINODE_REGION) \
197+
LINODE_TOKEN=$(LINODE_TOKEN) \
198+
chainsaw test e2e/test --parallel 2
190199

191200
#####################################################################
192201
# OS / ARCH

e2e/Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

e2e/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

e2e/go.mod

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)