def client(request):
    tasks.install_client(request.cls.master, request.cls.clients[0])

    def teardown_client():
        tasks.uninstall_client(request.cls.clients[0])
        request.cls.delete_client_host_entry()
    request.addfinalizer(teardown_client)
 def test_promotion_disabled(self):
     """
     Testcase:
     http://www.freeipa.org/page/V4/Replica_Promotion/Test_plan#Test_case:
     _Make_sure_the_feature_is_unavailable_under_domain_level_0
     """
     client = self.replicas[0]
     tasks.install_client(self.master, client)
     args = [
         "ipa-replica-install",
         "-U",
         "-p",
         self.master.config.dirman_password,
         "-w",
         self.master.config.admin_password,
         "--ip-address",
         client.ip,
     ]
     result = client.run_command(args, raiseonerr=False)
     assert_error(
         result,
         "You must provide a file generated by ipa-replica-prepare"
         " to create a replica when the domain is at level 0",
         1,
     )
示例#3
0
 def test_replica_promotion_by_unprivileged_user(self):
     replica = self.replicas[0]
     tasks.install_client(self.master, replica)
     result2 = replica.run_command([
         'ipa-replica-install', '-P', self.username, '-p',
         self.new_password, '-n', self.master.domain.name, '-r',
         self.master.domain.realm
     ],
                                   raiseonerr=False)
     assert_error(result2, "Insufficient privileges to promote the server",
                  1)
示例#4
0
 def test_replica_promotion_by_unprivileged_user(self):
     replica = self.replicas[0]
     tasks.install_client(self.master, replica)
     result2 = replica.run_command(['ipa-replica-install',
                                    '-P', self.username,
                                    '-p', self.new_password,
                                    '-n', self.master.domain.name,
                                    '-r', self.master.domain.realm],
                                   raiseonerr=False)
     assert_error(result2,
                  "Insufficient privileges to promote the server", 1)
示例#5
0
 def test_promotion_disabled(self):
     """
     Testcase:
     http://www.freeipa.org/page/V4/Replica_Promotion/Test_plan#Test_case:
     _Make_sure_the_feature_is_unavailable_under_domain_level_0
     """
     client = self.replicas[0]
     tasks.install_client(self.master, client)
     args = [
         'ipa-replica-install', '-U', '-p',
         self.master.config.dirman_password, '-w',
         self.master.config.admin_password, '--ip-address', client.ip
     ]
     result = client.run_command(args, raiseonerr=False)
     assert_error(
         result, 'You must provide a file generated by ipa-replica-prepare'
         ' to create a replica when the domain is at level 0', 1)
 def setUp(self):
     tasks.prepare_host(self.clients[0])
     tasks.install_client(self.master, self.clients[0])