From fccfeffca2640e3ed93d2d6da65669b97228b9b6 Mon Sep 17 00:00:00 2001 From: UnicornChance Date: Thu, 17 Oct 2024 14:37:09 -0600 Subject: [PATCH] wip: working ci and local tests from tasks --- .../loki/{e2e-configmap.yaml => configmap.yaml} | 0 e2e/k8s/loki/{e2e-jobs.yaml => jobs.yaml} | 0 src/loki/tasks.yaml | 7 +++++-- tasks/test.yaml | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) rename e2e/k8s/loki/{e2e-configmap.yaml => configmap.yaml} (100%) rename e2e/k8s/loki/{e2e-jobs.yaml => jobs.yaml} (100%) diff --git a/e2e/k8s/loki/e2e-configmap.yaml b/e2e/k8s/loki/configmap.yaml similarity index 100% rename from e2e/k8s/loki/e2e-configmap.yaml rename to e2e/k8s/loki/configmap.yaml diff --git a/e2e/k8s/loki/e2e-jobs.yaml b/e2e/k8s/loki/jobs.yaml similarity index 100% rename from e2e/k8s/loki/e2e-jobs.yaml rename to e2e/k8s/loki/jobs.yaml diff --git a/src/loki/tasks.yaml b/src/loki/tasks.yaml index f90b775f8..d73755158 100644 --- a/src/loki/tasks.yaml +++ b/src/loki/tasks.yaml @@ -25,11 +25,11 @@ tasks: namespace: loki condition: Ready - - name: e2e-test + - name: e2e-k8s-tests actions: - description: "Apply Configmap and jobs for Loki e2e tests." cmd: | - kubectl apply -f e2e/k8s/loki/e2e-configmap.yaml && kubectl apply -f e2e/k8s/loki/e2e-jobs.yaml + kubectl apply -f e2e/k8s/loki/configmap.yaml -f e2e/k8s/loki/jobs.yaml - description: Loki E2E - Retention Test wait: cluster: @@ -58,3 +58,6 @@ tasks: name: job-name=validate-vector-logs-job namespace: loki condition: Complete + - description: Loki E2E - Cleanup Tests + cmd: | + kubectl delete -f e2e/k8s/loki/configmap.yaml -f e2e/k8s/loki/jobs.yaml diff --git a/tasks/test.yaml b/tasks/test.yaml index 449fddbf2..67e9232c4 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -52,6 +52,20 @@ tasks: done set +e + - name: e2e-tests + description: "E2E Test all packages" + # Run each e2e test type from the e2e folder + actions: + # Requires task named e2e-k8s-tests in package task file + - description: "Run K8s E2E Tests" + cmd: | + for package in src/*; do + if grep -q '\- name: e2e-k8s-test' "${package}/tasks.yaml"; then + uds run -f "${package}/tasks.yaml" e2e-k8s-tests --no-progress + fi + done + set +e + - name: uds-core description: "Build and test UDS Core" actions: