Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Torres <[email protected]>
  • Loading branch information
torredil committed Jan 11, 2024
1 parent fd7dbc2 commit d6c9b5e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
8 changes: 7 additions & 1 deletion charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,19 @@ spec:
SNAPSHOTS="|snapshot fields"
fi
export FOCUS_REGEX="\bebs.csi.aws.com\b.+(validate content|resize volume|offline PVC|AllowedTopologies|store data$SNAPSHOTS)"
kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version=$(curl -L https://dl.k8s.io/release/stable-1.28.txt) --skip-regex='\[Disruptive\]|\[Serial\]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml'
kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version=$(curl -L https://dl.k8s.io/release/stable-1.29.txt) --skip-regex='\[Disruptive\]|\[Serial\]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml' >> /workspace/ebs-csi-driver-test.log 2>&1
volumeMounts:
- name: config-vol
mountPath: /etc/config
- name: host-volume
mountPath: /workspace
serviceAccountName: ebs-csi-driver-test
volumes:
- name: config-vol
configMap:
name: ebs-csi-driver-test
- name: host-volume
hostPath:
path: /tmp
type: DirectoryOrCreate
restartPolicy: Never
9 changes: 9 additions & 0 deletions hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ if [[ "${HELM_CT_TEST}" == true ]]; then
TEST_PASSED=$?
set -e
set +x
echo "starting log collector pod"
sleep 30
kubectl apply -f "${BASE_DIR}/../../tests/e2e-kubernetes/log-collector.yaml" --kubeconfig "${KUBECONFIG}"
sleep 30
echo "ls root"
kubectl exec --kubeconfig "${KUBECONFIG}" -it log-retrieval-pod -n kube-system -- ls
echo "ls /tmp"
kubectl exec --kubeconfig "${KUBECONFIG}" -it log-retrieval-pod -n kube-system -- ls /tmp

else
loudecho "Testing focus ${GINKGO_FOCUS}"

Expand Down
20 changes: 20 additions & 0 deletions tests/e2e-kubernetes/log-collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Pod
metadata:
name: log-retrieval-pod
namespace: kube-system
spec:
containers:
- name: log-retriever
image: alpine
command: ["/bin/sh", "-c"]
args: ["tail -f /dev/null"]
volumeMounts:
- name: host-volume
mountPath: /tmp
volumes:
- name: host-volume
hostPath:
path: /tmp
type: Directory
restartPolicy: Never

0 comments on commit d6c9b5e

Please sign in to comment.