|
16 | 16 | """ |
17 | 17 |
|
18 | 18 | from dataclasses import dataclass |
19 | | -from pathlib import Path |
20 | | -from acktest.resources import read_bootstrap_config |
| 19 | +from acktest.bootstrapping import Resources |
| 20 | +from acktest.bootstrapping.iam import Role |
| 21 | +from acktest.bootstrapping.vpc import VPC |
21 | 22 | from e2e import bootstrap_directory |
22 | 23 |
|
23 | 24 | @dataclass |
24 | | -class TestBootstrapResources: |
25 | | - AuthorizerRoleName: str |
26 | | - AuthorizerPolicyArn: str |
27 | | - AuthorizerRoleArn: str |
28 | | - AuthorizerFunctionName: str |
29 | | - AuthorizerFunctionArn: str |
| 25 | +class BootstrapResources(Resources): |
| 26 | + AuthorizerRole: Role |
| 27 | + VPC: VPC |
| 28 | + AuthorizerFunctionName: str = "" |
| 29 | + AuthorizerFunctionArn: str = "" |
30 | 30 |
|
31 | 31 |
|
32 | 32 | _bootstrap_resources = None |
33 | 33 |
|
34 | 34 |
|
35 | | -def get_bootstrap_resources(bootstrap_file_name: str = "bootstrap.yaml"): |
| 35 | +def get_bootstrap_resources(bootstrap_file_name: str = "bootstrap.pkl") -> BootstrapResources: |
36 | 36 | global _bootstrap_resources |
37 | 37 | if _bootstrap_resources is None: |
38 | | - _bootstrap_resources = TestBootstrapResources( |
39 | | - **read_bootstrap_config(bootstrap_directory, bootstrap_file_name=bootstrap_file_name), |
40 | | - ) |
| 38 | + _bootstrap_resources = BootstrapResources.deserialize(bootstrap_directory, bootstrap_file_name=bootstrap_file_name) |
41 | 39 | return _bootstrap_resources |
0 commit comments