Пример #1
0
def test_version_2_manifest_scp_sm_input(s3_setup):
    manifest_name = 'manifest_version_2.yaml'
    file_path = TESTS_DIR + manifest_name
    os.environ['MANIFEST_FILE_NAME'] = manifest_name
    os.environ['MANIFEST_FILE_PATH'] = file_path
    os.environ['MANIFEST_FOLDER'] = file_path[:-len(manifest_name)]
    os.environ['STAGE_NAME'] = 'scp'

    sm_input_list = parse.scp_manifest()
    logger.info("SCP sm_input_list:")
    logger.info(sm_input_list)
    assert sm_input_list[0]['ResourceProperties']['PolicyDocument'][
        'Name'] == "test-preventive-guardrails"
    assert sm_input_list[1]['ResourceProperties']['PolicyDocument'][
        'Name'] == "test-guardrails-2"
def get_scp_inputs() -> list:
    return parse.scp_manifest()