|
9 | 9 | from constants import API_URL |
10 | 10 | from constants import LOCKS_PATH |
11 | 11 | from constants import RUNNER_ID |
| 12 | +from constants import CUSTOM_IMAGE_ALPINE_URL |
| 13 | +from constants import CUSTOM_IMAGE_DEBIAN_URL |
12 | 14 | from datetime import datetime |
13 | 15 | from datetime import timedelta |
14 | 16 | from events import trigger |
|
22 | 24 | from resources import Server |
23 | 25 | from resources import ServerGroup |
24 | 26 | from resources import Volume |
25 | | -from urllib.parse import urlparse |
26 | 27 | from util import extract_short_error |
27 | 28 | from util import global_run_id |
28 | 29 | from util import in_parallel |
@@ -626,47 +627,25 @@ def private_network(create_private_network): |
626 | 627 | return create_private_network() |
627 | 628 |
|
628 | 629 |
|
629 | | -@pytest.fixture(scope='session') |
630 | | -def custom_image_prefix(): |
631 | | - """ The prefix to use for custom images stored in S3. """ |
632 | | - |
633 | | - host = urlparse(API_URL).netloc |
634 | | - |
635 | | - if host == 'api.cloudscale.ch': |
636 | | - return 'prod' |
637 | | - |
638 | | - return host.split('.', 1)[0].split('-')[0] |
639 | | - |
640 | | - |
641 | 630 | @pytest.fixture(scope='session', params=['raw', 'qcow2', 'iso']) |
642 | | -def custom_alpine_image(request, upload_custom_image, custom_image_prefix): |
| 631 | +def custom_alpine_image(request, upload_custom_image): |
643 | 632 | """ A session scoped custom Alpine image. """ |
644 | 633 |
|
645 | | - host = 'https://at-images.objects.lpg.cloudscale.ch' |
646 | | - path = f'{custom_image_prefix}/alpine' |
647 | | - |
648 | 634 | return upload_custom_image( |
649 | 635 | img_name='Alpine', |
650 | | - img=f'{host}/{path}', |
| 636 | + img=CUSTOM_IMAGE_ALPINE_URL, |
651 | 637 | firmware_type='bios', |
652 | 638 | fmt=request.param |
653 | 639 | ) |
654 | 640 |
|
655 | 641 |
|
656 | 642 | @pytest.fixture(scope='session', params=['raw', 'qcow2']) |
657 | | -def custom_debian_uefi_image( |
658 | | - request, |
659 | | - upload_custom_image, |
660 | | - custom_image_prefix, |
661 | | -): |
| 643 | +def custom_debian_uefi_image(request, upload_custom_image): |
662 | 644 | """ A session scoped custom Debian UEFI image. """ |
663 | 645 |
|
664 | | - host = 'https://at-images.objects.lpg.cloudscale.ch' |
665 | | - path = f'{custom_image_prefix}/debian' |
666 | | - |
667 | 646 | return upload_custom_image( |
668 | 647 | img_name='Debian UEFI', |
669 | | - img=f'{host}/{path}', |
| 648 | + img=CUSTOM_IMAGE_DEBIAN_URL, |
670 | 649 | firmware_type='uefi', |
671 | 650 | fmt=request.param |
672 | 651 | ) |
|
0 commit comments