Skip to content

Commit f154a5b

Browse files
authored
acc: log query parameters when recording requests (#3813)
## Why Query is part of the request. We log path and payload, we should log query as well (e.g. for purposes of comparing terraform and direct requests). ## Tests Existing tests.
1 parent 6b88536 commit f154a5b

File tree

39 files changed

+421
-83
lines changed

39 files changed

+421
-83
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"method": "POST",
33
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files/app/app.yml",
4+
"q": {
5+
"overwrite": "true"
6+
},
47
"raw_body": "command:\n - python\n - app.py\n"
58
}

acceptance/bundle/artifacts/artifact_upload_for_volumes/output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ Deployment complete!
6969
{
7070
"method": "PUT",
7171
"path": "/api/2.0/fs/files/Volumes/foo/bar/artifacts/.internal/source.whl",
72+
"q": {
73+
"overwrite": "true"
74+
},
7275
"raw_body": "test wheel content\n"
7376
}

acceptance/bundle/libraries/outside_of_bundle_root/output.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ Deployment complete!
2424
>>> cat out.requests.txt
2525
{
2626
"method": "POST",
27-
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/outside_of_bundle_root/default/artifacts/.internal/test.whl"
27+
"path": "/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/outside_of_bundle_root/default/artifacts/.internal/test.whl",
28+
"q": {
29+
"overwrite": "true"
30+
}
2831
}

acceptance/bundle/resource_deps/bad_ref_string_to_int/out.requests.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@
44
}
55
{
66
"method": "GET",
7-
"path": "/api/2.0/workspace/get-status"
7+
"path": "/api/2.0/workspace/get-status",
8+
"q": {
9+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json",
10+
"return_export_info": "true"
11+
}
812
}
913
{
1014
"method": "GET",
11-
"path": "/api/2.0/workspace/get-status"
15+
"path": "/api/2.0/workspace/get-status",
16+
"q": {
17+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deployment.json",
18+
"return_export_info": "true"
19+
}
1220
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[Repls]]
2+
Old = 'terraform.tfstate'
3+
New = 'resources.json'

acceptance/bundle/resource_deps/missing_ingestion_definition/out.requests.txt

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
}
55
{
66
"method": "GET",
7-
"path": "/api/2.0/workspace/get-status"
7+
"path": "/api/2.0/workspace/get-status",
8+
"q": {
9+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
10+
}
811
}
912
{
1013
"method": "POST",
@@ -15,17 +18,28 @@
1518
}
1619
{
1720
"method": "GET",
18-
"path": "/api/2.0/workspace/get-status"
21+
"path": "/api/2.0/workspace/get-status",
22+
"q": {
23+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
24+
}
1925
}
2026
{
2127
"method": "GET",
2228
"path": "/api/2.0/preview/scim/v2/Me"
2329
}
2430
{
2531
"method": "GET",
26-
"path": "/api/2.0/workspace/get-status"
32+
"path": "/api/2.0/workspace/get-status",
33+
"q": {
34+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json",
35+
"return_export_info": "true"
36+
}
2737
}
2838
{
2939
"method": "GET",
30-
"path": "/api/2.0/workspace/get-status"
40+
"path": "/api/2.0/workspace/get-status",
41+
"q": {
42+
"path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/deployment.json",
43+
"return_export_info": "true"
44+
}
3145
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
Badness = "In TF error message talks about ingestion_definition being a list which is not the case. In direct error message says 'on invalid' which is confusing, should say about ingestion_definition being nil"
2+
3+
[[Repls]]
4+
Old = 'terraform.tfstate'
5+
New = 'resources.json'

acceptance/bundle/resource_deps/remote_app_url/output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ Deployment complete!
4848
{
4949
"method": "POST",
5050
"path": "/api/2.0/apps",
51+
"q": {
52+
"no_compute": "true"
53+
},
5154
"body": {
5255
"description": "best app",
5356
"name": "myapp"

acceptance/bundle/resources/apps/default_description/output.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Deployment complete!
99
{
1010
"method": "POST",
1111
"path": "/api/2.0/apps",
12+
"q": {
13+
"no_compute": "true"
14+
},
1215
"body": {
1316
"description": "",
1417
"name": "myappname"

acceptance/bundle/resources/apps/update/output.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ Deployment complete!
1717
"name": "myappname"
1818
},
1919
"method": "POST",
20-
"path": "/api/2.0/apps"
20+
"path": "/api/2.0/apps",
21+
"q": {
22+
"no_compute": "true"
23+
}
2124
}
2225

2326
>>> [CLI] bundle summary
@@ -106,7 +109,10 @@ Deployment complete!
106109
"name": "mynewappname"
107110
},
108111
"method": "POST",
109-
"path": "/api/2.0/apps"
112+
"path": "/api/2.0/apps",
113+
"q": {
114+
"no_compute": "true"
115+
}
110116
}
111117

112118
>>> [CLI] bundle plan

0 commit comments

Comments
 (0)