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

    :id: dc60e388-f012-4164-a496-b12d6230cdc2

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

    :steps:
        1. Run foreman-maintain service stop.
        2. Run foreman-maintain service restart

    :expectedresults: service should restart.

    :CaseImportance: Critical
    """
    try:
        contacted = ansible_module.command(Service.service_stop())
        for result in contacted.values():
            logger.info(result['stdout'])
            assert "FAIL" not in result['stdout']
            assert result['rc'] == 0
        contacted = ansible_module.command(Service.service_restart())
        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_start())
        for result in teardown.values():
            assert result['rc'] == 0
Exemplo n.º 2
0
def test_positive_automate_bz1626651(ansible_module):
    """Disable services using foreman-maintain service

    :id: dc60e388-f012-4164-a496-b12d6230cdc2

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

    :steps:
        1. Run foreman-maintain service stop.
        2. Run foreman-maintain service restart

    :expectedresults: service should restart.

    :CaseImportance: Critical
    """
    try:
        contacted = ansible_module.command(Service.service_stop())
        for result in contacted.values():
            logger.info(result['stdout'])
            assert "FAIL" not in result['stdout']
            assert result['rc'] == 0
        contacted = ansible_module.command(Service.service_restart())
        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_start())
        for result in teardown.values():
            assert result['rc'] == 0
Exemplo n.º 3
0
def test_positive_foreman_maintain_service_list_sidekiq(ansible_module):
    """List sidekiq services with service list

    :id: 5acb68a9-c430-485d-bb45-b499adc90927

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

    :steps:
        1. Run foreman-maintain service list
        2. Run foreman-maintain service restart

    :expectedresults: Sidekiq-services should list and should restart.

    :CaseImportance: Medium
    """
    contacted = ansible_module.command(Service.service_list())
    for result in contacted.values():
        logger.info(result["stdout"])
        assert "FAIL" not in result["stdout"]
        assert result["rc"] == 0
        assert "[email protected]" in result["stdout"]

    contacted = ansible_module.command(Service.service_restart())
    for result in contacted.values():
        logger.info(result["stdout"])
        assert "FAIL" not in result["stdout"]
        assert result["rc"] == 0
        assert "dynflow-sidekiq@orchestrator" in result["stdout"]
        assert "dynflow-sidekiq@worker" in result["stdout"]
        assert "dynflow-sidekiq@worker-hosts-queue" in result["stdout"]
Exemplo n.º 4
0
def test_positive_fm_service_restart_bz_1696862(setup_bz_1696862,
                                                ansible_module):
    """Restart services using service restart

    :id: c7518650-d72a-47b1-8d38-42b862f474fc

    :setup:
        1. foreman-maintain should be installed.
        2. Run setup_bz_1696862 from conftest.py

    :steps:
        1. Run foreman-maintain service restart

    :expectedresults: Katello-services should restart even
     if hammer credentials are not available.

    :BZ: 1632768

    :CaseImportance: Critical
    """
    contacted = ansible_module.command(Service.service_restart())
    for result in contacted.values():
        logger.info(result["stdout"])
        assert "FAIL" not in result["stdout"]
        assert result["rc"] == 0
Exemplo n.º 5
0
def test_positive_foreman_maintain_service_restart(ansible_module):
    """Restart services using service restart

    :id: c5a38994-8c14-40c7-bc6a-1cfc68fc2d28

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

    :steps:
        1. Run foreman-maintain service restart

    :expectedresults: Katello-services should restart.

    :CaseImportance: Critical
    """
    contacted = ansible_module.command(Service.service_restart())
    for result in contacted.values():
        logger.info(result['stdout'])
        assert "FAIL" not in result['stdout']
        assert result['rc'] == 0
Exemplo n.º 6
0
def test_positive_foreman_maintain_service_restart(ansible_module):
    """Restart services using service restart

    :id: c5a38994-8c14-40c7-bc6a-1cfc68fc2d28

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

    :steps:
        1. Run foreman-maintain service restart

    :expectedresults: Katello-services should restart.

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