Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker_provider.go #16

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/status/external/docker_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (d *DockerProvider) Status(req Request) (*Response, error) {
Timeout: d.TimeOut,
}

resp, err := client.Get("http://localhost/v1.22/containers/json")
resp, err := client.Get("http://localhost/v1.24/containers/json")
if err != nil {
return nil, fmt.Errorf("docker request failed: %s %s: %w", req.Name, req.URL, err)
}
Expand Down
4 changes: 2 additions & 2 deletions app/status/external/docker_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestDockerProvider_Status(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/v1.22/containers/json", r.URL.Path)
require.Equal(t, "/v1.24/containers/json", r.URL.Path)
time.Sleep(time.Millisecond * 10)
w.WriteHeader(http.StatusOK)
data, err := os.ReadFile("testdata/containers.json")
Expand All @@ -40,7 +40,7 @@ func TestDockerProvider_StatusWithRequired(t *testing.T) {
ts := httptest.NewServer(
http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/v1.22/containers/json", r.URL.Path)
require.Equal(t, "/v1.24/containers/json", r.URL.Path)
time.Sleep(time.Millisecond * 10)
w.WriteHeader(http.StatusOK)
data, err := os.ReadFile("testdata/containers.json")
Expand Down
Loading