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
[tests] CA-less testcase fixes #1132
Conversation
Before :: After::
|
Before :: After::
|
@@ -266,6 +266,10 @@ def prepare_replica(self, _replica_number=0, replica=None, master=None, | |||
tasks.prepare_host(master) | |||
tasks.prepare_host(replica) | |||
for filename in set(files_to_copy): | |||
if filename == 'does_not_exist': |
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.
Hello,
I think that this is quite unsafe to hardcode such name.
Wouldn't be better to use:
filepath = os.path.join(self.cert_dir, filename)
if not os.path.exists(filepath):
logger.info("File '%s' not found, copying to server skipped", filepath)
continue
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.
Sounds OK to me.
|
* Do not copy filenames from negative testcases such as 'does-not-exist' Partially fixes: https://pagure.io/freeipa/issue/7182 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
ready_for_review |
It's not clear what you're trying to fix in this PR. I see failing and passing tests in some of your local runs which does not really help anything. Could you explain what you're doing here? |
@stlaz I am fixing four failing testcases
These testcases are failing as they are trying to copy non-existent file to system under tests. So I am checking if file exists on controller node then only copy that file to system under tests.
These testcases are failing as they are missing one interactive prompt in ipa-replica-install command. So I am adding new "yes" to that interactive prompt. Let me know if it helps. |
As per comments, closing this PR in-favour of two separate PR |
Fixes: https://pagure.io/freeipa/issue/7182
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com