-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathtest_blockstorage.py
More file actions
40 lines (30 loc) · 1022 Bytes
/
test_blockstorage.py
File metadata and controls
40 lines (30 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from test.integration.conftest import get_region
from test.integration.helpers import get_test_label, retry_sending_request
def test_config_create_with_extended_volume_limit(test_linode_client):
client = test_linode_client
region = get_region(client, {"Linodes", "Block Storage"}, site_type="core")
label = get_test_label()
linode, _ = client.linode.instance_create(
"g6-standard-6",
region,
image="linode/debian12",
label=label,
)
volumes = [
client.volume_create(
f"{label}-vol-{i}",
region=region,
size=10,
)
for i in range(12)
]
config = linode.config_create(volumes=volumes)
devices = config._raw_json["devices"]
assert len([d for d in devices.values() if d is not None]) == 12
assert "sdi" in devices
assert "sdj" in devices
assert "sdk" in devices
assert "sdl" in devices
linode.delete()
for v in volumes:
retry_sending_request(3, v.delete)