mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-05 20:07:20 +02:00
remove unnecessary code
This commit is contained in:
@@ -199,15 +199,7 @@ func (c *mockHttpClient) Do(req *http.Request) (*http.Response, error) {
|
||||
}
|
||||
|
||||
func TestHttpClientClose(t *testing.T) {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Header.Get("Authorization") != "Bearer "+token {
|
||||
t.Errorf("Authorization token is wrong or not provided")
|
||||
}
|
||||
w.WriteHeader(200)
|
||||
if _, err := fmt.Fprint(w, "{}"); err != nil {
|
||||
t.Errorf("Error writing teams api response %v", err)
|
||||
}
|
||||
}))
|
||||
ts := httptest.NewServer(nil)
|
||||
|
||||
api := NewTeamsAPI(ts.URL, logger)
|
||||
api.httpClient = &mockHttpClient{}
|
||||
|
||||
Reference in New Issue
Block a user