コード例 #1
0
ファイル: test_trust.py プロジェクト: zhuomingliang/freeipa
    def test_range_types(self):

        self.init_app()

        r_tasks = range_tasks()
        r_tasks.driver = self.driver
        r_tasks.config = self.config
        r_tasks.get_shifts()
        range_form = r_tasks.get_add_form_data('')
        base_id = range_form.base_id
        range_size = range_form.size
        range_pkey = self.get_range_name()
        column = 'iparangetype'

        self.navigate_to_entity('idrange')
        self.delete_record(range_pkey)

        add = self.get_add_data('ipa-ad-trust', base_id, range_size)
        data = self.get_data(add_data=add)
        self.add_record(ENTITY, data, delete=True)
        self.navigate_to_entity('idrange')
        self.assert_record_value('Active Directory domain range', range_pkey,
                                 column)
        self.delete_record(range_pkey)

        add = self.get_add_data('ipa-ad-trust-posix', base_id, range_size)
        data = self.get_data(add_data=add)
        self.add_record(ENTITY, data, delete=True)
        self.navigate_to_entity('idrange')
        self.assert_record_value(
            'Active Directory trust range with POSIX attributes', range_pkey,
            column)
        self.delete_record(range_pkey)
コード例 #2
0
ファイル: test_trust.py プロジェクト: apophys/freeipa
    def test_range_types(self):

        self.init_app()

        r_tasks = range_tasks()
        r_tasks.setup(self.driver, self.config)
        r_tasks.get_shifts()
        range_add = r_tasks.get_add_data('')
        base_id = range_add[2][2]
        range_size = range_add[3][2]
        range_pkey = self.get_range_name()
        column = 'iparangetype'

        self.navigate_to_entity('idrange')
        self.delete_record(range_pkey)

        add = self.get_add_data('ipa-ad-trust', base_id, range_size)
        data = self.get_data(add_data=add)
        self.add_record(ENTITY, data, delete=True)
        self.navigate_to_entity('idrange')
        self.assert_record_value('Active Directory domain range', range_pkey,
                                 column)
        self.delete_record(range_pkey)

        self.request_timeout = 60
        add = self.get_add_data('ipa-ad-trust-posix', base_id, range_size)
        data = self.get_data(add_data=add)
        self.add_record(ENTITY, data, delete=True)
        self.navigate_to_entity('idrange')
        self.assert_record_value(
            'Active Directory trust range with POSIX attributes', range_pkey,
            column)
        self.delete_record(range_pkey)
コード例 #3
0
    def test_range_auto_private_groups(self):
        self.init_app()

        r_tasks = range_tasks()
        r_tasks.driver = self.driver
        r_tasks.config = self.config
        r_tasks.get_shifts()

        trust_data = self.get_data()
        self.add_record(ENTITY, trust_data, navigate=True)

        range_pkeys = []
        try:
            for auto_private_groups in ['true', 'false', 'hybrid']:
                pkey = 'itest-range-apg-{}'.format(auto_private_groups)
                form_data = r_tasks.get_add_form_data(
                    pkey,
                    range_type=TRUSTED_ID_RANGE,
                    domain=trust_data['pkey'],
                    auto_private_groups=auto_private_groups
                )
                range_data = r_tasks.get_data(pkey, form_data=form_data)
                self.add_record('idrange', range_data, navigate=True)
                range_pkeys.append(pkey)
        finally:
            self.navigate_to_entity(ENTITY)
            self.delete_record(trust_data['pkey'])
            self.navigate_to_entity('idrange')
            self.delete_record(range_pkeys)