Răsfoiți Sursa

test: drop the live-GitHub assertion from the netgrip kind test (#380)

updateAvailable for netgrip compares against the real latest
NetGrip release (cached); asserting on it made the test depend on
the outside release state (broke the moment v0.24.0 shipped). The
semver comparison itself is covered by the internal unit tests.

Co-authored-by: gnacho <hnacho@proton.me>
Nacho 3 luni în urmă
părinte
comite
d915dfa087
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      server-go/internal/httpapi/agent_kind_test.go

+ 3 - 3
server-go/internal/httpapi/agent_kind_test.go

@@ -41,9 +41,9 @@ func TestAgentsNetgripKind(t *testing.T) {
 	if patio["version"] != "0.23.0" {
 		t.Fatalf("patio version: %v", patio["version"])
 	}
-	if upd, ok := patio["updateAvailable"].(bool); ok && upd {
-		t.Fatalf("con netgrip latest 0.22.1 y router en 0.23.0 no debe ofrecer upgrade: %v", patio)
-	}
+	// updateAvailable para netgrip depende de la latest release REAL de
+	// NetGrip en GitHub (cache 5 min): NO se asserting aquí (la comparación
+	// semver está unit-testeada en TestNetgripLatestCacheAndCmp, interno).
 
 	post := func(path string) int {
 		req, _ := http.NewRequest("POST", ts.URL+path, nil)