mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
client test comment nits.
This commit is contained in:
parent
66bcb10f40
commit
4d47a48422
|
@ -289,13 +289,13 @@ func TestBearerAuthRoundTripper(t *testing.T) {
|
|||
}
|
||||
}, nil, nil)
|
||||
|
||||
//Normal flow
|
||||
// Normal flow.
|
||||
bearerAuthRoundTripper := NewBearerAuthRoundTripper(BearerToken, fakeRoundTripper)
|
||||
request, _ := http.NewRequest("GET", "/hitchhiker", nil)
|
||||
request.Header.Set("User-Agent", "Douglas Adams mind")
|
||||
bearerAuthRoundTripper.RoundTrip(request)
|
||||
|
||||
//Should honor already Authorization header set
|
||||
// Should honor already Authorization header set.
|
||||
bearerAuthRoundTripperShouldNotModifyExistingAuthorization := NewBearerAuthRoundTripper(newBearerToken, fakeRoundTripper)
|
||||
request, _ = http.NewRequest("GET", "/hitchhiker", nil)
|
||||
request.Header.Set("Authorization", ExpectedBearer)
|
||||
|
@ -315,13 +315,13 @@ func TestBearerAuthFileRoundTripper(t *testing.T) {
|
|||
}
|
||||
}, nil, nil)
|
||||
|
||||
//Normal flow
|
||||
// Normal flow.
|
||||
bearerAuthRoundTripper := NewBearerAuthFileRoundTripper(BearerTokenFile, fakeRoundTripper)
|
||||
request, _ := http.NewRequest("GET", "/hitchhiker", nil)
|
||||
request.Header.Set("User-Agent", "Douglas Adams mind")
|
||||
bearerAuthRoundTripper.RoundTrip(request)
|
||||
|
||||
//Should honor already Authorization header set
|
||||
// Should honor already Authorization header set.
|
||||
bearerAuthRoundTripperShouldNotModifyExistingAuthorization := NewBearerAuthFileRoundTripper(MissingBearerTokenFile, fakeRoundTripper)
|
||||
request, _ = http.NewRequest("GET", "/hitchhiker", nil)
|
||||
request.Header.Set("Authorization", ExpectedBearer)
|
||||
|
@ -347,14 +347,14 @@ func TestBasicAuthRoundTripper(t *testing.T) {
|
|||
}
|
||||
}, nil, nil)
|
||||
|
||||
//Normal flow
|
||||
// Normal flow.
|
||||
basicAuthRoundTripper := NewBasicAuthRoundTripper(ExpectedUsername,
|
||||
ExpectedPassword, fakeRoundTripper)
|
||||
request, _ := http.NewRequest("GET", "/hitchhiker", nil)
|
||||
request.Header.Set("User-Agent", "Douglas Adams mind")
|
||||
basicAuthRoundTripper.RoundTrip(request)
|
||||
|
||||
//Should honor already Authorization header set
|
||||
// Should honor already Authorization header set.
|
||||
basicAuthRoundTripperShouldNotModifyExistingAuthorization := NewBasicAuthRoundTripper(newUsername,
|
||||
newPassword, fakeRoundTripper)
|
||||
request, _ = http.NewRequest("GET", "/hitchhiker", nil)
|
||||
|
|
Loading…
Reference in a new issue