feat(depends): fixes the tests

This commit is contained in:
2026-03-17 10:46:54 +01:00
parent b40378ec23
commit 7ee6b74b10

View File

@@ -155,8 +155,8 @@ services:
t.Errorf("Expected curl command (K8s API method), got %s", fullCommand) t.Errorf("Expected curl command (K8s API method), got %s", fullCommand)
} }
if !strings.Contains(fullCommand, "/api/v1/namespaces/") { if !strings.Contains(fullCommand, "/apis/apps/v1/namespaces/") {
t.Errorf("Expected Kubernetes API call to /api/v1/namespaces/, got %s", fullCommand) t.Errorf("Expected Kubernetes API call to /apis/apps/v1/namespaces/, got %s", fullCommand)
} }
if !strings.Contains(fullCommand, "/deployments/") { if !strings.Contains(fullCommand, "/deployments/") {
@@ -719,8 +719,8 @@ services:
} }
rule := role.Rules[0] rule := role.Rules[0]
if !contains(rule.APIGroups, "") { if !contains(rule.APIGroups, "apps") {
t.Error("Expected APIGroup to include core API ('')") t.Error("Expected APIGroup to include 'apps'")
} }
if !contains(rule.Resources, "deployments") { if !contains(rule.Resources, "deployments") {
t.Errorf("Expected Resource to include 'deployments', got %v", rule.Resources) t.Errorf("Expected Resource to include 'deployments', got %v", rule.Resources)
@@ -807,8 +807,8 @@ services:
if !strings.Contains(fullCommand, "curl") { if !strings.Contains(fullCommand, "curl") {
t.Error("Expected init container to use curl for K8s API calls") t.Error("Expected init container to use curl for K8s API calls")
} }
if !strings.Contains(fullCommand, "/api/v1/namespaces/") { if !strings.Contains(fullCommand, "/apis/apps/v1/namespaces/") {
t.Error("Expected init container to call /api/v1/namespaces/ endpoint") t.Error("Expected init container to call /apis/apps/v1/namespaces/ endpoint")
} }
if !strings.Contains(fullCommand, "/deployments/") { if !strings.Contains(fullCommand, "/deployments/") {
t.Error("Expected init container to access /deployments/ resource") t.Error("Expected init container to access /deployments/ resource")