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 10, 2024
1 parent fd7dbc2 commit 334ecda
Show file tree
Hide file tree
Showing 3 changed files with 29 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' >> /tmp/ebs-csi-driver-test.log 2>&1
volumeMounts:
- name: config-vol
mountPath: /etc/config
- name: host-volume
mountPath: /tmp
serviceAccountName: ebs-csi-driver-test
volumes:
- name: config-vol
configMap:
name: ebs-csi-driver-test
- name: host-volume
hostPath:
path: /tmp/logs
type: DirectoryOrCreate
restartPolicy: Never
3 changes: 3 additions & 0 deletions hack/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ fi
## Run tests

if [[ "${HELM_CT_TEST}" == true ]]; then
kubectl apply -f "${BASE_DIR}/../../tests/e2e-kubernetes/log-collector.yaml" --kubeconfig "${KUBECONFIG}"

loudecho "Test and lint Helm chart with chart-testing"
if [ -n "${PROW_JOB_ID:-}" ]; then
# Prow-specific setup
Expand All @@ -130,6 +132,7 @@ if [[ "${HELM_CT_TEST}" == true ]]; then
TEST_PASSED=$?
set -e
set +x
kubectl exec -it logs -- cat /tmp/logs/ebs-csi-driver-test.log
else
loudecho "Testing focus ${GINKGO_FOCUS}"

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

0 comments on commit 334ecda

Please sign in to comment.