forked from freeipa/freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipatests: Update ipatests to test topology with multiple domain.
Added changes in ipatests so that ipa server-replica-client can be installed with two domain - ipa.test and trustedipa.test Related: https://pagure.io/freeipa/issue/9657 Signed-off-by: Anuja More <[email protected]>
- Loading branch information
Showing
5 changed files
with
189 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
from ipatests.pytest_ipa.integration import tasks | ||
from ipatests.test_integration.base import MultiDomainIntegrationTest | ||
|
||
|
||
class TestMultidomain(MultiDomainIntegrationTest): | ||
num_clients = 1 | ||
num_replicas = 1 | ||
num_trusted_clients = 1 | ||
num_trusted_replicas = 1 | ||
topology = 'line' | ||
|
||
def test_multidomain_trust(self): | ||
""" | ||
Test services on multidomain topology. | ||
""" | ||
|
||
for host in (self.master, self.replicas[0], | ||
self.trusted_master, self.trusted_replicas[0] | ||
): | ||
tasks.start_ipa_server(host) | ||
|
||
for host in (self.master, self.replicas[0], | ||
self.trusted_master, self.trusted_replicas[0], | ||
self.clients[0], self.trusted_clients[0] | ||
): | ||
tasks.kinit_admin(host) | ||
|
||
# Add DNS forwarder to trusted domain on ipa domain | ||
self.master.run_command([ | ||
"ipa", "dnsforwardzone-add", self.trusted_master.domain.name, | ||
"--forwarder", self.trusted_master.ip, | ||
"--forward-policy=only" | ||
]) | ||
self.trusted_master.run_command([ | ||
"ipa", "dnsforwardzone-add", self.master.domain.name, | ||
"--forwarder", self.master.ip, | ||
"--forward-policy=only" | ||
]) | ||
|
||
# Establish trust | ||
self.master.run_command([ | ||
"ipa", "trust-add", "--type=ipa", | ||
"--admin", "admin@{}".format(self.trusted_master.domain.realm), | ||
"--range-type=ipa-ad-trust-posix", | ||
"--password", "--two-way=true", | ||
self.trusted_master.domain.name | ||
], stdin_text=self.trusted_master.config.admin_password) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters