Skip to content

Commit 9154d2c

Browse files
committed
tests: manage client and replace value in request for testing
1 parent 666963c commit 9154d2c

17 files changed

+3930
-104
lines changed

scaleway/scaleway/instance/v1/tests/cassettes/instance_volume.cassette.yaml

Lines changed: 332 additions & 10 deletions
Large diffs are not rendered by default.

scaleway/scaleway/instance/v1/tests/cassettes/test_attach_additional_volume.cassette.yaml

Lines changed: 348 additions & 10 deletions
Large diffs are not rendered by default.

scaleway/scaleway/instance/v1/tests/cassettes/test_create_ip.cassette.yaml

Lines changed: 252 additions & 10 deletions
Large diffs are not rendered by default.

scaleway/scaleway/instance/v1/tests/cassettes/test_create_new_server.cassette.yaml

Lines changed: 497 additions & 10 deletions
Large diffs are not rendered by default.

scaleway/scaleway/instance/v1/tests/cassettes/test_list_server.cassette.yaml

Lines changed: 331 additions & 0 deletions
Large diffs are not rendered by default.

scaleway/scaleway/k8s/v1/tests/cassettes/private_network.cassette.yaml

Lines changed: 160 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"enable_routing": false, "name": "vpc-hardcore-euler", "project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
3+
body: '{"enable_routing": false, "name": "vpc-hardcore-euler", "project_id": "11111111-1111-1111-1111-111111111111"}'
44
headers:
55
Accept-Encoding:
66
- gzip, deflate
@@ -48,7 +48,7 @@ interactions:
4848
message: OK
4949
- request:
5050
body: '{"default_route_propagation_enabled": true, "name": "pn-pensive-grothendieck",
51-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "6013eb6d-13a7-4995-a632-800c9e5045e1"}'
51+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "6013eb6d-13a7-4995-a632-800c9e5045e1"}'
5252
headers:
5353
Accept-Encoding:
5454
- gzip, deflate
@@ -103,7 +103,7 @@ interactions:
103103
message: OK
104104
- request:
105105
body: '{"enable_routing": false, "name": "vpc-musing-shockley", "project_id":
106-
"d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
106+
"11111111-1111-1111-1111-111111111111"}'
107107
headers:
108108
Accept-Encoding:
109109
- gzip, deflate
@@ -151,7 +151,7 @@ interactions:
151151
message: OK
152152
- request:
153153
body: '{"default_route_propagation_enabled": true, "name": "pn-agitated-hertz",
154-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "163fafdc-352d-4a88-a1cd-01544b7364e1"}'
154+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "163fafdc-352d-4a88-a1cd-01544b7364e1"}'
155155
headers:
156156
Accept-Encoding:
157157
- gzip, deflate
@@ -206,7 +206,7 @@ interactions:
206206
message: OK
207207
- request:
208208
body: '{"enable_routing": false, "name": "vpc-distracted-thompson", "project_id":
209-
"d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
209+
"11111111-1111-1111-1111-111111111111"}'
210210
headers:
211211
Accept-Encoding:
212212
- gzip, deflate
@@ -254,7 +254,7 @@ interactions:
254254
message: OK
255255
- request:
256256
body: '{"default_route_propagation_enabled": true, "name": "pn-eager-poitras",
257-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "15703a97-178b-41d7-a215-1ae05d7da768"}'
257+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "15703a97-178b-41d7-a215-1ae05d7da768"}'
258258
headers:
259259
Accept-Encoding:
260260
- gzip, deflate
@@ -308,7 +308,7 @@ interactions:
308308
code: 200
309309
message: OK
310310
- request:
311-
body: '{"enable_routing": false, "name": "vpc-wizardly-kare", "project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
311+
body: '{"enable_routing": false, "name": "vpc-wizardly-kare", "project_id": "11111111-1111-1111-1111-111111111111"}'
312312
headers:
313313
Accept-Encoding:
314314
- gzip, deflate
@@ -356,7 +356,7 @@ interactions:
356356
message: OK
357357
- request:
358358
body: '{"default_route_propagation_enabled": true, "name": "pn-amazing-clarke",
359-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "7f7bd042-4432-4959-b107-6fea1c927252"}'
359+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "7f7bd042-4432-4959-b107-6fea1c927252"}'
360360
headers:
361361
Accept-Encoding:
362362
- gzip, deflate
@@ -411,7 +411,7 @@ interactions:
411411
message: OK
412412
- request:
413413
body: '{"enable_routing": false, "name": "vpc-compassionate-beaver", "project_id":
414-
"d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
414+
"11111111-1111-1111-1111-111111111111"}'
415415
headers:
416416
Accept-Encoding:
417417
- gzip, deflate
@@ -459,7 +459,7 @@ interactions:
459459
message: OK
460460
- request:
461461
body: '{"default_route_propagation_enabled": true, "name": "pn-elastic-almeida",
462-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "71857cb0-2695-4b79-9f2f-3c6729a2a2d5"}'
462+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "71857cb0-2695-4b79-9f2f-3c6729a2a2d5"}'
463463
headers:
464464
Accept-Encoding:
465465
- gzip, deflate
@@ -513,7 +513,7 @@ interactions:
513513
code: 200
514514
message: OK
515515
- request:
516-
body: '{"enable_routing": false, "name": "vpc-crazy-faraday", "project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
516+
body: '{"enable_routing": false, "name": "vpc-crazy-faraday", "project_id": "11111111-1111-1111-1111-111111111111"}'
517517
headers:
518518
Accept-Encoding:
519519
- gzip, deflate
@@ -561,7 +561,7 @@ interactions:
561561
message: OK
562562
- request:
563563
body: '{"default_route_propagation_enabled": true, "name": "pn-sad-hofstadter",
564-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "f1a8dff4-d054-47da-b319-f4babf28dab2"}'
564+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "f1a8dff4-d054-47da-b319-f4babf28dab2"}'
565565
headers:
566566
Accept-Encoding:
567567
- gzip, deflate
@@ -615,7 +615,7 @@ interactions:
615615
code: 200
616616
message: OK
617617
- request:
618-
body: '{"enable_routing": false, "name": "vpc-sweet-babbage", "project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
618+
body: '{"enable_routing": false, "name": "vpc-sweet-babbage", "project_id": "11111111-1111-1111-1111-111111111111"}'
619619
headers:
620620
Accept-Encoding:
621621
- gzip, deflate
@@ -663,7 +663,7 @@ interactions:
663663
message: OK
664664
- request:
665665
body: '{"default_route_propagation_enabled": true, "name": "pn-inspiring-perlman",
666-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "2135442c-2787-4b4b-80eb-569760a2a08b"}'
666+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "2135442c-2787-4b4b-80eb-569760a2a08b"}'
667667
headers:
668668
Accept-Encoding:
669669
- gzip, deflate
@@ -718,7 +718,7 @@ interactions:
718718
message: OK
719719
- request:
720720
body: '{"enable_routing": false, "name": "vpc-xenodochial-meitner", "project_id":
721-
"d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
721+
"11111111-1111-1111-1111-111111111111"}'
722722
headers:
723723
Accept-Encoding:
724724
- gzip, deflate
@@ -766,7 +766,7 @@ interactions:
766766
message: OK
767767
- request:
768768
body: '{"default_route_propagation_enabled": true, "name": "pn-youthful-hellman",
769-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "d5b30302-be55-4ca9-879f-c508e9fe86af"}'
769+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "d5b30302-be55-4ca9-879f-c508e9fe86af"}'
770770
headers:
771771
Accept-Encoding:
772772
- gzip, deflate
@@ -820,7 +820,7 @@ interactions:
820820
code: 200
821821
message: OK
822822
- request:
823-
body: '{"enable_routing": false, "name": "vpc-keen-shamir", "project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
823+
body: '{"enable_routing": false, "name": "vpc-keen-shamir", "project_id": "11111111-1111-1111-1111-111111111111"}'
824824
headers:
825825
Accept-Encoding:
826826
- gzip, deflate
@@ -868,7 +868,7 @@ interactions:
868868
message: OK
869869
- request:
870870
body: '{"default_route_propagation_enabled": true, "name": "pn-reverent-brahmagupta",
871-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "7bb567e4-a490-408e-8fc9-5bc9412d3be5"}'
871+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "7bb567e4-a490-408e-8fc9-5bc9412d3be5"}'
872872
headers:
873873
Accept-Encoding:
874874
- gzip, deflate
@@ -961,7 +961,7 @@ interactions:
961961
message: No Content
962962
- request:
963963
body: '{"enable_routing": false, "name": "vpc-suspicious-kirch", "project_id":
964-
"d3520a52-2c75-4ba0-bda8-82dd087f07f2"}'
964+
"11111111-1111-1111-1111-111111111111"}'
965965
headers:
966966
Accept-Encoding:
967967
- gzip, deflate
@@ -1009,7 +1009,7 @@ interactions:
10091009
message: OK
10101010
- request:
10111011
body: '{"default_route_propagation_enabled": true, "name": "pn-funny-tereshkova",
1012-
"project_id": "d3520a52-2c75-4ba0-bda8-82dd087f07f2", "vpc_id": "c092cda2-b289-4211-adf3-64dfa2bb8ccc"}'
1012+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "c092cda2-b289-4211-adf3-64dfa2bb8ccc"}'
10131013
headers:
10141014
Accept-Encoding:
10151015
- gzip, deflate
@@ -1100,4 +1100,144 @@ interactions:
11001100
status:
11011101
code: 204
11021102
message: No Content
1103+
- request:
1104+
body: '{"enable_routing": false, "name": "vpc-sweet-edison", "project_id": "11111111-1111-1111-1111-111111111111"}'
1105+
headers:
1106+
Accept-Encoding:
1107+
- gzip, deflate
1108+
Connection:
1109+
- keep-alive
1110+
Content-Length:
1111+
- '107'
1112+
Content-Type:
1113+
- application/json; charset=utf-8
1114+
accept:
1115+
- application/json
1116+
user-agent:
1117+
- scaleway-sdk-python/2.0.0
1118+
method: POST
1119+
uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs
1120+
response:
1121+
body:
1122+
string: '{"id": "652ef756-f9b9-45c3-a041-cd65c7f665e8", "name": "vpc-sweet-edison",
1123+
"tags": [], "organization_id": "11111111-1111-1111-1111-111111111111", "created_at":
1124+
"2025-08-28T13:15:47.846459Z", "updated_at": "2025-08-28T13:15:47.846459Z",
1125+
"project_id": "11111111-1111-1111-1111-111111111111", "is_default": false,
1126+
"private_network_count": 0, "routing_enabled": true, "custom_routes_propagation_enabled":
1127+
true, "region": "fr-par"}'
1128+
headers:
1129+
content-length:
1130+
- '403'
1131+
content-security-policy:
1132+
- default-src 'none'; frame-ancestors 'none'
1133+
content-type:
1134+
- application/json
1135+
date:
1136+
- Thu, 28 Aug 2025 13:15:47 GMT
1137+
server:
1138+
- Scaleway API Gateway (fr-par-2;edge02)
1139+
strict-transport-security:
1140+
- max-age=63072000
1141+
x-content-type-options:
1142+
- nosniff
1143+
x-frame-options:
1144+
- DENY
1145+
x-request-id:
1146+
- b10f6865-37ec-404c-a8d4-228387fb76cd
1147+
status:
1148+
code: 200
1149+
message: OK
1150+
- request:
1151+
body: '{"default_route_propagation_enabled": true, "name": "pn-beautiful-wright",
1152+
"project_id": "11111111-1111-1111-1111-111111111111", "vpc_id": "652ef756-f9b9-45c3-a041-cd65c7f665e8"}'
1153+
headers:
1154+
Accept-Encoding:
1155+
- gzip, deflate
1156+
Connection:
1157+
- keep-alive
1158+
Content-Length:
1159+
- '178'
1160+
Content-Type:
1161+
- application/json; charset=utf-8
1162+
accept:
1163+
- application/json
1164+
user-agent:
1165+
- scaleway-sdk-python/2.0.0
1166+
method: POST
1167+
uri: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks
1168+
response:
1169+
body:
1170+
string: '{"id": "f37f7f14-88c4-4851-aa42-d01ccc251be3", "name": "pn-beautiful-wright",
1171+
"tags": [], "organization_id": "11111111-1111-1111-1111-111111111111", "created_at":
1172+
"2025-08-28T13:15:47.943633Z", "updated_at": "2025-08-28T13:15:47.943633Z",
1173+
"project_id": "11111111-1111-1111-1111-111111111111", "subnets": [{"id": "58d5a91b-6536-458d-bfce-40546da907e8",
1174+
"created_at": "2025-08-28T13:15:47.943633Z", "updated_at": "2025-08-28T13:15:47.943633Z",
1175+
"subnet": "172.16.156.0/22", "project_id": "11111111-1111-1111-1111-111111111111",
1176+
"private_network_id": "f37f7f14-88c4-4851-aa42-d01ccc251be3", "vpc_id": "652ef756-f9b9-45c3-a041-cd65c7f665e8"},
1177+
{"id": "c2208a03-94ac-4415-9853-fc72f5700148", "created_at": "2025-08-28T13:15:47.943633Z",
1178+
"updated_at": "2025-08-28T13:15:47.943633Z", "subnet": "fd64:badd:7710:ce6::/64",
1179+
"project_id": "11111111-1111-1111-1111-111111111111", "private_network_id":
1180+
"f37f7f14-88c4-4851-aa42-d01ccc251be3", "vpc_id": "652ef756-f9b9-45c3-a041-cd65c7f665e8"}],
1181+
"vpc_id": "652ef756-f9b9-45c3-a041-cd65c7f665e8", "dhcp_enabled": true, "default_route_propagation_enabled":
1182+
true, "region": "fr-par"}'
1183+
headers:
1184+
content-length:
1185+
- '1064'
1186+
content-security-policy:
1187+
- default-src 'none'; frame-ancestors 'none'
1188+
content-type:
1189+
- application/json
1190+
date:
1191+
- Thu, 28 Aug 2025 13:15:48 GMT
1192+
server:
1193+
- Scaleway API Gateway (fr-par-2;edge01)
1194+
strict-transport-security:
1195+
- max-age=63072000
1196+
x-content-type-options:
1197+
- nosniff
1198+
x-frame-options:
1199+
- DENY
1200+
x-request-id:
1201+
- 9c503421-ee0f-4d4c-8e0f-c83e9390c499
1202+
status:
1203+
code: 200
1204+
message: OK
1205+
- request:
1206+
body: '{}'
1207+
headers:
1208+
Accept-Encoding:
1209+
- gzip, deflate
1210+
Connection:
1211+
- keep-alive
1212+
Content-Length:
1213+
- '2'
1214+
accept:
1215+
- application/json
1216+
user-agent:
1217+
- scaleway-sdk-python/2.0.0
1218+
method: DELETE
1219+
uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs/652ef756-f9b9-45c3-a041-cd65c7f665e8
1220+
response:
1221+
body:
1222+
string: ''
1223+
headers:
1224+
content-security-policy:
1225+
- default-src 'none'; frame-ancestors 'none'
1226+
content-type:
1227+
- application/json
1228+
date:
1229+
- Thu, 28 Aug 2025 13:16:12 GMT
1230+
server:
1231+
- Scaleway API Gateway (fr-par-2;edge02)
1232+
strict-transport-security:
1233+
- max-age=63072000
1234+
x-content-type-options:
1235+
- nosniff
1236+
x-frame-options:
1237+
- DENY
1238+
x-request-id:
1239+
- b00cfcaf-6ea3-4fb5-9ca7-1f56622887fb
1240+
status:
1241+
code: 204
1242+
message: No Content
11031243
version: 1

0 commit comments

Comments
 (0)