mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Tests: Remove silent deleting and creating entries by tracker
https://fedorahosted.org/freeipa/ticket/6123 Reviewed-By: Milan Kubik <mkubik@redhat.com>
This commit is contained in:
parent
135047d03c
commit
74e52e8686
@ -231,7 +231,7 @@ class TestFindGroup(XMLRPC_test):
|
||||
def test_search_for_all_groups(self, group, group2):
|
||||
""" Search for all groups """
|
||||
group.ensure_exists()
|
||||
group2.create()
|
||||
group2.ensure_exists()
|
||||
command = group.make_command('group_find')
|
||||
result = command()
|
||||
assert_deepequal(dict(
|
||||
@ -631,7 +631,7 @@ class TestManagedGroupObjectclasses(XMLRPC_test):
|
||||
def test_check_objectclasses_after_detach(self, user, managed_group):
|
||||
""" Check objectclasses after user was detached from managed group """
|
||||
# https://fedorahosted.org/freeipa/ticket/4909#comment:1
|
||||
user.create()
|
||||
user.ensure_exists()
|
||||
user.run_command('group_detach', *[user.uid])
|
||||
managed_group.retrieve(all=True)
|
||||
managed_group.add_member(dict(user=user.uid))
|
||||
|
@ -255,6 +255,7 @@ class TestStagedUser(XMLRPC_test):
|
||||
stageduser.delete()
|
||||
|
||||
def test_find_stageduser(self, stageduser):
|
||||
stageduser.ensure_exists()
|
||||
stageduser.find()
|
||||
|
||||
def test_findall_stageduser(self, stageduser):
|
||||
|
@ -177,6 +177,7 @@ class TestNonexistentUser(XMLRPC_test):
|
||||
class TestUser(XMLRPC_test):
|
||||
def test_retrieve(self, user):
|
||||
""" Create user and try to retrieve it """
|
||||
user.ensure_exists()
|
||||
user.retrieve()
|
||||
|
||||
def test_delete(self, user):
|
||||
@ -216,6 +217,7 @@ class TestUser(XMLRPC_test):
|
||||
class TestFind(XMLRPC_test):
|
||||
def test_find(self, user):
|
||||
""" Basic check of user-find """
|
||||
user.ensure_exists()
|
||||
user.find()
|
||||
|
||||
def test_find_with_all(self, user):
|
||||
|
@ -199,7 +199,6 @@ class Tracker(object):
|
||||
|
||||
def create(self):
|
||||
"""Helper function to create an entry and check the result"""
|
||||
self.ensure_missing()
|
||||
self.track_create()
|
||||
command = self.make_create_command()
|
||||
result = command()
|
||||
@ -227,7 +226,6 @@ class Tracker(object):
|
||||
|
||||
def delete(self):
|
||||
"""Helper function to delete a host and check the result"""
|
||||
self.ensure_exists()
|
||||
self.track_delete()
|
||||
command = self.make_delete_command()
|
||||
result = command()
|
||||
@ -244,7 +242,6 @@ class Tracker(object):
|
||||
|
||||
def retrieve(self, all=False, raw=False):
|
||||
"""Helper function to retrieve an entry and check the result"""
|
||||
self.ensure_exists()
|
||||
command = self.make_retrieve_command(all=all, raw=raw)
|
||||
result = command()
|
||||
self.check_retrieve(result, all=all, raw=raw)
|
||||
@ -255,7 +252,6 @@ class Tracker(object):
|
||||
|
||||
def find(self, all=False, raw=False):
|
||||
"""Helper function to search for this hosts and check the result"""
|
||||
self.ensure_exists()
|
||||
command = self.make_find_command(self.name, all=all, raw=raw)
|
||||
result = command()
|
||||
self.check_find(result, all=all, raw=raw)
|
||||
@ -274,7 +270,6 @@ class Tracker(object):
|
||||
if expected_updates is None:
|
||||
expected_updates = {}
|
||||
|
||||
self.ensure_exists()
|
||||
command = self.make_update_command(updates)
|
||||
result = command()
|
||||
self.attrs.update(updates)
|
||||
|
Loading…
Reference in New Issue
Block a user