From 27365a8ba98231f9a80fbc71fbe3491c4a21d0fd Mon Sep 17 00:00:00 2001
From: ndehadrai <ndehadra@redhat.com>
Date: Fri, 26 Apr 2019 18:49:35 +0530
Subject: [PATCH] tasks.py: Updating 'ipa dnszone -add' command to use
 '--skip-overlap-check'

Currently when the test_replica_promotion tests are run in CI, it returns
warning message 'ipa: WARNING: ipa: ERROR: DNS zone with name <xyz> already exists'.
Using the above option would force dnszone-add creation.

Signed-off-by: ndehadrai <ndehadra@redhat.com>
---
 ipatests/pytest_ipa/integration/tasks.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py
index ff24627693..40f79c8c6b 100644
--- a/ipatests/pytest_ipa/integration/tasks.py
+++ b/ipatests/pytest_ipa/integration/tasks.py
@@ -141,7 +141,8 @@ def prepare_reverse_zone(host, ip):
     zone = get_reverse_zone_default(ip)
     result = host.run_command(["ipa",
                       "dnszone-add",
-                      zone], raiseonerr=False)
+                      zone,
+                      "--skip-overlap-check"], raiseonerr=False) # To force dnszone-add
     if result.returncode > 0:
         logger.warning("%s", result.stderr_text)
     return zone, result.returncode
