Пример #1
0
def test_get_default_interactive_config():
    with contextlib.nested(
            mock.patch('paasta_tools.adhoc_tools.load_adhoc_job_config',
                       autospec=True), ) as (mock_load_adhoc_job_config, ):
        mock_load_adhoc_job_config.return_value = adhoc_tools.AdhocJobConfig(
            service='fake_service',
            instance='interactive',
            cluster='fake_cluster',
            config_dict={},
            branch_dict={'deploy_group': 'fake_deploy_group'},
        )
        result = adhoc_tools.get_default_interactive_config(
            'fake_serivce', 'fake_cluster', '/fake/soa/dir')
        assert result.get_cpus() == 4
        assert result.get_mem() == 10240
        assert result.get_disk() == 1024
Пример #2
0
def test_get_default_interactive_config():
    with mock.patch("paasta_tools.adhoc_tools.load_adhoc_job_config",
                    autospec=True) as mock_load_adhoc_job_config:
        mock_load_adhoc_job_config.return_value = adhoc_tools.AdhocJobConfig(
            service="fake_service",
            instance="interactive",
            cluster="fake_cluster",
            config_dict={},
            branch_dict={"deploy_group": "fake_deploy_group"},
        )
        result = adhoc_tools.get_default_interactive_config(
            "fake_service",
            "fake_cluster",
            "/fake/soa/dir",
            load_deployments=False)
        assert result.get_cpus() == 4
        assert result.get_mem() == 10240
        assert result.get_disk() == 1024