Skip to content

Commit

Permalink
Working changes to the new e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaja Omer committed Sep 10, 2024
1 parent 9b65ff6 commit e85b692
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
LINODE_CONTROL_PLANE_MACHINE_TYPE: g6-standard-2
LINODE_MACHINE_TYPE: g6-standard-2
WORKER_NODES: ${{ github.ref == 'refs/heads/main' && '3' || '0' }}
E2E_SELECTOR: ${{ github.ref == 'refs/heads/main' && 'all' || 'quick' }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -68,8 +69,6 @@ jobs:
run: devbox run mgmt-and-capl-cluster

- name: Run E2E Tests
env:
E2E_SELECTOR: ${{ github.ref == 'refs/heads/main' && 'all' || 'quick' }}
run: devbox run e2e-test

- name: Run CSI-Sanity Tests
Expand Down
29 changes: 25 additions & 4 deletions tests/e2e/test/pod-pvc-luks-mov-volume/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
name: pod-pvc-luks-mov-volume
labels:
all:
volumemove:
spec:
bindings:
- name: lukskey
Expand Down Expand Up @@ -110,10 +111,10 @@ spec:
try:
- patch:
resource:
apiVersion: v1
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-statefulset
name: test-statefulset
spec:
template:
spec:
Expand All @@ -124,6 +125,16 @@ spec:
- matchExpressions:
- key: node-role.kubernetes.io/control-plane
operator: DoesNotExist
- name: Rollout restart the statefulset
try:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl rollout restart statefulset test-statefulset -n $NAMESPACE
check:
($error): ~
- name: Check if Pod is ready and Volume is mounted (On worker node)
try:
- assert:
Expand Down Expand Up @@ -176,7 +187,7 @@ spec:
try:
- patch:
resource:
apiVersion: v1
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-statefulset
Expand All @@ -194,6 +205,16 @@ spec:
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- name: Rollout restart the statefulset
try:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl rollout restart statefulset test-statefulset -n $NAMESPACE
check:
($error): ~
- name: Check if Pod is ready and Volume is mounted (after moving back to control plane node)
try:
- assert:
Expand Down Expand Up @@ -246,7 +267,7 @@ spec:
try:
- delete:
ref:
apiVersion: v1
apiVersion: apps/v1
kind: StatefulSet
- name: Check if the volume is detached on Node resource and in Linode (using API)
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
labels:
app: example
spec:
ffinity:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
Expand Down

0 comments on commit e85b692

Please sign in to comment.