From fd2ebce8e128788fa4ef15e11333643c1d385325 Mon Sep 17 00:00:00 2001 From: Test Date: Thu, 3 Sep 2026 09:10:15 -0700 Subject: [PATCH] fix: flaky TestGetPendingGates - add status assertion --- internal/approval/gate_test.go | 4 +++- k8s/git-commit.yaml | 2 +- k8s/worker-deployment.yaml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/approval/gate_test.go b/internal/approval/gate_test.go index 3cfef87..157be5e 100644 --- a/internal/approval/gate_test.go +++ b/internal/approval/gate_test.go @@ -47,7 +47,9 @@ func TestGetPendingGates(t *testing.T) { pending := manager.GetPendingGates() assert.Equal(t, 1, len(pending)) if len(pending) > 0 { - assert.Equal(t, gate2.ID, pending[0].ID) + // Don't rely on map iteration order - just check it's the unapproved gate + assert.Equal(t, StatusPending, pending[0].Decision.Status) + assert.Equal(t, gate2.ID, pending[0].ID) // gate2 is the only pending one } } diff --git a/k8s/git-commit.yaml b/k8s/git-commit.yaml index 8e06723..364b2b5 100644 --- a/k8s/git-commit.yaml +++ b/k8s/git-commit.yaml @@ -9,6 +9,6 @@ metadata: app.kubernetes.io/name: poimen app.kubernetes.io/component: orchestrator data: - GIT_COMMIT: "e82600c1" # Updated automatically by CI/CD + GIT_COMMIT: "b37319a9" # Updated automatically by CI/CD GIT_BRANCH: "main" DEPLOYMENT_DATE: "2026-09-03" diff --git a/k8s/worker-deployment.yaml b/k8s/worker-deployment.yaml index c7a2e42..f69a5f1 100644 --- a/k8s/worker-deployment.yaml +++ b/k8s/worker-deployment.yaml @@ -13,7 +13,7 @@ spec: labels: app: poimen-worker annotations: - git-commit: "e82600c1" # ✅ Updated on each push, triggers rolling restart + git-commit: "b37319a9" # ✅ Updated on each push, triggers rolling restart deployment-date: "2026-09-03" spec: containers: