def test_dsidm_service_create(topology_st):
    """ Test dsidm service create option

    :id: 338efbc6-51e1-11ec-a83a-3497f624ea11
    :setup: Standalone instance
    :steps:
         1. Run dsidm service create
         2. Check that a message is provided on creation
         3. Check that created service exists
    :expectedresults:
         1. Success
         2. Success
         3. Success
    """

    standalone = topology_st.standalone
    service_name = 'new_service'
    output = f'Successfully created {service_name}'

    args = FakeArgs()
    args.cn = service_name
    args.description = service_name

    log.info('Test dsidm service create')
    create(standalone, DEFAULT_SUFFIX, topology_st.logcap.log, args)
    check_value_in_log_and_reset(topology_st, check_value=output)

    log.info('Check that service is present')
    services = ServiceAccounts(standalone, DEFAULT_SUFFIX)
    new_service = services.get(service_name)
    assert new_service.exists()

    log.info('Clean up for next test')
    new_service.delete()
示例#2
0
def test_attr_encrypt(topology_st, create_backend):
    """Test adding/removing encrypted attrs

    :id: 887429d5-b9be-4e48-b8ca-691e7437abca
    :setup: Standalone instance
    :steps:
        1. Add encrypted attr
        2. Verify it succeeded
        3. Delete encrypted attr
        4. Verity it was removed
    :expectedresults:
        1. Success
        2. Success
        3. Success
        4. Success

    """
    sys.stdout = io.StringIO()
    args = FakeArgs()
    args.cn = BE_NAME
    args.be_name = BE_NAME
    args.suffix = False
    args.nsslapd_suffix = SUFFIX
    args.json = False
    args.just_names = False
    args.list = False
    args.add_attr = None
    args.del_attr = None

    # Add an encrytped attr
    args.add_attr = ['description']
    backend_attr_encrypt(topology_st.standalone, None, None, args)
    args.add_attr = None
    check_output("added encrypted attribute")

    # Verify it worked
    args.list = True
    backend_attr_encrypt(topology_st.standalone, None, None, args)
    args.list = False
    check_output("cn: description")

    # Delete encrypted attr
    args.del_attr = ['description']
    backend_attr_encrypt(topology_st.standalone, None, None, args)
    args.del_attr = None
    check_output("deleted encrypted attribute")

    # Verify it worked
    args.list = True
    backend_attr_encrypt(topology_st.standalone, None, None, args)
    args.list = False
    check_output("cn: description", missing=True)
示例#3
0
    def fin():
        sys.stdout = io.StringIO()
        args = FakeArgs()
        args.cn = BE_NAME
        args.be_name = BE_NAME
        args.suffix = SUFFIX
        args.skip_subsuffixes = False
        args.json = False

        # Delete backend
        backend_delete(topology_st.standalone, None, None, args, warn=False)
        check_output("successfully deleted")

        # Verify it's removed
        args.suffix = False
        backend_list(topology_st.standalone, None, None, args)
        check_output("backendroot", missing=True)
示例#4
0
def test_backend_cli(topology):
    #
    args = FakeArgs()
    backend_list(topology.standalone, None, topology.logcap.log, None)
    # Assert none.
    assert (topology.logcap.contains("No objects to display"))
    topology.logcap.flush()
    # Add a backend
    # We need to fake the args
    args.cn = 'userRoot'
    args.nsslapd_suffix = 'dc=example,dc=com'
    backend_create(topology.standalone, None, topology.logcap.log, args)
    # Assert one.
    backend_list(topology.standalone, None, topology.logcap.log, None)
    # Assert none.
    assert (topology.logcap.contains("userRoot"))
    topology.logcap.flush()
    # Assert we can get by name, suffix, dn
    args.selector = 'userRoot'
    backend_get(topology.standalone, None, topology.logcap.log, args)
    # Assert none.
    assert (topology.logcap.contains("userRoot"))
    topology.logcap.flush()
    # Assert we can get by name, suffix, dn
    args.dn = 'cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
    backend_get_dn(topology.standalone, None, topology.logcap.log, args)
    # Assert none.
    assert (topology.logcap.contains("userRoot"))
    topology.logcap.flush()
    # delete it
    backend_delete(topology.standalone,
                   None,
                   topology.logcap.log,
                   args,
                   warn=False)
    backend_list(topology.standalone, None, topology.logcap.log, None)
    # Assert none.
    assert (topology.logcap.contains("No objects to display"))
    topology.logcap.flush()
示例#5
0
def create_backend(topology_st, request):
    """Create backend "dc=backend,dc=test" / backendRoot
    """
    sys.stdout = io.StringIO()

    args = FakeArgs()
    args.cn = BE_NAME
    args.be_name = BE_NAME
    args.suffix = False
    args.nsslapd_suffix = SUFFIX
    args.skip_subsuffixes = False
    args.json = False
    args.parent_suffix = False
    args.create_entries = True

    args.suffix = SUFFIX
    backend_create(topology_st.standalone, None, None, args)
    check_output("The database was successfully created")

    def fin():
        sys.stdout = io.StringIO()
        args = FakeArgs()
        args.cn = BE_NAME
        args.be_name = BE_NAME
        args.suffix = SUFFIX
        args.skip_subsuffixes = False
        args.json = False

        # Delete backend
        backend_delete(topology_st.standalone, None, None, args, warn=False)
        check_output("successfully deleted")

        # Verify it's removed
        args.suffix = False
        backend_list(topology_st.standalone, None, None, args)
        check_output("backendroot", missing=True)

    request.addfinalizer(fin)
示例#6
0
def test_dsidm_user_create(topology_st):
    """ Test dsidm user create option

    :id: 862f5875-11fd-4e8e-92c1-397010386eb8
    :setup: Standalone instance
    :steps:
         1. Run dsidm user create
         2. Check that a message is provided on creation
         3. Check that created user exists
    :expectedresults:
         1. Success
         2. Success
         3. Success
    """

    standalone = topology_st.standalone
    user_name = 'new_user'
    output = 'Successfully created {}'.format(user_name)

    args = FakeArgs()
    args.uid = user_name
    args.cn = user_name
    args.displayName = user_name
    args.uidNumber = '1030'
    args.gidNumber = '2030'
    args.homeDirectory = '/home/{}'.format(user_name)

    log.info('Test dsidm user create')
    create(standalone, DEFAULT_SUFFIX, topology_st.logcap.log, args)
    check_value_in_log_and_reset(topology_st, check_value=output)

    log.info('Check that user is present')
    users = nsUserAccounts(standalone, DEFAULT_SUFFIX)
    new_user = users.get(user_name)
    assert new_user.exists()

    log.info('Clean up for next test')
    new_user.delete()
示例#7
0
def test_group_tasks(topology):
    # First check that our test group isn't there:
    topology.logcap.flush()
    g_args = FakeArgs()
    g_args.selector = 'testgroup'
    with pytest.raises(ldap.NO_SUCH_OBJECT):
        get(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, g_args)

    # Create a group
    topology.logcap.flush()
    g_args.cn = 'testgroup'
    create(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, g_args)
    assert (topology.logcap.contains("Sucessfully created testgroup"))

    # Assert it exists
    topology.logcap.flush()
    g_args = FakeArgs()
    g_args.selector = 'testgroup'
    get(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, g_args)
    assert (topology.logcap.contains(
        "dn: cn=testgroup,ou=groups,dc=example,dc=com"))

    # Add a user
    topology.logcap.flush()
    u_args = FakeArgs()
    u_args.uid = 'testuser'
    u_args.cn = 'Test User'
    u_args.displayName = 'Test User'
    u_args.homeDirectory = '/home/testuser'
    u_args.uidNumber = '5000'
    u_args.gidNumber = '5000'
    create_user(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log,
                u_args)
    assert (topology.logcap.contains("Sucessfully created testuser"))

    # Add them to the group as a member
    topology.logcap.flush()
    g_args.cn = "testgroup"
    g_args.dn = "uid=testuser,ou=people,dc=example,dc=com"
    add_member(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log,
               g_args)
    assert (topology.logcap.contains("added member"))

    # Check they are a member
    topology.logcap.flush()
    g_args.cn = "testgroup"
    members(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, g_args)
    assert (
        topology.logcap.contains("uid=testuser,ou=people,dc=example,dc=com"))

    # Remove them from the group
    topology.logcap.flush()
    g_args.cn = "testgroup"
    g_args.dn = "uid=testuser,ou=people,dc=example,dc=com"
    remove_member(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log,
                  g_args)
    assert (topology.logcap.contains("removed member"))

    # Check they are not a member
    topology.logcap.flush()
    g_args.cn = "testgroup"
    members(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, g_args)
    assert (topology.logcap.contains("No members to display"))

    # Delete the group
    topology.logcap.flush()
    g_args.dn = "cn=testgroup,ou=groups,dc=example,dc=com"
    delete(topology.standalone,
           DEFAULT_SUFFIX,
           topology.logcap.log,
           g_args,
           warn=False)
    assert (topology.logcap.contains(
        "Sucessfully deleted cn=testgroup,ou=groups,dc=example,dc=com"))
示例#8
0
def test_backend_cli(topology_st, create_backend):
    """Test creating, listing, getting, and deleting a backend (and subsuffix)
    :id: 800f432a-52ab-4661-ac66-a2bdd9b984d7
    :setup: Standalone instance
    :steps:
        1. List backends
        2. Get backend by suffix
        3. Get backend by DN
        4. Add subsuffix
        5. Verify subsuffix
        6. Modify subsuffix
        7. Delete subsuffix
        8. Verify subsuffix is removed
        9. Modify backend
        10. Verify modify worked
        11. Test monitor works
    :expectedresults:
        1. Success
        2. Success
        3. Success
        4. Success
        5. Success
        6. Success
        7. Success
        8. Success
        9. Success
        10. Success
        11. Success
    """
    topology_st.logcap = LogCapture()
    sys.stdout = io.StringIO()

    args = FakeArgs()
    args.cn = BE_NAME
    args.be_name = BE_NAME
    args.suffix = False
    args.nsslapd_suffix = SUFFIX
    args.skip_subsuffixes = False
    args.json = False
    args.parent_suffix = False
    args.create_entries = True

    # List backend
    backend_list(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(SUFFIX)

    # Get backend by by name
    args.selector = BE_NAME
    backend_get(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(BE_NAME)

    # Get backend by DN
    args.dn = 'cn=backendRoot,cn=ldbm database,cn=plugins,cn=config'
    backend_get_dn(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(BE_NAME)

    # Add subsuffix
    args.parent_suffix = SUFFIX
    args.suffix = SUB_SUFFIX
    args.be_name = SUB_BE_NAME
    backend_create(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("The database was successfully created")

    # Verify subsuffix
    args.suffix = False
    backend_list(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(SUB_SUFFIX)

    # Modify subsuffix
    args.enable = False
    args.disable = False
    args.add_referral = False
    args.del_referral = False
    args.cache_size = False
    args.cache_memsize = False
    args.dncache_memsize = False
    args.enable_readonly = True  # Setting nsslapd-readonly to "on"
    args.disable_readonly = False
    backend_set(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("successfully updated")

    # Verify modified worked
    args.selector = SUB_BE_NAME
    backend_get(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("nsslapd-readonly: on")

    # Delete subsuffix
    args.suffix = SUB_SUFFIX
    backend_delete(topology_st.standalone,
                   None,
                   topology_st.logcap.log,
                   args,
                   warn=False)
    check_output("successfully deleted")

    # Verify it is deleted
    args.suffix = False
    backend_list(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(SUB_BE_NAME, missing=True)

    # Modify backend (use same args from subsuffix modify)
    args.be_name = BE_NAME
    backend_set(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("successfully updated")

    # Verify modified worked
    args.selector = BE_NAME
    backend_get(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("nsslapd-readonly: on")

    # Run database monitor
    args.suffix = SUFFIX
    get_monitor(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("entrycachetries")
示例#9
0
def test_vlv(topology_st, create_backend):
    """Test creating, listing, getting, and deleting vlv's
    :id: 800f432a-52ab-4661-ac66-a2bdd9b984d790
    :setup: Standalone instance
    :steps:
        1. Add VLV search and index entries
        2. Verify they are created
        3. Edit VLV search and verify change
        4. Create additional VLV indexes
        5. Verity new indedxes were created
        6. Remove VLV indexes
        7. Verify indexes were removed
        8. Reindex VLV
    :expectedresults:
        1. Success
        2. Success
        3. Success
        4. Success
        5. Success
        6. Success
        7. Success
        8. Success

    """
    sys.stdout = io.StringIO()
    args = FakeArgs()
    args.cn = BE_NAME
    args.be_name = BE_NAME
    args.suffix = False
    args.nsslapd_suffix = SUFFIX
    args.json = False
    args.name = "myVLVSearch"
    args.index_name = "myVLVIndex"
    args.search_base = SUFFIX
    args.search_scope = '2'
    args.search_filter = "cn=*"
    args.parent_name = args.name
    args.index = False
    args.reindex = False
    args.sort = "cn sn"
    args.just_names = False

    # Create vlv search
    backend_create_vlv(topology_st.standalone, None, None, args)
    check_output("created new VLV Search entry")

    # Verify search is present
    backend_get_vlv(topology_st.standalone, None, None, args)
    check_output("VLV Search:")

    # Create VLV index under vlvSearch
    backend_create_vlv_index(topology_st.standalone, None, None, args)
    check_output("created new VLV index entry")

    # Verify index is present
    backend_get_vlv(topology_st.standalone, None, None, args)
    check_output("VLV Index:")

    # Edit VLV Search
    args.search_base = None
    args.search_scope = '0'
    args.search_filter = None
    args.sort = None
    backend_edit_vlv(topology_st.standalone, None, None, args)
    check_output("updated VLV search entry")

    # Verify edit was successful
    backend_get_vlv(topology_st.standalone, None, None, args)
    check_output("vlvscope: 0")

    # List vlv searches
    backend_list_vlv(topology_st.standalone, None, None, args)
    check_output("vlvbase: " + SUFFIX)

    # Add another index
    args.index_name = "my2ndVLVIndex"
    args.sort = "uid givenname"
    backend_create_vlv_index(topology_st.standalone, None, None, args)
    check_output("created new VLV index entry")

    # Verify new index was created
    backend_get_vlv(topology_st.standalone, None, None, args)
    check_output("vlvsort: uid givenname")

    # Reindex VLV
    backend_reindex_vlv(topology_st.standalone, None, None, args)
    check_output("reindexed VLV indexes")
    time.sleep(2)

    # Delete VLV search and indexes
    backend_del_vlv(topology_st.standalone, None, None, args)
    check_output("deleted VLV search and its indexes")

    # List vlv searches/indexes
    backend_list_vlv(topology_st.standalone, None, None, args)
    check_output("")
示例#10
0
def test_indexes(topology_st, create_backend):
    """Test creating, listing, getting, and deleting an index
    :id: 800f432a-52ab-4661-ac66-a2bdd9b984d78
    :setup: Standalone instance
    :steps:
        1. Add index (description)
        2. Verify index was added
        3. Modify index (Add type)
        4. Verify index was modified
        5. Modify index (Delete type)
        6. Verify index was modified
        7. Modify index (Add MR)
        8. Verify index was modified
        9. Modify index (Delete MR)
        10. Verify index was modified
        11. Reindex index
        12. Remove index
        13. Verify index was removed

    :expectedresults:
        1. Success
        2. Success
        3. Success
        4. Success
        5. Success
        6. Success
        7. Success
        8. Success
        9. Success
        10. Success
        11. Success
        12. Success
        13. Success
    """
    sys.stdout = io.StringIO()

    args = FakeArgs()
    args.cn = BE_NAME
    args.be_name = BE_NAME
    args.suffix = False
    args.nsslapd_suffix = SUFFIX
    args.attr = 'description'
    args.index_type = 'eq'
    args.matching_rule = None
    args.reindex = False
    args.json = False
    args.just_names = False
    args.add_type = None
    args.del_type = None
    args.add_mr = None
    args.del_mr = None

    # Add an index
    backend_add_index(topology_st.standalone, None, None, args)
    check_output("added index")

    # List indexes
    backend_list_index(topology_st.standalone, None, None, args)
    check_output("cn: description")

    # Modify index (Add type)
    args.add_type = ['sub']
    backend_set_index(topology_st.standalone, None, None, args)
    args.add_type = None
    check_output("successfully updated")

    # Verify type was added
    args.attr = ['description']
    backend_get_index(topology_st.standalone, None, None, args)
    check_output("nsindextype: sub")

    # Remove index type sub
    args.attr = 'description'

    args.del_type = ['sub']
    backend_set_index(topology_st.standalone, None, None, args)
    args.del_type = None
    check_output("successfully updated")

    # Verify type was removed
    args.attr = ['description']
    backend_get_index(topology_st.standalone, None, None, args)
    check_output("nsindextype: sub", missing=True)

    # Modify index (add MR)
    args.attr = 'description'
    args.add_mr = ['1.1.1.1.1.1']
    backend_set_index(topology_st.standalone, None, None, args)
    args.add_mr = None
    check_output("successfully updated")

    # Verify MR was added
    args.attr = ['description']
    backend_get_index(topology_st.standalone, None, None, args)
    check_output("nsmatchingrule: 1.1.1.1.1.1")

    # Modify index (delete MR)
    args.attr = 'description'
    args.del_mr = ['1.1.1.1.1.1']
    backend_set_index(topology_st.standalone, None, None, args)
    args.del_mr = None
    check_output("successfully updated")

    # Verify MR was added
    args.attr = ['description']
    backend_get_index(topology_st.standalone, None, None, args)
    check_output("nsmatchingrule: 1.1.1.1.1.1", missing=True)

    # Reindex index
    backend_reindex(topology_st.standalone, None, None, args)
    check_output("reindexed database")
    time.sleep(2)

    # Delete index
    backend_del_index(topology_st.standalone, None, None, args)
    check_output("deleted index")

    # Verify index was removed
    backend_list_index(topology_st.standalone, None, None, args)
    check_output("cn: description", missing=True)
示例#11
0
def test_chaining_cli(topology_st, create_backend):
    """Test creating, listing, getting, and deleting a backend (and subsuffix)

    :id: 800f432a-52ab-4661-ac66-a2bdd9b984d7
    :setup: Standalone instance
    :steps:
        1. Update config controls and components
        2. Verify update to config
        3. Set default config
        4. Verify update to default config
        5. Add DB Link
        6. Verify Link was created
        7. Edit Link
        8. Verify edit to link
        9. Test monitor
        10. Delete link
        11. Verify link was deleted
    :expectedresults:
        1. Success
        2. Success
        3. Success
        4. Success
        5. Success
        6. Success
        7. Success
        8. Success
        9. Success
        10. Success
        11. Success
    """
    topology_st.logcap = LogCapture()
    sys.stdout = io.StringIO()
    args = FakeArgs()
    args.CHAIN_NAME = [LINK_NAME]
    args.suffix = LINK_SUFFIX
    args.json = False
    args.add_control = None
    args.del_control = None
    args.add_comp = None
    args.del_comp = None

    # Set config (add control)
    args.add_control = '1.1.1.1.1.1.1'
    config_set(topology_st.standalone, None, None, args)
    args.add_control = None
    check_output("updated chaining configuration")

    # Verify config change
    config_get(topology_st.standalone, None, None, args)
    check_output("1.1.1.1.1.1.1")

    # Set config (delete control)
    args.del_control = '1.1.1.1.1.1.1'
    config_set(topology_st.standalone, None, None, args)
    args.del_control = None
    check_output("updated chaining configuration")

    # Verify config change
    config_get(topology_st.standalone, None, None, args)
    check_output("1.1.1.1.1.1.1", missing=True)

    # Set config (add comp)
    args.add_comp = 'cn=test,cn=config'
    config_set(topology_st.standalone, None, None, args)
    args.add_comp = None
    check_output("updated chaining configuration")

    # Verify config change
    config_get(topology_st.standalone, None, None, args)
    check_output('cn=test,cn=config')

    # Set config (delete comp)
    args.del_comp = 'cn=test,cn=config'
    config_set(topology_st.standalone, None, None, args)
    args.del_comp = None
    check_output("updated chaining configuration")

    # Verify config change
    config_get(topology_st.standalone, None, None, args)
    check_output("cn=test,cn=config", missing=True)

    # Set default config
    args.time_limit = '5555'
    def_config_set(topology_st.standalone, None, None, args)
    check_output("updated chaining default instance creation configuration")

    # Verify default config change
    def_config_get(topology_st.standalone, None, None, args)
    check_output("nsslapd_timelimit: 5555")

    # Create database link
    args.server_url = "ldap://localhost.localdomain"
    args.bind_dn = "cn=link_admin," + SUFFIX
    args.bind_pw = "secret_157"
    args.bind_mech = "LDAP"
    create_link(topology_st.standalone, None, None, args)
    check_output("created database link")

    # Verify link was created
    list_links(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(LINK_NAME)

    # Edit link
    args.bind_dn = "uid=newuser,cn=config"
    args.suffix = None
    edit_link(topology_st.standalone, None, None, args)
    check_output("updated database chaining link")

    # Verify link was edited
    args.cn = LINK_NAME
    get_link(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("uid=newuser,cn=config")

    # Test monitor
    time.sleep(2)  # need time for link to start up and generate monitor
    monitor_link(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("nssearchonelevelcount: ")

    # Delete link
    delete_link(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output("deleted database link")

    # Verify link was deleted
    list_links(topology_st.standalone, None, topology_st.logcap.log, args)
    check_output(LINK_NAME, missing=True)
示例#12
0
def test_user_tasks(topology):
    be_args = FakeArgs()

    be_args.cn = 'userRoot'
    be_args.nsslapd_suffix = DEFAULT_SUFFIX
    backend_create(topology.standalone, None, topology.logcap.log, be_args)

    # And add the skeleton objects.
    init_args = FakeArgs()
    init_args.version = INSTALL_LATEST_CONFIG
    initialise(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, init_args)

    # First check that our test user isn't there:
    topology.logcap.flush()
    u_args = FakeArgs()
    u_args.selector = 'testuser'
    with pytest.raises(ldap.NO_SUCH_OBJECT):
        get(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)

    # Create the user
    topology.logcap.flush()
    u_args.uid = 'testuser'
    # u_args.sn = 'testuser'
    u_args.cn = 'Test User'
    u_args.displayName = 'Test User'
    u_args.homeDirectory = '/home/testuser'
    u_args.uidNumber = '5000'
    u_args.gidNumber = '5000'
    create(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)

    assert(topology.logcap.contains("Sucessfully created testuser"))
    # Assert they exist
    topology.logcap.flush()
    get(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)
    assert(topology.logcap.contains('dn: uid=testuser,ou=people,dc=example,dc=com'))

    # Reset the password

    # Lock the account, check status
    topology.logcap.flush()
    lock(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)
    assert(topology.logcap.contains('locked'))

    topology.logcap.flush()
    status(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)
    assert(topology.logcap.contains('locked: True'))

    # Unlock check status
    topology.logcap.flush()
    unlock(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)
    assert(topology.logcap.contains('unlocked'))

    topology.logcap.flush()
    status(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args)
    assert(topology.logcap.contains('locked: False'))

    # Enroll a dummy cert

    # Enroll a dummy sshkey

    # Delete it 
    topology.logcap.flush()
    u_args.dn = 'uid=testuser,ou=people,dc=example,dc=com'
    delete(topology.standalone, DEFAULT_SUFFIX, topology.logcap.log, u_args, warn=False)
    assert(topology.logcap.contains('Sucessfully deleted uid=testuser,ou=people,dc=example,dc=com'))