From ef4190a7eded953ee261c9f02b599192dd2e1bd7 Mon Sep 17 00:00:00 2001 From: Richard Kovacs Date: Thu, 8 Feb 2024 16:18:29 +0100 Subject: [PATCH] E2E test vpc controller --- e2e/linodevpc-controller/minimal/01-assert.yaml | 9 +++++++++ e2e/linodevpc-controller/minimal/01-create-vpc.yaml | 7 +++++++ e2e/linodevpc-controller/minimal/02-delete-vpc.yaml | 6 ++++++ e2e/linodevpc-controller/minimal/02-error.yaml | 7 +++++++ e2e/linodevpc-controller/minimal/03-verify-vpc.yaml | 5 +++++ e2e/linodevpc-controller/minimal/Makefile | 1 + 6 files changed, 35 insertions(+) create mode 100644 e2e/linodevpc-controller/minimal/01-assert.yaml create mode 100644 e2e/linodevpc-controller/minimal/01-create-vpc.yaml create mode 100644 e2e/linodevpc-controller/minimal/02-delete-vpc.yaml create mode 100644 e2e/linodevpc-controller/minimal/02-error.yaml create mode 100644 e2e/linodevpc-controller/minimal/03-verify-vpc.yaml create mode 100644 e2e/linodevpc-controller/minimal/Makefile diff --git a/e2e/linodevpc-controller/minimal/01-assert.yaml b/e2e/linodevpc-controller/minimal/01-assert.yaml new file mode 100644 index 000000000..b3a9cd760 --- /dev/null +++ b/e2e/linodevpc-controller/minimal/01-assert.yaml @@ -0,0 +1,9 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 +kind: LinodeVPC +metadata: + name: linodevpc-sample +spec: + label: capli-e2e-byovpc-sample + region: us-sea +status: + ready: true diff --git a/e2e/linodevpc-controller/minimal/01-create-vpc.yaml b/e2e/linodevpc-controller/minimal/01-create-vpc.yaml new file mode 100644 index 000000000..f71a29b6d --- /dev/null +++ b/e2e/linodevpc-controller/minimal/01-create-vpc.yaml @@ -0,0 +1,7 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 +kind: LinodeVPC +metadata: + name: linodevpc-sample +spec: + label: capli-e2e-byovpc-sample + region: us-sea diff --git a/e2e/linodevpc-controller/minimal/02-delete-vpc.yaml b/e2e/linodevpc-controller/minimal/02-delete-vpc.yaml new file mode 100644 index 000000000..193c292fd --- /dev/null +++ b/e2e/linodevpc-controller/minimal/02-delete-vpc.yaml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 + kind: LinodeVPC + name: linodevpc-sample diff --git a/e2e/linodevpc-controller/minimal/02-error.yaml b/e2e/linodevpc-controller/minimal/02-error.yaml new file mode 100644 index 000000000..f71a29b6d --- /dev/null +++ b/e2e/linodevpc-controller/minimal/02-error.yaml @@ -0,0 +1,7 @@ +apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 +kind: LinodeVPC +metadata: + name: linodevpc-sample +spec: + label: capli-e2e-byovpc-sample + region: us-sea diff --git a/e2e/linodevpc-controller/minimal/03-verify-vpc.yaml b/e2e/linodevpc-controller/minimal/03-verify-vpc.yaml new file mode 100644 index 000000000..89e6c976b --- /dev/null +++ b/e2e/linodevpc-controller/minimal/03-verify-vpc.yaml @@ -0,0 +1,5 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: |- + URI="vpcs" FILTER="{\"label\":\"CLi$(OBJ=linodevpcs/linodevpc-sample make getKubeUid | sed 's/-//g')\"}" make callLinodeApiGet | grep 'results": 0' diff --git a/e2e/linodevpc-controller/minimal/Makefile b/e2e/linodevpc-controller/minimal/Makefile new file mode 100644 index 000000000..3924bfdc1 --- /dev/null +++ b/e2e/linodevpc-controller/minimal/Makefile @@ -0,0 +1 @@ +include ../../Makefile