Skip to content

Commit a93ae1c

Browse files
committed
Extends tests for all supported items
1 parent b9f3469 commit a93ae1c

488 files changed

Lines changed: 451943 additions & 1925 deletions

File tree

Some content is hidden

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

tests/test_commands/conftest.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,25 @@
4141
)
4242
from tests.test_commands.utils import cli_path_join, set_vcr_mode_env
4343

44+
custom_parametrize = pytest.mark.parametrize("item_type", [
45+
ItemType.DATA_PIPELINE,
46+
ItemType.ENVIRONMENT, ItemType.EVENTHOUSE, ItemType.EVENTSTREAM,
47+
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET,
48+
ItemType.LAKEHOUSE, ItemType.ML_EXPERIMENT, ItemType.ML_MODEL,
49+
ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
50+
ItemType.REFLEX, ItemType.REPORT,
51+
ItemType.SQL_DATABASE, ItemType.SEMANTIC_MODEL,
52+
ItemType.SPARK_JOB_DEFINITION, ItemType.WAREHOUSE, ItemType.COPYJOB,
53+
ItemType.GRAPHQLAPI, ItemType.DATAFLOW,
54+
])
55+
56+
basic_item_parametrize = pytest.mark.parametrize("item_type", [
57+
ItemType.DATA_PIPELINE, ItemType.ENVIRONMENT, ItemType.EVENTSTREAM,
58+
ItemType.KQL_DASHBOARD, ItemType.KQL_QUERYSET, ItemType.ML_EXPERIMENT,
59+
ItemType.ML_MODEL, ItemType.MIRRORED_DATABASE, ItemType.NOTEBOOK,
60+
ItemType.REFLEX, ItemType.SPARK_JOB_DEFINITION,
61+
])
62+
4463
FILTER_HEADERS = [
4564
"authorization",
4665
"client-request-id",

tests/test_commands/recordings/test_commands/test_assign/class_setup.yaml

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ interactions:
1111
Content-Type:
1212
- application/json
1313
User-Agent:
14-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
14+
- ms-fabric-cli/1.3.1 (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:
1818
body:
19-
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
20-
"My workspace", "description": "", "type": "Personal"}]}'
19+
string: '{"value": []}'
2120
headers:
2221
Access-Control-Expose-Headers:
2322
- RequestId
@@ -26,23 +25,23 @@ interactions:
2625
Content-Encoding:
2726
- gzip
2827
Content-Length:
29-
- '323'
28+
- '6379'
3029
Content-Type:
3130
- application/json; charset=utf-8
3231
Date:
33-
- Tue, 02 Sep 2025 18:40:40 GMT
32+
- Tue, 20 Jan 2026 08:38:03 GMT
3433
Pragma:
3534
- no-cache
3635
RequestId:
37-
- 2cd94690-3067-4b0f-9a1a-a49ada3ef933
36+
- 81047b0c-fd79-494b-9b0c-cb7fbd368165
3837
Strict-Transport-Security:
3938
- max-age=31536000; includeSubDomains
4039
X-Content-Type-Options:
4140
- nosniff
4241
X-Frame-Options:
4342
- deny
4443
home-cluster-uri:
45-
- https://wabi-west-europe-redirect.analysis.windows.net/
44+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
4645
request-redirected:
4746
- 'true'
4847
status:
@@ -60,13 +59,12 @@ interactions:
6059
Content-Type:
6160
- application/json
6261
User-Agent:
63-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
62+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
6463
method: GET
6564
uri: https://api.fabric.microsoft.com/v1/workspaces
6665
response:
6766
body:
68-
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
69-
"My workspace", "description": "", "type": "Personal"}]}'
67+
string: '{"value": []}'
7068
headers:
7169
Access-Control-Expose-Headers:
7270
- RequestId
@@ -75,23 +73,23 @@ interactions:
7573
Content-Encoding:
7674
- gzip
7775
Content-Length:
78-
- '323'
76+
- '6379'
7977
Content-Type:
8078
- application/json; charset=utf-8
8179
Date:
82-
- Tue, 02 Sep 2025 18:40:40 GMT
80+
- Tue, 20 Jan 2026 08:38:04 GMT
8381
Pragma:
8482
- no-cache
8583
RequestId:
86-
- a3d93e9e-e7fb-4737-bc42-3be026f3360a
84+
- 6cf851df-17ce-48cf-8748-3f4d1637962b
8785
Strict-Transport-Security:
8886
- max-age=31536000; includeSubDomains
8987
X-Content-Type-Options:
9088
- nosniff
9189
X-Frame-Options:
9290
- deny
9391
home-cluster-uri:
94-
- https://wabi-west-europe-redirect.analysis.windows.net/
92+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
9593
request-redirected:
9694
- 'true'
9795
status:
@@ -109,14 +107,12 @@ interactions:
109107
Content-Type:
110108
- application/json
111109
User-Agent:
112-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
110+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
113111
method: GET
114112
uri: https://api.fabric.microsoft.com/v1/capacities
115113
response:
116114
body:
117-
string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName":
118-
"mocked_fabriccli_capacity_name", "sku": "F16", "region": "West Europe", "state":
119-
"Active"}]}'
115+
string: '{"value": []}'
120116
headers:
121117
Access-Control-Expose-Headers:
122118
- RequestId
@@ -125,31 +121,31 @@ interactions:
125121
Content-Encoding:
126122
- gzip
127123
Content-Length:
128-
- '456'
124+
- '272'
129125
Content-Type:
130126
- application/json; charset=utf-8
131127
Date:
132-
- Tue, 02 Sep 2025 18:40:43 GMT
128+
- Tue, 20 Jan 2026 08:38:10 GMT
133129
Pragma:
134130
- no-cache
135131
RequestId:
136-
- 43ddb46e-c22c-4bf8-b33f-40559a3afb75
132+
- aa67a641-5c72-4697-9f13-acb1e1580513
137133
Strict-Transport-Security:
138134
- max-age=31536000; includeSubDomains
139135
X-Content-Type-Options:
140136
- nosniff
141137
X-Frame-Options:
142138
- deny
143139
home-cluster-uri:
144-
- https://wabi-west-europe-redirect.analysis.windows.net/
140+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
145141
request-redirected:
146142
- 'true'
147143
status:
148144
code: 200
149145
message: OK
150146
- request:
151147
body: '{"description": "Created by fab", "displayName": "fabriccli_WorkspacePerTestclass_000001",
152-
"capacityId": "00000000-0000-0000-0000-000000000004"}'
148+
"capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}'
153149
headers:
154150
Accept:
155151
- '*/*'
@@ -162,13 +158,13 @@ interactions:
162158
Content-Type:
163159
- application/json
164160
User-Agent:
165-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
161+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
166162
method: POST
167163
uri: https://api.fabric.microsoft.com/v1/workspaces
168164
response:
169165
body:
170-
string: '{"id": "49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2", "displayName": "fabriccli_WorkspacePerTestclass_000001",
171-
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
166+
string: '{"id": "a427670c-4914-4767-a838-3c29aa028e24", "displayName": "fabriccli_WorkspacePerTestclass_000001",
167+
"description": "Created by fab", "type": "Workspace", "capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}'
172168
headers:
173169
Access-Control-Expose-Headers:
174170
- RequestId,Location
@@ -177,25 +173,25 @@ interactions:
177173
Content-Encoding:
178174
- gzip
179175
Content-Length:
180-
- '187'
176+
- '186'
181177
Content-Type:
182178
- application/json; charset=utf-8
183179
Date:
184-
- Tue, 02 Sep 2025 18:40:49 GMT
180+
- Tue, 20 Jan 2026 08:38:18 GMT
185181
Location:
186-
- https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2
182+
- https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24
187183
Pragma:
188184
- no-cache
189185
RequestId:
190-
- c5885377-c141-4c89-9f34-b4c8585d4dbe
186+
- 927de369-7512-4b22-bd7d-11d47254b5d7
191187
Strict-Transport-Security:
192188
- max-age=31536000; includeSubDomains
193189
X-Content-Type-Options:
194190
- nosniff
195191
X-Frame-Options:
196192
- deny
197193
home-cluster-uri:
198-
- https://wabi-west-europe-redirect.analysis.windows.net/
194+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
199195
request-redirected:
200196
- 'true'
201197
status:
@@ -213,15 +209,14 @@ interactions:
213209
Content-Type:
214210
- application/json
215211
User-Agent:
216-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
212+
- ms-fabric-cli/1.3.1 (assign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
217213
method: GET
218214
uri: https://api.fabric.microsoft.com/v1/workspaces
219215
response:
220216
body:
221-
string: '{"value": [{"id": "94da8ea5-0bd6-4a9e-b717-5fdb482f4c71", "displayName":
222-
"My workspace", "description": "", "type": "Personal"}, {"id": "49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2",
223-
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
224-
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
217+
string: '{"value": [{"id": "a427670c-4914-4767-a838-3c29aa028e24", "displayName":
218+
"fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab",
219+
"type": "Workspace", "capacityId": "07b1fd56-9969-4ff5-a2c8-05df5f82759a"}]}'
225220
headers:
226221
Access-Control-Expose-Headers:
227222
- RequestId
@@ -230,23 +225,23 @@ interactions:
230225
Content-Encoding:
231226
- gzip
232227
Content-Length:
233-
- '357'
228+
- '6410'
234229
Content-Type:
235230
- application/json; charset=utf-8
236231
Date:
237-
- Tue, 02 Sep 2025 18:41:24 GMT
232+
- Tue, 20 Jan 2026 08:38:49 GMT
238233
Pragma:
239234
- no-cache
240235
RequestId:
241-
- acff0e22-138d-4f93-9bd9-c4fcbfa6a2bc
236+
- 87863139-367a-4924-8c15-0c3345d1f4e0
242237
Strict-Transport-Security:
243238
- max-age=31536000; includeSubDomains
244239
X-Content-Type-Options:
245240
- nosniff
246241
X-Frame-Options:
247242
- deny
248243
home-cluster-uri:
249-
- https://wabi-west-europe-redirect.analysis.windows.net/
244+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
250245
request-redirected:
251246
- 'true'
252247
status:
@@ -264,9 +259,9 @@ interactions:
264259
Content-Type:
265260
- application/json
266261
User-Agent:
267-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
262+
- ms-fabric-cli/1.3.1 (assign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
268263
method: GET
269-
uri: https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2/items
264+
uri: https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24/items
270265
response:
271266
body:
272267
string: '{"value": []}'
@@ -282,19 +277,19 @@ interactions:
282277
Content-Type:
283278
- application/json; charset=utf-8
284279
Date:
285-
- Tue, 02 Sep 2025 18:41:23 GMT
280+
- Tue, 20 Jan 2026 08:38:50 GMT
286281
Pragma:
287282
- no-cache
288283
RequestId:
289-
- 81fae1df-9255-401c-95e9-abfaf6e5616a
284+
- cb63672b-c87d-4ec0-b6f0-8d2f0cf8e65b
290285
Strict-Transport-Security:
291286
- max-age=31536000; includeSubDomains
292287
X-Content-Type-Options:
293288
- nosniff
294289
X-Frame-Options:
295290
- deny
296291
home-cluster-uri:
297-
- https://wabi-west-europe-redirect.analysis.windows.net/
292+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
298293
request-redirected:
299294
- 'true'
300295
status:
@@ -314,9 +309,9 @@ interactions:
314309
Content-Type:
315310
- application/json
316311
User-Agent:
317-
- ms-fabric-cli/1.0.0 (assign; Linux; x86_64; 5.15.167.4-microsoft-standard-WSL2)
312+
- ms-fabric-cli/1.3.1 (assign; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
318313
method: DELETE
319-
uri: https://api.fabric.microsoft.com/v1/workspaces/49ab4e5d-367c-4f8b-a7a5-275cc77e5ec2
314+
uri: https://api.fabric.microsoft.com/v1/workspaces/a427670c-4914-4767-a838-3c29aa028e24
320315
response:
321316
body:
322317
string: ''
@@ -332,19 +327,19 @@ interactions:
332327
Content-Type:
333328
- application/octet-stream
334329
Date:
335-
- Tue, 02 Sep 2025 18:41:23 GMT
330+
- Tue, 20 Jan 2026 08:38:51 GMT
336331
Pragma:
337332
- no-cache
338333
RequestId:
339-
- c067f12e-7ade-4072-9a82-79da88d70429
334+
- 83457f97-ae44-4407-ae8d-ebb033a5a879
340335
Strict-Transport-Security:
341336
- max-age=31536000; includeSubDomains
342337
X-Content-Type-Options:
343338
- nosniff
344339
X-Frame-Options:
345340
- deny
346341
home-cluster-uri:
347-
- https://wabi-west-europe-redirect.analysis.windows.net/
342+
- https://wabi-us-central-b-primary-redirect.analysis.windows.net/
348343
request-redirected:
349344
- 'true'
350345
status:

0 commit comments

Comments
 (0)