Преглед на файлове

test(e2e): cover the dependencies each leg does not name

Audited every leg's spec imports and the provider code it drives through the controller against
its globs. Four real dependencies were uncovered: the grafana leg reaches the generator suite's
bootstrap and shared assertion helper, flux and argocd both drive the fake provider case, and
core-smoke drives the fake and kubernetes providers.

Compile breakage is out of scope here: the build job sits outside the matrix and compiles every
suite binary on every run, so this is about what each leg exercises at runtime.

Refs: external-secrets/external-secrets#6785
Signed-off-by: Alexander Chernov <alexander@chernov.it>
Alexander Chernov преди 1 месец
родител
ревизия
8ededc85cf
променени са 2 файла, в които са добавени 19 реда и са изтрити 1 реда
  1. 8 0
      e2e/matrix.py
  2. 11 1
      e2e/matrix.yaml

+ 8 - 0
e2e/matrix.py

@@ -255,6 +255,14 @@ SELFTEST_CASES: list[tuple[list[str], set[str] | None]] = [
     (["e2e/entrypoint.sh"], ALL),
     (["e2e/k8s/vault.values.yaml"], ALL),
     (["e2e/kind.yaml"], ALL),
+    # Found by auditing each leg's imports against its globs: these four
+    # dependencies are real but not obvious from the leg's name.
+    (["e2e/suites/generator/testcase.go"],
+     {"core-smoke", "generator", "grafana"}),
+    (["e2e/suites/provider/cases/fake/fake.go"],
+     {"core-smoke", "flux", "argocd"}),
+    (["providers/v1/kubernetes/client.go"], {"core-smoke"}),
+    (["providers/v1/fake/fake.go"], {"core-smoke"}),
     # Unrelated changes still run the floor, never an empty matrix. e2e docs
     # are deliberately not shared machinery.
     (["docs/introduction/faq.md"], {"core-smoke"}),

+ 11 - 1
e2e/matrix.yaml

@@ -95,6 +95,11 @@ areas:
       - "e2e/suites/provider/cases/kubernetes/**"
       - "e2e/suites/provider/cases/template/**"
       - "e2e/suites/provider/cases/common/**"
+      # The providers these specs drive through the controller. Listed even
+      # though always: true already forces this leg, so coverage does not
+      # silently depend on that flag staying set.
+      - "providers/v1/fake/**"
+      - "providers/v1/kubernetes/**"
     always: true
     enabled: true
 
@@ -270,7 +275,10 @@ areas:
     needs_secrets: true
     paths:
       - "generators/v1/grafana/**"
-      - "e2e/suites/generator/grafana.go"
+      # The whole suite dir, not just grafana.go: the bootstrap and the shared
+      # assertion helper live beside it, and naming files one by one would miss
+      # the next shared one somebody adds.
+      - "e2e/suites/generator/**"
     enabled: true
 
   - name: flux
@@ -284,6 +292,7 @@ areas:
       - "pkg/**"
       - "runtime/**"
       - "e2e/suites/flux/**"
+      - "e2e/suites/provider/cases/fake/**" # flux.go drives the fake provider
     enabled: true
 
   - name: argocd
@@ -297,4 +306,5 @@ areas:
       - "pkg/**"
       - "runtime/**"
       - "e2e/suites/argocd/**"
+      - "e2e/suites/provider/cases/fake/**" # argocd.go drives the fake provider
     enabled: true