Skip to content

Commit 985422f

Browse files
committed
feat(tests): environment-agnostic VCR cassette normalization
Add configure_normalization() to vcrpy_utils that rewrites all environment-specific values to canonical local equivalents during cassette recording. Normalization covers: - Request URIs: staging host -> http://localhost:3000 - Request bodies: org_id, org_name in JSON payloads (bytes + str) - Response bodies: all env-specific values (bytes + str) - Response headers: Location headers with org_id paths When running against local, the replacements list is empty (no-op). IMPORTANT: When modifying tests-support, clear caches first: rm -rf packages/gooddata-sdk/.tox uv cache clean tests-support --force risk: low
1 parent 2c2a7ae commit 985422f

File tree

378 files changed

+46043
-41119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+46043
-41119
lines changed

packages/gooddata-fdw/tests/execute/fixtures/execute_compute_table_all_columns.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ interactions:
103103
X-Content-Type-Options:
104104
- nosniff
105105
X-Gdc-Cancel-Token:
106-
- 4b12a06a-487e-46d5-9d60-488e15b57c40
106+
- c1b88009-aa3c-4c0e-bb48-78274460f84b
107107
X-GDC-TRACE-ID: *id001
108108
X-Xss-Protection:
109109
- '0'
@@ -155,10 +155,10 @@ interactions:
155155
name: Revenue
156156
localIdentifier: dim_1
157157
links:
158-
executionResult: f6a00a91124ea1040b01c1b8831adb92ba7f5ba4:e6b88a13de23c82db3678aa8f42c5d60a1b645f5fa3d308fbe393dd69ac4e41f
158+
executionResult: 17112be1dce1186b2e9e8eb98df13f98a25d1d00:1c2fc9fbe88951356b3be5d25ac6e7159b8aad520c09e7ae35e5a303017159a1
159159
- request:
160160
method: GET
161-
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/f6a00a91124ea1040b01c1b8831adb92ba7f5ba4%3Ae6b88a13de23c82db3678aa8f42c5d60a1b645f5fa3d308fbe393dd69ac4e41f?offset=0%2C0&limit=512%2C256
161+
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/17112be1dce1186b2e9e8eb98df13f98a25d1d00%3A1c2fc9fbe88951356b3be5d25ac6e7159b8aad520c09e7ae35e5a303017159a1?offset=0%2C0&limit=512%2C256
162162
body: null
163163
headers:
164164
Accept:

packages/gooddata-fdw/tests/execute/fixtures/execute_compute_table_metrics_only.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ interactions:
8989
X-Content-Type-Options:
9090
- nosniff
9191
X-Gdc-Cancel-Token:
92-
- 79955fb8-cc71-4521-9c15-675b013d1c74
92+
- 7b8c4edb-2f26-49b0-8cc1-fd631b548f92
9393
X-GDC-TRACE-ID: *id001
9494
X-Xss-Protection:
9595
- '0'
@@ -109,10 +109,10 @@ interactions:
109109
name: Revenue
110110
localIdentifier: dim_0
111111
links:
112-
executionResult: 56975cbe08024d150757b5a5de1b64c3e3948ff1:8e1cadd7ffa3122dec261230119d721fb0982535710e64bc682a98d4b800bd8a
112+
executionResult: 368f0773c497d83261529bc36e3e3a1688d12f22:1b533f8295a523dd72fbb987eef7bf236400f0ca9829302a2d627c2af9c777df
113113
- request:
114114
method: GET
115-
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/56975cbe08024d150757b5a5de1b64c3e3948ff1%3A8e1cadd7ffa3122dec261230119d721fb0982535710e64bc682a98d4b800bd8a?offset=0&limit=256
115+
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/368f0773c497d83261529bc36e3e3a1688d12f22%3A1b533f8295a523dd72fbb987eef7bf236400f0ca9829302a2d627c2af9c777df?offset=0&limit=256
116116
body: null
117117
headers:
118118
Accept:

packages/gooddata-fdw/tests/execute/fixtures/execute_compute_table_with_reduced_granularity.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ interactions:
7878
X-Content-Type-Options:
7979
- nosniff
8080
X-Gdc-Cancel-Token:
81-
- c113c082-69db-4625-965c-ae1e30da11cd
81+
- cbc2b5f7-fcf2-4bbe-9865-d68138749167
8282
X-GDC-TRACE-ID: *id001
8383
X-Xss-Protection:
8484
- '0'
@@ -111,10 +111,10 @@ interactions:
111111
name: Revenue
112112
localIdentifier: dim_1
113113
links:
114-
executionResult: 3c592204c3c06ac180cb7f07a42fe7293d7f5c34:b8f99c102eff20475276527c4de48f016d8fd5a17dc08369f311a59999b3f5f9
114+
executionResult: d15e9e5db67fd98019552fccbed72b488bd3ea29:627a2973420b8bf365dd5742d17398e841b4e00407e4ebc55b2431eff28fb4b8
115115
- request:
116116
method: GET
117-
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/3c592204c3c06ac180cb7f07a42fe7293d7f5c34%3Ab8f99c102eff20475276527c4de48f016d8fd5a17dc08369f311a59999b3f5f9?offset=0%2C0&limit=512%2C256
117+
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/d15e9e5db67fd98019552fccbed72b488bd3ea29%3A627a2973420b8bf365dd5742d17398e841b4e00407e4ebc55b2431eff28fb4b8?offset=0%2C0&limit=512%2C256
118118
body: null
119119
headers:
120120
Accept:

packages/gooddata-fdw/tests/execute/fixtures/execute_insight_all_columns.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ interactions:
375375
X-Content-Type-Options:
376376
- nosniff
377377
X-Gdc-Cancel-Token:
378-
- 9d5d2daa-64d8-40e2-9797-81abd09b70aa
378+
- 098efc48-3375-4de2-a27d-26c1d5f06d65
379379
X-GDC-TRACE-ID: *id001
380380
X-Xss-Protection:
381381
- '0'
@@ -427,10 +427,10 @@ interactions:
427427
name: Revenue
428428
localIdentifier: dim_1
429429
links:
430-
executionResult: a48fff91153e53681fe1835a1790259611b24d2f:41a18ba83d92626b6782bb70d16a3c934861331096315dacb4f57b290cf6cbb9
430+
executionResult: ed3b1e6374fc299e5c276e78b4f3296044ae0bcd:bd2e7bb8cb72ad3cc40d45ce6c1042a47804ff3e4e7cc66d56f763f51c3b48de
431431
- request:
432432
method: GET
433-
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/a48fff91153e53681fe1835a1790259611b24d2f%3A41a18ba83d92626b6782bb70d16a3c934861331096315dacb4f57b290cf6cbb9?offset=0%2C0&limit=512%2C256
433+
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/ed3b1e6374fc299e5c276e78b4f3296044ae0bcd%3Abd2e7bb8cb72ad3cc40d45ce6c1042a47804ff3e4e7cc66d56f763f51c3b48de?offset=0%2C0&limit=512%2C256
434434
body: null
435435
headers:
436436
Accept:

packages/gooddata-fdw/tests/execute/fixtures/execute_insight_some_columns.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ interactions:
375375
X-Content-Type-Options:
376376
- nosniff
377377
X-Gdc-Cancel-Token:
378-
- 0ac6459b-2f46-4e7a-9620-f171b8094880
378+
- 648ebea8-434f-4ad6-a2fc-5136561eacca
379379
X-GDC-TRACE-ID: *id001
380380
X-Xss-Protection:
381381
- '0'
@@ -427,10 +427,10 @@ interactions:
427427
name: Revenue
428428
localIdentifier: dim_1
429429
links:
430-
executionResult: a48fff91153e53681fe1835a1790259611b24d2f:41a18ba83d92626b6782bb70d16a3c934861331096315dacb4f57b290cf6cbb9
430+
executionResult: ed3b1e6374fc299e5c276e78b4f3296044ae0bcd:bd2e7bb8cb72ad3cc40d45ce6c1042a47804ff3e4e7cc66d56f763f51c3b48de
431431
- request:
432432
method: GET
433-
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/a48fff91153e53681fe1835a1790259611b24d2f%3A41a18ba83d92626b6782bb70d16a3c934861331096315dacb4f57b290cf6cbb9?offset=0%2C0&limit=512%2C256
433+
uri: http://localhost:3000/api/v1/actions/workspaces/demo/execution/afm/execute/result/ed3b1e6374fc299e5c276e78b4f3296044ae0bcd%3Abd2e7bb8cb72ad3cc40d45ce6c1042a47804ff3e4e7cc66d56f763f51c3b48de?offset=0%2C0&limit=512%2C256
434434
body: null
435435
headers:
436436
Accept:

packages/gooddata-fdw/tests/import_foreign_schema/fixtures/import_compute_without_restrictions.yaml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -599,20 +599,6 @@ interactions:
599599
- id: order_line_id
600600
type: attribute
601601
referenceProperties:
602-
- identifier:
603-
id: products
604-
type: dataset
605-
multivalue: false
606-
sources:
607-
- column: product_id
608-
dataType: INT
609-
target:
610-
id: product_id
611-
type: attribute
612-
isNullable: null
613-
nullValue: null
614-
sourceColumns: null
615-
sourceColumnDataTypes: null
616602
- identifier:
617603
id: customers
618604
type: dataset
@@ -623,7 +609,7 @@ interactions:
623609
target:
624610
id: customer_id
625611
type: attribute
626-
isNullable: null
612+
isNullable: true
627613
nullValue: null
628614
sourceColumns: null
629615
sourceColumnDataTypes: null
@@ -637,7 +623,7 @@ interactions:
637623
target:
638624
id: date
639625
type: date
640-
isNullable: null
626+
isNullable: true
641627
nullValue: null
642628
sourceColumns: null
643629
sourceColumnDataTypes: null
@@ -651,7 +637,21 @@ interactions:
651637
target:
652638
id: campaign_id
653639
type: attribute
654-
isNullable: null
640+
isNullable: true
641+
nullValue: null
642+
sourceColumns: null
643+
sourceColumnDataTypes: null
644+
- identifier:
645+
id: products
646+
type: dataset
647+
multivalue: false
648+
sources:
649+
- column: product_id
650+
dataType: INT
651+
target:
652+
id: product_id
653+
type: attribute
654+
isNullable: true
655655
nullValue: null
656656
sourceColumns: null
657657
sourceColumnDataTypes: null
@@ -660,10 +660,10 @@ interactions:
660660
- demo
661661
- order_lines
662662
workspaceDataFilterColumns:
663-
- name: wdf__state
664-
dataType: STRING
665663
- name: wdf__region
666664
dataType: STRING
665+
- name: wdf__state
666+
dataType: STRING
667667
workspaceDataFilterReferences:
668668
- filterId:
669669
id: wdf__state
@@ -713,7 +713,7 @@ interactions:
713713
target:
714714
id: campaign_id
715715
type: attribute
716-
isNullable: null
716+
isNullable: true
717717
nullValue: null
718718
sourceColumns: null
719719
sourceColumnDataTypes: null
@@ -1089,7 +1089,7 @@ interactions:
10891089
target:
10901090
id: campaign_id
10911091
type: attribute
1092-
isNullable: null
1092+
isNullable: true
10931093
nullValue: null
10941094
sourceColumns: null
10951095
sourceColumnDataTypes: null
@@ -1138,7 +1138,7 @@ interactions:
11381138
target:
11391139
id: campaign_channel_id
11401140
type: attribute
1141-
isNullable: null
1141+
isNullable: true
11421142
nullValue: null
11431143
sourceColumns: null
11441144
sourceColumnDataTypes: null
@@ -1261,20 +1261,6 @@ interactions:
12611261
- id: order_line_id
12621262
type: attribute
12631263
referenceProperties:
1264-
- identifier:
1265-
id: products
1266-
type: dataset
1267-
multivalue: false
1268-
sources:
1269-
- column: product_id
1270-
dataType: INT
1271-
target:
1272-
id: product_id
1273-
type: attribute
1274-
isNullable: null
1275-
nullValue: null
1276-
sourceColumns: null
1277-
sourceColumnDataTypes: null
12781264
- identifier:
12791265
id: customers
12801266
type: dataset
@@ -1285,7 +1271,7 @@ interactions:
12851271
target:
12861272
id: customer_id
12871273
type: attribute
1288-
isNullable: null
1274+
isNullable: true
12891275
nullValue: null
12901276
sourceColumns: null
12911277
sourceColumnDataTypes: null
@@ -1299,7 +1285,7 @@ interactions:
12991285
target:
13001286
id: date
13011287
type: date
1302-
isNullable: null
1288+
isNullable: true
13031289
nullValue: null
13041290
sourceColumns: null
13051291
sourceColumnDataTypes: null
@@ -1313,7 +1299,21 @@ interactions:
13131299
target:
13141300
id: campaign_id
13151301
type: attribute
1316-
isNullable: null
1302+
isNullable: true
1303+
nullValue: null
1304+
sourceColumns: null
1305+
sourceColumnDataTypes: null
1306+
- identifier:
1307+
id: products
1308+
type: dataset
1309+
multivalue: false
1310+
sources:
1311+
- column: product_id
1312+
dataType: INT
1313+
target:
1314+
id: product_id
1315+
type: attribute
1316+
isNullable: true
13171317
nullValue: null
13181318
sourceColumns: null
13191319
sourceColumnDataTypes: null
@@ -1323,10 +1323,10 @@ interactions:
13231323
- order_lines
13241324
areRelationsValid: true
13251325
workspaceDataFilterColumns:
1326-
- name: wdf__state
1327-
dataType: STRING
13281326
- name: wdf__region
13291327
dataType: STRING
1328+
- name: wdf__state
1329+
dataType: STRING
13301330
workspaceDataFilterReferences:
13311331
- filterId:
13321332
id: wdf__state

0 commit comments

Comments
 (0)