Skip to content

Agent Mesh

fix(ci,node): update azure/setup-helm SHA and speed up static service test

Antonio Ojea7fd2ebb6a95c
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 3e91002e..1e9f53e4 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -59,5 +59,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6
- - uses: azure/setup-helm@b7246d128d975101bfe09e346455915e8b907f92 # v4.3.0
+ - uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
- run: make helm-lint
diff --git a/internal/node/static_service_test.go b/internal/node/static_service_test.go
index a9ae79c2..f74fc55d 100644
--- a/internal/node/static_service_test.go
+++ b/internal/node/static_service_test.go
@@ -4,6 +4,7 @@ import (
"context"
"crypto/ed25519"
"crypto/rand"
+ "errors"
"io"
"net/http"
"net/http/httptest"
@@ -208,12 +209,14 @@ func TestStaticServiceRegistrationRequiresConnection(t *testing.T) {
},
}
- err = node.RegisterStaticServices(ctx, services)
+ ctxTimeout, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
+ defer cancel()
+ err = node.RegisterStaticServices(ctxTimeout, services)
if err == nil {
t.Fatal("Expected RegisterStaticServices to fail before connecting to hub, but it succeeded")
}
- if !strings.Contains(err.Error(), "timeout waiting for DHT to be ready") {
- t.Fatalf("Expected error to contain 'timeout waiting for DHT to be ready', got: %v", err)
+ if !strings.Contains(err.Error(), "timeout waiting for DHT to be ready") && !errors.Is(err, context.DeadlineExceeded) {
+ t.Fatalf("Expected error to indicate timeout or deadline exceeded, got: %v", err)
}
// 6. Now enroll and connect to hub (which sets up DHT and hub connection)