New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipatests: test_installation: add install test scenarios #5610
Conversation
eea8176
to
98050df
Compare
98050df
to
2e8061a
Compare
c0d4967
to
1d1901c
Compare
This comment has been minimized.
This comment has been minimized.
b5ad884
to
a7d789c
Compare
I've noticed an error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two new test cases do not deal with the installation process but rather check the rusult: test_update_krb5_conf_template_with_keyring_default_ccache_name
and
test_backup_of_cs_cfg_should_be_created
. Do you think those could be integrated to some other tests to save two ipa-server installations? This could save about 20 for of test execution.
That's true, however, each test should test one thing and not be dependent on other test - if I merged these two test case into, e.g. |
79988ab
to
8b07b59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In added code you are using both types of quotes - single and double. According to PEP 8 it is advisable to stick to one type of quotes. This does not apply do docstrings, they should always use double quotes.
tasks.install_master(self.master) | ||
tasks.kinit_admin(self.master) | ||
klist = self.master.run_command(['klist']).stdout_text | ||
assert '/tmp/' not in klist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are checking two conditions:
- template is updated to use cache
- cache is used poperly
Second condition can be checked with test cases:
- Proper cache is used
- Improper cache is not used.
You test only TC2. I suggest that TC1 should be checked as well,
efacd04
to
b8ca378
Compare
@wladich I am really sorry, but I am once again asking you for a review. I am, however, eternally grateful for what you do. |
b8ca378
to
5ddb92d
Compare
as seen in failed temp commit, klist doesn't use KEYRING, but KCM in this particular situation. |
4ca4871
to
19f21d8
Compare
19f21d8
to
22968d9
Compare
@miskopo Please do check if timeouts in prci definitions need to be adjusted. |
Both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rewrite commit message to avoid GitHub from interpretting Pagure issues as GH PRs
Please see few minor issues in inline comments. Otherwise LGTM
['ipa', 'dnszone-show', self.master.domain.name] | ||
).stdout_text | ||
|
||
assert "Active zone: TRUE" in result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent usage of double quotes
'hostname', '-f']).stdout_text.strip() | ||
assert hostname == new_hostname | ||
finally: | ||
# no need to restore the hostane as the installer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "hostane" -> "hostname"
if reinstall: | ||
tasks.install_packages(self.master, [package_name]) | ||
|
||
def test_backup_of_cs_cfg_should_be_created(self, server_cleanup): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as with test_installer_wizard_prompts_for_DNS
: proper form of the phrase is "test backup is created" or "test creates backup"
22968d9
to
f8b9c1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing "LGTM". Looking through the logs I found the incorrect invocation of rpm
""" | ||
package_name = '*ipa-server-trust-ad' | ||
reinstall = False | ||
if tasks.is_package_installed(self.master, package_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This internaly calls 'rpm' '-q' '*ipa-server-trust-ad'
. Unlike dnf
the rpm
does not expand wildcards and this check will allways return False
test_hostname_parameter: Test for issue 2692 ipa-server-install ignores --hostname: check whether hostname provided in `--hostname` parameter is being taken into account and set as new hostname without prompting for it again test_ad_subpackage_dependency: Test for issue 4011 ipa-server-install crashes when AD subpackage is not installed: test if ipa-server installation succeeds without `freeipa-ipa-server-trust-ad` installed test_backup_of_cs_cfg_should_be_created: Test for issue 4166 Backup CS.cfg before modifying it: test if ipa-server installer backs up CS.cfg before modifying it test_installer_wizard_should_prompt_for_DNS: Test for issue 2575 [RFE] Installer wizard should prompt for DNS: test if installer is asking for DNS setup details if not provided as parameter Related: https://pagure.io/freeipa/issue/2692 Related: https://pagure.io/freeipa/issue/4011 Related: https://pagure.io/freeipa/issue/4166 Related: https://pagure.io/freeipa/issue/2575 Signed-off-by: Michal Polovka <mpolovka@redhat.com>
f8b9c1f
to
c5b2887
Compare
c5b2887
to
f1579a3
Compare
LGTM #2 |
master:
|
test_hostname_parameter: Test for issue 2692 ipa-server-install ignores --hostname:
check whether hostname provided in
--hostname
parameter is being taken into account and set as new hostname without prompting for it againtest_ad_subpackage_dependency: Test for issue 4011 ipa-server-install crashes when AD subpackage is not installed:
test if ipa-server installation succeeds without
freeipa-ipa-server-trust-ad
installedtest_backup_of_cs_cfg_should_be_created: Test for issue 4166 Backup CS.cfg before modifying it:
test if ipa-server installer backs up CS.cfg before modifying it
test_installer_wizard_should_prompt_for_DNS: Test for issue 2575 [RFE] Installer wizard should prompt for DNS:
test if installer is asking for DNS setup details if not provided as parameter
Related: https://pagure.io/freeipa/issue/2692
Related: https://pagure.io/freeipa/issue/4011
Related: https://pagure.io/freeipa/issue/4166
Related: https://pagure.io/freeipa/issue/2575
Signed-off-by: Michal Polovka mpolovka@redhat.com