Skip to content

Commit 6be9809

Browse files
authored
test: add recordings for new import tests (#157)
1 parent 89db746 commit 6be9809

File tree

62 files changed

+19190
-17357
lines changed

Some content is hidden

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

62 files changed

+19190
-17357
lines changed

tests/test_commands/conftest.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,36 @@
6767
ItemType.MAP,
6868
])
6969

70+
import_update_existing_item_success_params = pytest.mark.parametrize("item_type", [
71+
ItemType.DATA_PIPELINE, ItemType.ENVIRONMENT, ItemType.EVENTSTREAM,
72+
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
73+
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
74+
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
75+
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
76+
])
77+
78+
import_create_new_item_success_params = pytest.mark.parametrize("item_type", [
79+
ItemType.NOTEBOOK, ItemType.SPARK_JOB_DEFINITION, ItemType.DATA_PIPELINE,
80+
ItemType.REPORT, ItemType.SEMANTIC_MODEL, ItemType.KQL_DATABASE,
81+
ItemType.KQL_QUERYSET, ItemType.EVENTHOUSE, ItemType.MIRRORED_DATABASE,
82+
ItemType.REFLEX, ItemType.KQL_DASHBOARD, ItemType.SQL_DATABASE,
83+
ItemType.COSMOS_DB_DATABASE, ItemType.USER_DATA_FUNCTION
84+
])
85+
86+
import_create_new_item_fail_params = pytest.mark.parametrize("item_type", [
87+
ItemType.DASHBOARD, ItemType.DATAMART, ItemType.LAKEHOUSE,
88+
ItemType.MIRRORED_WAREHOUSE, ItemType.ML_EXPERIMENT, ItemType.ML_MODEL,
89+
ItemType.PAGINATED_REPORT, ItemType.SQL_ENDPOINT, ItemType.WAREHOUSE,
90+
])
91+
92+
import_item_wrong_format_fail_params = pytest.mark.parametrize("item_type", [
93+
(ItemType.NOTEBOOK),
94+
(ItemType.SPARK_JOB_DEFINITION),
95+
(ItemType.SEMANTIC_MODEL),
96+
(ItemType.DATA_PIPELINE),
97+
],
98+
)
99+
70100
rm_item_without_force_cancel_operation_success_params = pytest.mark.parametrize("item_type", [
71101
item_type for item_type in ALL_ITEM_TYPES if item_type != ItemType.REPORT
72102
])

tests/test_commands/recordings/test_commands/test_import/class_setup.yaml

Lines changed: 79 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interactions:
1111
Content-Type:
1212
- application/json
1313
User-Agent:
14-
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
14+
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
1515
method: GET
1616
uri: https://api.fabric.microsoft.com/v1/workspaces
1717
response:
@@ -26,15 +26,15 @@ interactions:
2626
Content-Encoding:
2727
- gzip
2828
Content-Length:
29-
- '3069'
29+
- '1559'
3030
Content-Type:
3131
- application/json; charset=utf-8
3232
Date:
33-
- Mon, 23 Feb 2026 12:48:50 GMT
33+
- Tue, 17 Mar 2026 09:44:59 GMT
3434
Pragma:
3535
- no-cache
3636
RequestId:
37-
- 25a5069a-3827-4653-b363-674c78dc8a8c
37+
- 93c2e0ef-b200-4095-9d3c-b8012ed0974a
3838
Strict-Transport-Security:
3939
- max-age=31536000; includeSubDomains
4040
X-Content-Type-Options:
@@ -60,7 +60,7 @@ interactions:
6060
Content-Type:
6161
- application/json
6262
User-Agent:
63-
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
63+
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
6464
method: GET
6565
uri: https://api.fabric.microsoft.com/v1/workspaces
6666
response:
@@ -75,15 +75,15 @@ interactions:
7575
Content-Encoding:
7676
- gzip
7777
Content-Length:
78-
- '3069'
78+
- '1559'
7979
Content-Type:
8080
- application/json; charset=utf-8
8181
Date:
82-
- Mon, 23 Feb 2026 12:48:51 GMT
82+
- Tue, 17 Mar 2026 09:44:59 GMT
8383
Pragma:
8484
- no-cache
8585
RequestId:
86-
- c3334a46-aacb-485a-b7b1-2d58c8025168
86+
- e70c89d4-0f83-4b81-b7b4-437b73107d92
8787
Strict-Transport-Security:
8888
- max-age=31536000; includeSubDomains
8989
X-Content-Type-Options:
@@ -109,7 +109,7 @@ interactions:
109109
Content-Type:
110110
- application/json
111111
User-Agent:
112-
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
112+
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
113113
method: GET
114114
uri: https://api.fabric.microsoft.com/v1/capacities
115115
response:
@@ -125,15 +125,15 @@ interactions:
125125
Content-Encoding:
126126
- gzip
127127
Content-Length:
128-
- '429'
128+
- '424'
129129
Content-Type:
130130
- application/json; charset=utf-8
131131
Date:
132-
- Mon, 23 Feb 2026 12:48:54 GMT
132+
- Tue, 17 Mar 2026 09:45:05 GMT
133133
Pragma:
134134
- no-cache
135135
RequestId:
136-
- 99afa44c-3997-4b7f-aae9-356eb4956eb7
136+
- 95353d5a-1050-46c8-992d-3dc2ec01a588
137137
Strict-Transport-Security:
138138
- max-age=31536000; includeSubDomains
139139
X-Content-Type-Options:
@@ -162,12 +162,12 @@ interactions:
162162
Content-Type:
163163
- application/json
164164
User-Agent:
165-
- ms-fabric-cli/1.4.0 (None; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
165+
- ms-fabric-cli/1.5.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
166166
method: POST
167167
uri: https://api.fabric.microsoft.com/v1/workspaces
168168
response:
169169
body:
170-
string: '{"id": "1e338978-6b6e-48f0-a368-6e096227a46d", "displayName": "fabriccli_WorkspacePerTestclass_000001",
170+
string: '{"id": "7361766b-0a72-4ac0-8a8d-47b606ce4e18", "displayName": "fabriccli_WorkspacePerTestclass_000001",
171171
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
172172
headers:
173173
Access-Control-Expose-Headers:
@@ -177,17 +177,17 @@ interactions:
177177
Content-Encoding:
178178
- gzip
179179
Content-Length:
180-
- '188'
180+
- '187'
181181
Content-Type:
182182
- application/json; charset=utf-8
183183
Date:
184-
- Mon, 23 Feb 2026 12:49:03 GMT
184+
- Tue, 17 Mar 2026 09:45:13 GMT
185185
Location:
186-
- https://api.fabric.microsoft.com/v1/workspaces/1e338978-6b6e-48f0-a368-6e096227a46d
186+
- https://api.fabric.microsoft.com/v1/workspaces/7361766b-0a72-4ac0-8a8d-47b606ce4e18
187187
Pragma:
188188
- no-cache
189189
RequestId:
190-
- aaa46519-81fc-4243-9efc-63dbb11b0974
190+
- 9331e0d8-1882-4a48-b16a-2d525ab983ae
191191
Strict-Transport-Security:
192192
- max-age=31536000; includeSubDomains
193193
X-Content-Type-Options:
@@ -213,13 +213,13 @@ interactions:
213213
Content-Type:
214214
- application/json
215215
User-Agent:
216-
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
216+
- ms-fabric-cli/1.5.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
217217
method: GET
218218
uri: https://api.fabric.microsoft.com/v1/workspaces
219219
response:
220220
body:
221221
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
222-
"My workspace", "description": "", "type": "Personal"}, {"id": "1e338978-6b6e-48f0-a368-6e096227a46d",
222+
"My workspace", "description": "", "type": "Personal"}, {"id": "7361766b-0a72-4ac0-8a8d-47b606ce4e18",
223223
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
224224
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
225225
headers:
@@ -230,15 +230,15 @@ interactions:
230230
Content-Encoding:
231231
- gzip
232232
Content-Length:
233-
- '3102'
233+
- '1593'
234234
Content-Type:
235235
- application/json; charset=utf-8
236236
Date:
237-
- Mon, 23 Feb 2026 12:49:09 GMT
237+
- Tue, 17 Mar 2026 10:09:11 GMT
238238
Pragma:
239239
- no-cache
240240
RequestId:
241-
- 5db69f75-cf21-4e7e-a488-42e1412aa9b1
241+
- 03ff6127-c58c-4a66-8c04-bce5c96a3918
242242
Strict-Transport-Security:
243243
- max-age=31536000; includeSubDomains
244244
X-Content-Type-Options:
@@ -264,12 +264,58 @@ interactions:
264264
Content-Type:
265265
- application/json
266266
User-Agent:
267-
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
267+
- ms-fabric-cli/1.5.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
268268
method: GET
269-
uri: https://api.fabric.microsoft.com/v1/workspaces/1e338978-6b6e-48f0-a368-6e096227a46d/items
269+
uri: https://api.fabric.microsoft.com/v1/workspaces/7361766b-0a72-4ac0-8a8d-47b606ce4e18/items
270270
response:
271271
body:
272-
string: '{"value": []}'
272+
string: '{"value": [{"id": "2342603d-d333-41be-a74f-12b9cc81edf2", "type": "Report",
273+
"displayName": "fabcli000001_new_5", "description": "Imported from fab", "workspaceId":
274+
"7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "fee642a9-279d-4632-9c11-f6ab81750546",
275+
"type": "SemanticModel", "displayName": "fabcli000001_auto", "description":
276+
"", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "ea5ea637-8d16-478e-bb2e-c76d297320ad",
277+
"type": "SemanticModel", "displayName": "fabcli000001_new_6", "description":
278+
"", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "b8ac6894-0df7-4308-b963-e49fda14c954",
279+
"type": "SQLEndpoint", "displayName": "fabcli000001_new_10", "description":
280+
"", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "d23cdde5-4127-4174-812f-38a952042285",
281+
"type": "SQLEndpoint", "displayName": "fabcli000001_new_13", "description":
282+
"", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "13930fa5-87c8-4671-96bb-2f399df663a3",
283+
"type": "SQLEndpoint", "displayName": "fabcli000001_new_14", "description":
284+
"", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "9fe568fa-0fc9-417f-9f09-df8a8e09e401",
285+
"type": "Notebook", "displayName": "fabcli000001_new_2", "description": "Imported
286+
from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id":
287+
"c043e9aa-77dd-489a-a807-315aaaac020a", "type": "SparkJobDefinition", "displayName":
288+
"fabcli000001_new_3", "description": "Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
289+
{"id": "776cc7e0-e9d0-41b2-a9a1-09b48fd07ede", "type": "DataPipeline", "displayName":
290+
"fabcli000001_new_4", "description": "Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
291+
{"id": "1f40bc8b-b6fc-43df-9744-e13a49c5bcc7", "type": "Eventhouse", "displayName":
292+
"fabcli000001_auto", "description": "Created by fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
293+
{"id": "5a274e07-f7a0-43d0-9c59-0dbf236ec856", "type": "KQLDatabase", "displayName":
294+
"fabcli000001_auto", "description": "fabcli000001_auto", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
295+
{"id": "352a2148-0bc2-4516-9594-530b2d9e93b0", "type": "KQLDatabase", "displayName":
296+
"fabcli000001_new_7", "description": "Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
297+
{"id": "6e292b65-d872-4fa9-8d41-cb6981a1e4d1", "type": "KQLQueryset", "displayName":
298+
"fabcli000001_new_8", "description": "Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
299+
{"id": "1aae77b0-c7a7-4762-ab23-0a6a09518835", "type": "Eventhouse", "displayName":
300+
"fabcli000001_new_9", "description": "Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
301+
{"id": "0a8a81f1-9775-4968-82ad-b6b0be90274d", "type": "MirroredDatabase",
302+
"displayName": "fabcli000001_new_10", "description": "Imported from fab",
303+
"workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "b9b9e9ce-8a7f-4f1f-902d-1241906ee306",
304+
"type": "Reflex", "displayName": "fabcli000001_new_11", "description": "Imported
305+
from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id":
306+
"8df8534c-e272-4655-af77-65e26c08729f", "type": "KQLDashboard", "displayName":
307+
"fabcli000001_new_12", "description": "Imported from fab", "workspaceId":
308+
"7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "d8c9d6ab-c21d-4768-8398-8a32500ac2f1",
309+
"type": "SQLDatabase", "displayName": "fabcli000001_new_13", "description":
310+
"Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
311+
{"id": "4c0b3fba-c21d-458c-9ca3-41b3b2fb7012", "type": "CosmosDBDatabase",
312+
"displayName": "fabcli000001_new_14", "description": "Imported from fab",
313+
"workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"}, {"id": "1ca44f31-1727-4f65-bd2b-f0254ff994b2",
314+
"type": "UserDataFunction", "displayName": "fabcli000001_new_15", "description":
315+
"Imported from fab", "workspaceId": "7361766b-0a72-4ac0-8a8d-47b606ce4e18"},
316+
{"id": "aa51f3c6-4db7-43bf-8fde-79ae679883c9", "type": "Notebook", "displayName":
317+
"fabcli000001_new_16", "description": "Imported from fab", "workspaceId":
318+
"7361766b-0a72-4ac0-8a8d-47b606ce4e18"}]}'
273319
headers:
274320
Access-Control-Expose-Headers:
275321
- RequestId
@@ -278,15 +324,15 @@ interactions:
278324
Content-Encoding:
279325
- gzip
280326
Content-Length:
281-
- '32'
327+
- '1050'
282328
Content-Type:
283329
- application/json; charset=utf-8
284330
Date:
285-
- Mon, 23 Feb 2026 12:49:09 GMT
331+
- Tue, 17 Mar 2026 10:09:12 GMT
286332
Pragma:
287333
- no-cache
288334
RequestId:
289-
- 406778d5-9ae5-4d86-9663-51228e0c8c24
335+
- e2689d41-e541-49ac-a6f0-540fb3578b75
290336
Strict-Transport-Security:
291337
- max-age=31536000; includeSubDomains
292338
X-Content-Type-Options:
@@ -314,9 +360,9 @@ interactions:
314360
Content-Type:
315361
- application/json
316362
User-Agent:
317-
- ms-fabric-cli/1.4.0 (import; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
363+
- ms-fabric-cli/1.5.0 (import; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
318364
method: DELETE
319-
uri: https://api.fabric.microsoft.com/v1/workspaces/1e338978-6b6e-48f0-a368-6e096227a46d
365+
uri: https://api.fabric.microsoft.com/v1/workspaces/7361766b-0a72-4ac0-8a8d-47b606ce4e18
320366
response:
321367
body:
322368
string: ''
@@ -332,11 +378,11 @@ interactions:
332378
Content-Type:
333379
- application/octet-stream
334380
Date:
335-
- Mon, 23 Feb 2026 12:49:10 GMT
381+
- Tue, 17 Mar 2026 10:09:13 GMT
336382
Pragma:
337383
- no-cache
338384
RequestId:
339-
- 7d61f799-efd3-4e80-9830-bc85cf05c047
385+
- e91e9a3f-00b6-4713-aa9a-026736a2f316
340386
Strict-Transport-Security:
341387
- max-age=31536000; includeSubDomains
342388
X-Content-Type-Options:

0 commit comments

Comments
 (0)