Imported Upstream version 4.8.10

This commit is contained in:
Mario Fetka
2021-10-03 11:06:28 +02:00
parent 10dfc9587b
commit 03a8170b15
2361 changed files with 1883897 additions and 338759 deletions

View File

@@ -21,11 +21,12 @@ Test adding/removing external members (trusted domain objects) to IPA groups.
These tests are skipped if trust is not established.
"""
import nose
from ipalib import api
from ipapython.dn import DN
from ipatests.test_xmlrpc import objectclasses
from xmlrpc_test import Declarative, fuzzy_uuid, fuzzy_user_or_group_sid
from ipatests.test_xmlrpc.xmlrpc_test import (Declarative, fuzzy_uuid,
fuzzy_user_or_group_sid)
import pytest
group_name = u'external_group'
group_desc = u'Test external group'
@@ -38,19 +39,19 @@ def get_trusted_group_name():
return None
ad_netbios = trusts['result'][0]['ipantflatname']
return u'%s\Domain Admins' % ad_netbios
return r'%s\Domain Admins' % ad_netbios
@pytest.mark.tier1
class test_external_members(Declarative):
@classmethod
def setUpClass(cls):
super(test_external_members, cls).setUpClass()
@pytest.fixture(autouse=True, scope="class")
def ext_member_setup(self, declarative_setup):
if not api.Backend.rpcclient.isconnected():
api.Backend.rpcclient.connect(fallback=False)
api.Backend.rpcclient.connect()
trusts = api.Command['trust_find']()
if trusts['count'] == 0:
raise nose.SkipTest('Trust is not established')
pytest.skip('Trust is not established')
cleanup_commands = [
('group_del', [group_name], {}),