mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-01 03:07:04 +02:00
start all the log messages with lowercase letters
This commit is contained in:
@@ -69,7 +69,7 @@ func (t *API) TeamInfo(teamID, token string) (tm *Team, err error) {
|
||||
)
|
||||
|
||||
url := fmt.Sprintf("%s/teams/%s", t.url, teamID)
|
||||
t.logger.Debugf("Request url: %s", url)
|
||||
t.logger.Debugf("request url: %s", url)
|
||||
req, err = http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
@@ -133,7 +133,7 @@ var requestsURLtc = []struct {
|
||||
}{
|
||||
{
|
||||
"coffee://localhost/",
|
||||
fmt.Errorf(`Get coffee://localhost/teams/acid: unsupported protocol scheme "coffee"`),
|
||||
fmt.Errorf(`get coffee://localhost/teams/acid: unsupported protocol scheme "coffee"`),
|
||||
},
|
||||
{
|
||||
"http://192.168.0.%31/",
|
||||
@@ -146,11 +146,11 @@ func TestInfo(t *testing.T) {
|
||||
func() {
|
||||
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")
|
||||
t.Errorf("authorization token is wrong or not provided")
|
||||
}
|
||||
w.WriteHeader(tc.inCode)
|
||||
if _, err := fmt.Fprint(w, tc.in); err != nil {
|
||||
t.Errorf("Error writing teams api response %v", err)
|
||||
t.Errorf("error writing teams api response %v", err)
|
||||
}
|
||||
}))
|
||||
defer ts.Close()
|
||||
@@ -158,12 +158,12 @@ func TestInfo(t *testing.T) {
|
||||
|
||||
actual, err := api.TeamInfo("acid", token)
|
||||
if err != nil && err.Error() != tc.err.Error() {
|
||||
t.Errorf("Expected error: %v, got: %v", tc.err, err)
|
||||
t.Errorf("expected error: %v, got: %v", tc.err, err)
|
||||
return
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(actual, tc.out) {
|
||||
t.Errorf("Expected %#v, got: %#v", tc.out, actual)
|
||||
t.Errorf("expected %#v, got: %#v", tc.out, actual)
|
||||
}
|
||||
}()
|
||||
}
|
||||
@@ -205,7 +205,7 @@ func TestHttpClientClose(t *testing.T) {
|
||||
_, err := api.TeamInfo("acid", token)
|
||||
expError := fmt.Errorf("error when closing response: close error")
|
||||
if err.Error() != expError.Error() {
|
||||
t.Errorf("Expected error: %v, got: %v", expError, err)
|
||||
t.Errorf("expected error: %v, got: %v", expError, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,12 +214,12 @@ func TestRequest(t *testing.T) {
|
||||
api := NewTeamsAPI(tc.url, logger)
|
||||
resp, err := api.TeamInfo("acid", token)
|
||||
if resp != nil {
|
||||
t.Errorf("Response expected to be nil")
|
||||
t.Errorf("response expected to be nil")
|
||||
continue
|
||||
}
|
||||
|
||||
if err.Error() != tc.err.Error() {
|
||||
t.Errorf("Expected error: %v, got: %v", tc.err, err)
|
||||
t.Errorf("expected error: %v, got: %v", tc.err, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestRandomPassword(t *testing.T) {
|
||||
const pwdLength = 10
|
||||
pwd := RandomPassword(pwdLength)
|
||||
if a := len(pwd); a != pwdLength {
|
||||
t.Errorf("Password length expected: %d, got: %d", pwdLength, a)
|
||||
t.Errorf("password length expected: %d, got: %d", pwdLength, a)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user