Пример #1
0
def test_dcv_from_file_to_cfn(mocker, pcluster_config_reader, settings_label,
                              expected_cfn_params):
    """Unit tests for parsing EFS related options."""
    mocker.patch("pcluster.config.param_types.get_efs_mount_target_id",
                 return_value="mount_target_id")
    mocker.patch("pcluster.config.param_types.get_avail_zone",
                 return_value="mocked_avail_zone")
    utils.assert_section_params(mocker, pcluster_config_reader, settings_label,
                                expected_cfn_params)
Пример #2
0
def test_efs_from_file_to_cfn(mocker, pcluster_config_reader, settings_label,
                              expected_cfn_params):
    """Unit tests for parsing EFS related options."""
    mocker.patch(
        "pcluster.config.param_types.get_efs_mount_target_id",
        side_effect=lambda efs_fs_id, avail_zone: "master_mt"
        if avail_zone == "mocked_avail_zone" else None,
    )
    mocker.patch("pcluster.config.param_types.get_avail_zone",
                 return_value="mocked_avail_zone")
    utils.assert_section_params(mocker, pcluster_config_reader, settings_label,
                                expected_cfn_params)
def test_cw_log_from_file_to_cfn(mocker, pcluster_config_reader,
                                 settings_label, expected_cfn_params):
    """Verify various cw_log sections results in expected CFN parameters."""
    utils.assert_section_params(mocker, pcluster_config_reader, settings_label,
                                expected_cfn_params)
Пример #4
0
def test_ebs_from_file_to_cfn(mocker, pcluster_config_reader, settings_label,
                              expected_cfn_params):
    """Unit tests for parsing EBS related options."""
    utils.assert_section_params(mocker, pcluster_config_reader, settings_label,
                                expected_cfn_params)