Example #1
0
def test_systemctl_show_doc_examples():
    env = {
        'SystemctlShowCinderVolume':
        SystemctlShowCinderVolume,
        'systemctl_show_cinder_volume':
        SystemctlShowCinderVolume(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'SystemctlShowMariaDB':
        SystemctlShowMariaDB,
        'systemctl_show_mariadb':
        SystemctlShowMariaDB(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'SystemctlShowPulpWorkers':
        SystemctlShowPulpWorkers,
        'systemctl_show_pulp_workers':
        SystemctlShowPulpWorkers(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'SystemctlShowPulpResourceManager':
        SystemctlShowPulpResourceManager,
        'systemctl_show_pulp_resource_manager':
        SystemctlShowPulpResourceManager(
            context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'SystemctlShowPulpCelerybeat':
        SystemctlShowPulpCelerybeat,
        'systemctl_show_pulp_celerybeat':
        SystemctlShowPulpCelerybeat(context_wrap(SYSTEMCTL_SHOW_EXAMPLES))
    }
    failed, total = doctest.testmod(systemctl_show, globs=env)
    assert failed == 0
def test_systemctl_show_doc_examples():
    env = {
        'systemctl_show_all':
        SystemctlShowServiceAll(context_wrap(SYSTEMCTL_SHOW_ALL_EXAMPLES)),
        'systemctl_show_target':
        SystemctlShowTarget(context_wrap(SYSTEMCTL_SHOW_TARGET)),
        # TODO: Remove the following test when removing the deprecated parsers.
        'systemctl_show_cinder_volume':
        SystemctlShowCinderVolume(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_mariadb':
        SystemctlShowMariaDB(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_workers':
        SystemctlShowPulpWorkers(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_resource_manager':
        SystemctlShowPulpResourceManager(
            context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_celerybeat':
        SystemctlShowPulpCelerybeat(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_httpd':
        SystemctlShowHttpd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_qpidd':
        SystemctlShowQpidd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_qdrouterd':
        SystemctlShowQdrouterd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_smartpdc':
        SystemctlShowSmartpdc(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_nginx':
        SystemctlShowNginx(context_wrap(SYSTEMCTL_SHOW_EXAMPLES))
    }
    failed, total = doctest.testmod(systemctl_show, globs=env)
    assert failed == 0
Example #3
0
def test_systemctl_show_doc_examples():
    env = {
        'systemctl_show_cinder_volume':
        SystemctlShowCinderVolume(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_mariadb':
        SystemctlShowMariaDB(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_workers':
        SystemctlShowPulpWorkers(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_resource_manager':
        SystemctlShowPulpResourceManager(
            context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_pulp_celerybeat':
        SystemctlShowPulpCelerybeat(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_httpd':
        SystemctlShowHttpd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_qpidd':
        SystemctlShowQpidd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_qdrouterd':
        SystemctlShowQdrouterd(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_smartpdc':
        SystemctlShowSmartpdc(context_wrap(SYSTEMCTL_SHOW_EXAMPLES)),
        'systemctl_show_nginx':
        SystemctlShowNginx(context_wrap(SYSTEMCTL_SHOW_EXAMPLES))
    }
    failed, total = doctest.testmod(systemctl_show, globs=env)
    assert failed == 0
def test_systemctl_show_pulp_workers():
    context = SystemctlShowPulpWorkers(context_wrap(SYSTEMCTL_SHOW_EXAMPLES))
    assert context["LimitNOFILE"] == "4096"
    assert len(context.data) == 21