فهرست منبع

fix(e2e): allow debugging e2e tests

Signed-off-by: squat <lserven@gmail.com>
squat 2 ماه پیش
والد
کامیت
dfec2e3a3f
3فایلهای تغییر یافته به همراه15 افزوده شده و 1 حذف شده
  1. 9 1
      .github/workflows/ci.yml
  2. 3 0
      e2e/multi-cluster.sh
  3. 3 0
      e2e/teardown.sh

+ 9 - 1
.github/workflows/ci.yml

@@ -95,7 +95,15 @@ jobs:
             VERSION=${{ github.sha }}
       - uses: DeterminateSystems/determinate-nix-action@v3.15.1
       - uses: DeterminateSystems/magic-nix-cache-action@v13
-      - run: nix develop . --command make e2e
+      - env:
+          E2E_SKIP_TEARDOWN_ON_FAILURE: "true"
+        run: nix develop . --command make e2e
+      - name: Breakpoint if tests failed
+        if: failure()
+        uses: namespacelabs/breakpoint-action@v0
+        with:
+          duration: 15m
+          authorized-users: squat, leonnicolas
 
   lint:
     runs-on: ubuntu-latest

+ 3 - 0
e2e/multi-cluster.sh

@@ -58,6 +58,9 @@ EOF
 }
 
 teardown_suite () {
+	if [ -n "$E2E_SKIP_TEARDOWN_ON_FAILURE" ]; then
+		return
+	fi
 	# Remove the nodes in cluster2 as peers of cluster1.
 	for n in $(KUBECONFIG=$KUBECONFIG2 _kubectl get no -o name | cut -d'/' -f2); do
 		_kubectl delete peer "$n"

+ 3 - 0
e2e/teardown.sh

@@ -3,5 +3,8 @@
 . lib.sh
 
 teardown_suite () {
+	if [ -n "$E2E_SKIP_TEARDOWN_ON_FAILURE" ]; then
+		return
+	fi
 	delete_cluster
 }