Exemplo n.º 1
0
def test_deploy_has_security_check_false(mock_pipeline_config, mock_stdout):
    mock_pipeline_config.return_value = [
        {'instancename': 'itest', },
        {'instancename': 'push-to-registry', },
        {'instancename': 'hab.canary', 'trigger_next_step_manually': True, },
        {'instancename': 'hab.main', },
    ]
    actual = deploy_has_security_check(service='fake_service', soa_dir='/fake/path')
    assert actual is False
Exemplo n.º 2
0
def test_deploy_has_security_check_false(mock_pipeline_config, capfd):
    mock_pipeline_config.return_value = [
        {'step': 'itest', },
        {'step': 'push-to-registry', },
        {'step': 'hab.canary', 'trigger_next_step_manually': True, },
        {'step': 'hab.main', },
    ]
    actual = deploy_has_security_check(service='fake_service', soa_dir='/fake/path')
    assert actual is False
Exemplo n.º 3
0
def test_deploy_has_security_check_false(mock_pipeline_config, capfd):
    mock_pipeline_config.return_value = [
        {"step": "itest"},
        {"step": "push-to-registry"},
        {"step": "hab.canary", "trigger_next_step_manually": True},
        {"step": "hab.main"},
    ]
    actual = deploy_has_security_check(service="fake_service", soa_dir="/fake/path")
    assert actual is False
def test_deploy_has_security_check_true(mock_pipeline_config, mock_stdout):
    mock_pipeline_config.return_value = [
        {'instancename': 'itest', },
        {'instancename': 'security-check', },
        {'instancename': 'push-to-registry', },
        {'instancename': 'hab.canary', 'trigger_next_step_manually': True, },
        {'instancename': 'hab.main', },
    ]
    actual = deploy_has_security_check(service='fake_service', soa_dir='/fake/path')
    assert actual is True