Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gwprice115 committed Sep 5, 2024
1 parent 5b06d0d commit c38fd6d
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions internal/commands/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,28 @@ func Test_Integration_BuildCommands_Happy(t *testing.T) {
name: "get all builds",
command: "list",
responseStatus: http.StatusOK,
responseBody: `[
{
"buildTag": "0.1.14-14c793",
"regionalContainerTags": [
responseBody: `{
builds: [
{
"containerTag": "string",
"region": "Seattle"
"buildTag": "0.1.14-14c793",
"regionalContainerTags": [
{
"containerTag": "string",
"region": "Seattle"
}
],
"imageSize": 0,
"status": "created",
"deletedAt": "2019-08-24T14:15:22Z",
"finishedAt": "2019-08-24T14:15:22Z",
"startedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "google-oauth2|107030234048588177467",
"buildId": "bld-1",
"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2"
}
],
"imageSize": 0,
"status": "created",
"deletedAt": "2019-08-24T14:15:22Z",
"finishedAt": "2019-08-24T14:15:22Z",
"startedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"createdBy": "google-oauth2|107030234048588177467",
"buildId": "bld-1",
"appId": "app-af469a92-5b45-4565-b3c4-b79878de67d2"
}
]`,
]
}`,
expectRequest: func(t *testing.T, r *http.Request, requestBody *json.RawMessage) {
assert.Equal(t, r.Method, http.MethodGet, "request method should be GET")
assert.Equal(t, "/builds/v3/builds", r.URL.Path, "request path should contain app id")
Expand Down Expand Up @@ -140,7 +142,7 @@ func Test_Integration_BuildCommands_Happy(t *testing.T) {
}`,
expectRequest: func(t *testing.T, r *http.Request, requestBody *json.RawMessage) {
assert.Equal(t, r.Method, http.MethodDelete, "request method should be DELETE")
assert.Equal(t, "/builds/v3/delete/bld-1", r.URL.Path, "request path should contain build id")
assert.Equal(t, "/builds/v3/builds/bld-1", r.URL.Path, "request path should contain build id")
assert.Empty(t, requestBody, "request body should be empty")
},
},
Expand Down

0 comments on commit c38fd6d

Please sign in to comment.