Skip to content

Commit b85849e

Browse files
authored
CMP-3908: Remove auth header from metrics endpoint test (#859)
The TestResultsServerHTTPVersion test keeps failing with an error about not being able to run the curl command to query the metrics endpoint. The command tries to fish the sa token from disk, but it's returning an error code, which is tripping up the test (likely because the pod hasn't mounted the service account token?). Trying it without the auth header still returns the metrics, and simplifies the command.
1 parent 39ff148 commit b85849e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/e2e/framework/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ func (f *Framework) AssertMetricsEndpointUsesHTTPVersion(endpoint, version strin
367367
return err
368368
}
369369

370-
curlCMD := "curl -i -ks -H \"Authorization: Bearer `cat /var/run/secrets/kubernetes.io/serviceaccount/token`\" " + endpoint
370+
curlCMD := "curl -i -ks " + endpoint
371371
// We're just under test.
372372
// G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
373373
// #nosec

0 commit comments

Comments
 (0)