|
39 | 39 | CONTRACT_TEST_DEPENDENCY_FILE_NAME,
|
40 | 40 | CONTRACT_TEST_FILE_NAMES,
|
41 | 41 | CONTRACT_TEST_FOLDER,
|
42 |
| - FILE_GENERATION_ENABLED, |
43 | 42 | OVERRIDES_FILENAME,
|
44 | 43 | SCHEMA_UPLOAD_FILENAME,
|
45 | 44 | SETTINGS_FILENAME,
|
@@ -2796,7 +2795,6 @@ def test_generate_canary_files(project):
|
2796 | 2795 | "futureProperty": "value",
|
2797 | 2796 | "typeName": "AWS::Example::Resource",
|
2798 | 2797 | "canarySettings": {
|
2799 |
| - FILE_GENERATION_ENABLED: True, |
2800 | 2798 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
2801 | 2799 | },
|
2802 | 2800 | }
|
@@ -2850,7 +2848,6 @@ def test_create_template_file(mock_yaml_dump, project):
|
2850 | 2848 | "futureProperty": "value",
|
2851 | 2849 | "typeName": "AWS::Example::Resource",
|
2852 | 2850 | "canarySettings": {
|
2853 |
| - FILE_GENERATION_ENABLED: True, |
2854 | 2851 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
2855 | 2852 | },
|
2856 | 2853 | }
|
@@ -2932,30 +2929,6 @@ def setup_rpdk_config(project, rpdk_config):
|
2932 | 2929 | (contract_test_folder / CONTRACT_TEST_DEPENDENCY_FILE_NAME).touch()
|
2933 | 2930 |
|
2934 | 2931 |
|
2935 |
| -def test_generate_canary_files_when_not_enabled(project): |
2936 |
| - rpdk_config = { |
2937 |
| - ARTIFACT_TYPE_RESOURCE: "RESOURCE", |
2938 |
| - "language": LANGUAGE, |
2939 |
| - "runtime": RUNTIME, |
2940 |
| - "entrypoint": None, |
2941 |
| - "testEntrypoint": None, |
2942 |
| - "futureProperty": "value", |
2943 |
| - "typeName": "AWS::Example::Resource", |
2944 |
| - "canarySettings": { |
2945 |
| - FILE_GENERATION_ENABLED: False, |
2946 |
| - "contract_test_file_names": ["inputs_1.json", "inputs_2.json"], |
2947 |
| - }, |
2948 |
| - } |
2949 |
| - tmp_path = project.root |
2950 |
| - setup_rpdk_config(project, rpdk_config) |
2951 |
| - project.generate_canary_files() |
2952 |
| - |
2953 |
| - canary_root_path = tmp_path / TARGET_CANARY_ROOT_FOLDER |
2954 |
| - canary_folder_path = tmp_path / TARGET_CANARY_FOLDER |
2955 |
| - assert not canary_root_path.exists() |
2956 |
| - assert not canary_folder_path.exists() |
2957 |
| - |
2958 |
| - |
2959 | 2932 | def test_generate_canary_files_no_canary_settings(project):
|
2960 | 2933 | rpdk_config = {
|
2961 | 2934 | ARTIFACT_TYPE_RESOURCE: "RESOURCE",
|
@@ -2986,7 +2959,6 @@ def test_generate_canary_files_empty_input_files(project):
|
2986 | 2959 | "futureProperty": "value",
|
2987 | 2960 | "typeName": "AWS::Example::Resource",
|
2988 | 2961 | "canarySettings": {
|
2989 |
| - FILE_GENERATION_ENABLED: True, |
2990 | 2962 | "contract_test_file_names": [],
|
2991 | 2963 | },
|
2992 | 2964 | }
|
@@ -3018,8 +2990,8 @@ def test_generate_canary_files_empty_canary_settings(project):
|
3018 | 2990 | project.generate_canary_files()
|
3019 | 2991 | canary_root_path = tmp_path / TARGET_CANARY_ROOT_FOLDER
|
3020 | 2992 | canary_folder_path = tmp_path / TARGET_CANARY_FOLDER
|
3021 |
| - assert not canary_root_path.exists() |
3022 |
| - assert not canary_folder_path.exists() |
| 2993 | + assert canary_root_path.exists() |
| 2994 | + assert canary_folder_path.exists() |
3023 | 2995 |
|
3024 | 2996 |
|
3025 | 2997 | def _get_mock_yaml_dump_call_arg(
|
@@ -3063,7 +3035,6 @@ def test_generate_canary_files_with_patch_inputs(mock_yaml_dump, project):
|
3063 | 3035 | "futureProperty": "value",
|
3064 | 3036 | "typeName": "AWS::Example::Resource",
|
3065 | 3037 | "canarySettings": {
|
3066 |
| - FILE_GENERATION_ENABLED: True, |
3067 | 3038 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3068 | 3039 | },
|
3069 | 3040 | }
|
@@ -3144,7 +3115,6 @@ def test_create_template_file_with_patch_inputs(mock_yaml_dump, project):
|
3144 | 3115 | "futureProperty": "value",
|
3145 | 3116 | "typeName": "AWS::Example::Resource",
|
3146 | 3117 | "canarySettings": {
|
3147 |
| - FILE_GENERATION_ENABLED: True, |
3148 | 3118 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3149 | 3119 | },
|
3150 | 3120 | }
|
@@ -3246,7 +3216,6 @@ def test_create_template_file_by_list_index(mock_yaml_dump, project):
|
3246 | 3216 | "futureProperty": "value",
|
3247 | 3217 | "typeName": "AWS::Example::Resource",
|
3248 | 3218 | "canarySettings": {
|
3249 |
| - FILE_GENERATION_ENABLED: True, |
3250 | 3219 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3251 | 3220 | },
|
3252 | 3221 | }
|
@@ -3324,7 +3293,6 @@ def test_create_template_file_with_skipped_patch_operation(mock_yaml_dump, proje
|
3324 | 3293 | "futureProperty": "value",
|
3325 | 3294 | "typeName": "AWS::Example::Resource",
|
3326 | 3295 | "canarySettings": {
|
3327 |
| - FILE_GENERATION_ENABLED: True, |
3328 | 3296 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3329 | 3297 | },
|
3330 | 3298 | }
|
@@ -3403,7 +3371,6 @@ def test_create_template_file_with_patch_inputs_missing_from_create(
|
3403 | 3371 | "futureProperty": "value",
|
3404 | 3372 | "typeName": "AWS::Example::Resource",
|
3405 | 3373 | "canarySettings": {
|
3406 |
| - FILE_GENERATION_ENABLED: True, |
3407 | 3374 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3408 | 3375 | },
|
3409 | 3376 | }
|
@@ -3499,7 +3466,6 @@ def test_create_template_file_throws_error_with_invalid_path(mock_yaml_dump, pro
|
3499 | 3466 | "futureProperty": "value",
|
3500 | 3467 | "typeName": "AWS::Example::Resource",
|
3501 | 3468 | "canarySettings": {
|
3502 |
| - FILE_GENERATION_ENABLED: True, |
3503 | 3469 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3504 | 3470 | },
|
3505 | 3471 | }
|
@@ -3555,7 +3521,6 @@ def test_create_template_file_with_nested_replace_patch_inputs(mock_yaml_dump, p
|
3555 | 3521 | "futureProperty": "value",
|
3556 | 3522 | "typeName": "AWS::Example::Resource",
|
3557 | 3523 | "canarySettings": {
|
3558 |
| - FILE_GENERATION_ENABLED: True, |
3559 | 3524 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3560 | 3525 | },
|
3561 | 3526 | }
|
@@ -3661,7 +3626,6 @@ def test_create_template_file_with_nested_remove_patch_inputs(mock_yaml_dump, pr
|
3661 | 3626 | "futureProperty": "value",
|
3662 | 3627 | "typeName": "AWS::Example::Resource",
|
3663 | 3628 | "canarySettings": {
|
3664 |
| - FILE_GENERATION_ENABLED: True, |
3665 | 3629 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3666 | 3630 | },
|
3667 | 3631 | }
|
@@ -3760,7 +3724,6 @@ def test_create_template_file_with_nested_add_patch_inputs(mock_yaml_dump, proje
|
3760 | 3724 | "futureProperty": "value",
|
3761 | 3725 | "typeName": "AWS::Example::Resource",
|
3762 | 3726 | "canarySettings": {
|
3763 |
| - FILE_GENERATION_ENABLED: True, |
3764 | 3727 | CONTRACT_TEST_FILE_NAMES: ["inputs_1.json", "inputs_2.json"],
|
3765 | 3728 | },
|
3766 | 3729 | }
|
|
0 commit comments