Exemplo n.º 1
0
def test_positive_service_disable(ansible_module):
    """Disable services using foreman-maintain service

    :id: e2c052e5-c2b6-4f0e-952b-3b0c22c66f22

    :setup:
        1. foreman-maintain should be installed.

    :steps:
        1. Run foreman-maintain service disable.

    :expectedresults: service should disable.

    :CaseImportance: Critical
    """
    try:
        contacted = ansible_module.command(Service.service_disable())
        for result in contacted.values():
            logger.info(result['stdout'])
            assert "FAIL" not in result['stdout']
            assert result['rc'] == 0
    finally:
        teardown = ansible_module.command(Service.service_enable())
        for result in teardown.values():
            assert result['rc'] == 0
Exemplo n.º 2
0
def test_positive_service_disable(ansible_module):
    """Disable services using foreman-maintain service

    :id: e2c052e5-c2b6-4f0e-952b-3b0c22c66f22

    :setup:
        1. foreman-maintain should be installed.

    :steps:
        1. Run foreman-maintain service disable.

    :expectedresults: service should disable.

    :CaseImportance: Critical
    """
    try:
        contacted = ansible_module.command(Service.service_disable())
        for result in contacted.values():
            logger.info(result['stdout'])
            assert "FAIL" not in result['stdout']
            assert result['rc'] == 0
    finally:
        teardown = ansible_module.command(Service.service_enable())
        for result in teardown.values():
            assert result['rc'] == 0
Exemplo n.º 3
0
def test_positive_service_enable(ansible_module):
    """Enable services using foreman-maintain service

    :id: a0e0a052-0e21-465c-bb28-2e7613dbece6

    :setup:
        1. foreman-maintain should be installed.

    :steps:
        1. Run foreman-maintain service enable.

    :expectedresults: service should enable.

    :CaseImportance: Critical
    """
    contacted = ansible_module.command(Service.service_enable())
    for result in contacted.values():
        logger.info(result['stdout'])
        assert "FAIL" not in result['stdout']
        assert result['rc'] == 0
Exemplo n.º 4
0
def test_positive_service_enable(ansible_module):
    """Enable services using foreman-maintain service

    :id: a0e0a052-0e21-465c-bb28-2e7613dbece6

    :setup:
        1. foreman-maintain should be installed.

    :steps:
        1. Run foreman-maintain service enable.

    :expectedresults: service should enable.

    :CaseImportance: Critical
    """
    contacted = ansible_module.command(Service.service_enable())
    for result in contacted.values():
        logger.info(result['stdout'])
        assert "FAIL" not in result['stdout']
        assert result['rc'] == 0