コード例 #1
0
def test_systemd_system_origin_accounting():
    common_system_origin_accounting = config.SystemdOriginAccounting(
        context_wrap(SYSTEMD_SYSTEM_ORIGIN_ACCOUNTING))
    assert "Manager" in common_system_origin_accounting
    assert common_system_origin_accounting["Manager"][
        "DefaultCPUAccounting"] == 'True'
    assert common_system_origin_accounting["Manager"][
        "DefaultBlockIOAccounting"] == 'False'
コード例 #2
0
def test_doc_examples():
    env = {
            'docker_service': config.SystemdDocker(context_wrap(SYSTEMD_DOCKER)),
            'system_conf': config.SystemdSystemConf(context_wrap(SYSTEMD_SYSTEM_CONF)),
            'system_origin_accounting': config.SystemdOriginAccounting(context_wrap(SYSTEMD_SYSTEM_ORIGIN_ACCOUNTING)),
            'openshift_node_service': config.SystemdOpenshiftNode(context_wrap(SYSTEMD_OPENSHIFT_NODE)),
            'logind_conf': config.SystemdLogindConf(context_wrap(SYSTEMD_LOGIND_CONF)),
            'rpcbind_socket': config.SystemdRpcbindSocketConf(context_wrap(SYSTEMD_RPCBIND_SOCKET))
          }
    failed, total = doctest.testmod(config, globs=env)
    assert failed == 0