Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding e2e tests using kuttl #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions kuttl-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- ./tests/e2e/
timeout: 180
commands:
- command: kubectl wait --for=condition=ready --timeout=120s pod -l control-plane=controller-manager -n resource-manager-system
12 changes: 12 additions & 0 deletions tests/e2e/crd-test/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: resourcemanagers.resource-management.tikalk.com
status:
acceptedNames:
plural: resourcemanagers
singular: resourcemanager
kind: ResourceManager
listKind: ResourceManagerList
storedVersions:
- v1alpha1
7 changes: 7 additions & 0 deletions tests/e2e/create-deployment-in-test-ns/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: resource-manager-controller-manager
# namespace: resource-manager-system
status:
readyReplicas: 1
21 changes: 21 additions & 0 deletions tests/e2e/create-deployment-in-test-ns/00-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: resource-manager-controller-manager
# namespace: resource-manager-system
spec:
replicas: 1
selector:
matchLabels:
control-plane: controller-manager
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/managed-by: tilt
control-plane: controller-manager
tilt.dev/pod-template-hash: f8e210a1f1e86600dcad
spec:
containers:
- name: manager
image: k3d-local-k8s-reg:5000/controller:tilt-f86ed2c112b2af3e
6 changes: 6 additions & 0 deletions tests/e2e/namespace-status/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: resource-manager-system
status:
phase: Active
6 changes: 6 additions & 0 deletions tests/e2e/pod-status/00-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Pod
metadata:
namespace: resource-manager-system
status:
phase: Running