(t *testing.T)
| 185 | } |
| 186 | |
| 187 | func TestExecInspect(t *testing.T) { |
| 188 | const expectedURL = "/exec/exec_id/json" |
| 189 | client, err := New( |
| 190 | WithMockClient(func(req *http.Request) (*http.Response, error) { |
| 191 | if err := assertRequest(req, http.MethodGet, expectedURL); err != nil { |
| 192 | return nil, err |
| 193 | } |
| 194 | return mockJSONResponse(http.StatusOK, nil, container.ExecInspectResponse{ |
| 195 | ID: "exec_id", |
| 196 | ContainerID: "container_id", |
| 197 | })(req) |
| 198 | }), |
| 199 | ) |
| 200 | assert.NilError(t, err) |
| 201 | |
| 202 | inspect, err := client.ExecInspect(t.Context(), "exec_id", ExecInspectOptions{}) |
| 203 | assert.NilError(t, err) |
| 204 | assert.Check(t, is.Equal(inspect.ID, "exec_id")) |
| 205 | assert.Check(t, is.Equal(inspect.ContainerID, "container_id")) |
| 206 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…