Skip to content

Commit

Permalink
Update configuration_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanHorlamus authored Jan 2, 2024
1 parent f5c95ef commit 1a5f0e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestClient_GetConfigurationWithLabel(t *testing.T) {
}{
{
name: "Get Config",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile"},
checker: func(t *testing.T, request *http.Request) {
Expand All @@ -142,7 +142,7 @@ func TestClient_GetConfigurationWithLabel(t *testing.T) {
},
{
name: "Multiple Profiles",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile1", "profile2", "profile3"},
checker: func(t *testing.T, request *http.Request) {
Expand All @@ -157,31 +157,31 @@ func TestClient_GetConfigurationWithLabel(t *testing.T) {
},
{
name: "Not Found",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile"},
response: NewMockHttpResponse(http.StatusNotFound, ""),
err: errors.New("failed to find configuration for application appName with profiles [profile]"),
},
{
name: "Server Error",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile"},
response: NewMockHttpResponse(http.StatusInternalServerError, ""),
err: errors.New("server responded with status code '500' and body ''"),
},
{
name: "No Response Body",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile"},
response: NewMockHttpResponse(http.StatusOK, ""),
err: errors.New("failed to decode response from url: EOF"),
},
{
name: "HTTP Error",
label: "master"
label: "master",
application: "appName",
profiles: []string{"profile"},
err: errors.New("failed to retrieve from http://localhost:8888/appName/profile/master: Get \"http://localhost:8888/appName/profile/master\": http: RoundTripper implementation (cloudconfigclient_test.RoundTripFunc) returned a nil *Response with a nil error"),
Expand Down

0 comments on commit 1a5f0e9

Please sign in to comment.