Beispiel #1
0
def test_get_deploy_info_does_not_exist(mock_read_deploy, capfd):
    mock_read_deploy.return_value = False
    with raises(SystemExit) as sys_exit:
        status.get_deploy_info('fake_service')
    output, _ = capfd.readouterr()
    assert sys_exit.value.code == 1
    assert output.startswith('Error encountered with')
Beispiel #2
0
def test_get_deploy_info_does_not_exist(mock_stdout, mock_read_deploy):
    mock_read_deploy.return_value = False
    expected_output = '%s\n' % PaastaCheckMessages.DEPLOY_YAML_MISSING
    with raises(SystemExit) as sys_exit:
        status.get_deploy_info('fake_service')
    output = mock_stdout.getvalue()
    assert sys_exit.value.code == 1
    assert output == expected_output
Beispiel #3
0
def test_get_deploy_info_does_not_exist(mock_stdout, mock_read_deploy):
    mock_read_deploy.return_value = False
    expected_output = "%s\n" % PaastaCheckMessages.DEPLOY_YAML_MISSING
    with raises(SystemExit) as sys_exit:
        status.get_deploy_info("fake_service")
    output = mock_stdout.getvalue()
    assert sys_exit.value.code == 1
    assert output == expected_output
Beispiel #4
0
def test_get_deploy_info_exists(mock_read_deploy):
    expected = 'fake deploy yaml'
    mock_read_deploy.return_value = expected
    actual = status.get_deploy_info('fake_service')
    assert expected == actual
Beispiel #5
0
def test_get_deploy_info_exists(mock_read_deploy):
    expected = "fake deploy yaml"
    mock_read_deploy.return_value = expected
    actual = status.get_deploy_info("fake_service")
    assert expected == actual
Beispiel #6
0
def test_get_deploy_info_exists(mock_read_deploy, mock_join):
    expected = 'fake deploy yaml'
    mock_read_deploy.return_value = expected
    actual = status.get_deploy_info('fake_service')
    assert expected == actual