From de7032df8d20d16c9db5cd4dd4c61ee07a9b4398 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde <akasurde@redhat.com>
Date: Thu, 5 Oct 2017 15:23:07 +0530
Subject: [PATCH] [tests] CA-less testcase fixes

* 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>
---
 ipatests/test_integration/test_caless.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py
index 95c55fb8d9..630e863699 100644
--- a/ipatests/test_integration/test_caless.py
+++ b/ipatests/test_integration/test_caless.py
@@ -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':
+                # Negative tests passes non-existent file names,
+                # there is no point in copying them.
+                continue
             try:
                 destination_host.transport.put_file(
                     os.path.join(self.cert_dir, filename),
