From ffe1997aa0b3d72562b56a07f26c42b918da623b Mon Sep 17 00:00:00 2001
From: Karsten Hopp <karsten@redhat.com>
Date: Feb 06 2019 16:30:51 +0000
Subject: [PATCH 1/3] Fix path to repohookrunner and repobridge


Signed-off-by: Karsten Hopp <karsten@redhat.com>

---

diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index 4afd8b1..299caa1 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -121,23 +121,40 @@ class PagureRepoSpannerTests(tests.Modeltests):
             './repospanner',
             '/usr/bin/repospanner',
         ]
+        possible_paths_hookrunner = [
+            './repohookrunner',
+            '/usr/libexec/repohookrunner',
+        ]
+        possible_paths_repobridge = [
+            './repobridge',
+            '/usr/libexec/repobridge',
+        ]
 
         for option in possible_paths:
             option = os.path.abspath(option)
             if os.path.exists(option):
                 self.repospanner_binary = option
                 break
+        for option in possible_paths_hookrunner:
+            option = os.path.abspath(option)
+            if os.path.exists(option):
+                hookrunbin = option
+                break
+        for option in possible_paths_repobridge:
+            option = os.path.abspath(option)
+            if os.path.exists(option):
+                repobridgebin = option
+                break
 
         if not self.repospanner_binary:
             raise unittest.SkipTest('repoSpanner not found')
 
-        hookrunbin = os.path.join(os.path.dirname(self.repospanner_binary),
-                                  'repohookrunner')
-        if not os.path.exists(hookrunbin):
+        if not hookrunbin:
             raise Exception('repoSpanner found, but repohookrunner not')
+
         repobridgebin = os.path.join(os.path.dirname(self.repospanner_binary),
                                      'repobridge')
-        if not os.path.exists(repobridgebin):
+        if not repobridgebin:
             raise Exception('repoSpanner found, but repobridge not')
 
         self.config_values['repobridge_binary'] = repobridgebin

From 2f96e8540bbca888905cc2e8baf3d63c877c3c89 Mon Sep 17 00:00:00 2001
From: Karsten Hopp <karsten@redhat.com>
Date: Feb 07 2019 10:19:42 +0000
Subject: [PATCH 2/3] add /usr/bin/to paths


Signed-off-by: Karsten Hopp <karsten@redhat.com>

---

diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index 299caa1..a6600de 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -123,10 +123,12 @@ class PagureRepoSpannerTests(tests.Modeltests):
         ]
         possible_paths_hookrunner = [
             './repohookrunner',
+            '/usr/bin/repohookrunner',
             '/usr/libexec/repohookrunner',
         ]
         possible_paths_repobridge = [
             './repobridge',
+            '/usr/bin/repobridge',
             '/usr/libexec/repobridge',
         ]
 

From 2814d8bf874d25abea5137acd59f42d24e4c73e1 Mon Sep 17 00:00:00 2001
From: Karsten Hopp <karsten@redhat.com>
Date: Feb 07 2019 14:20:20 +0000
Subject: [PATCH 3/3] debug


---

diff --git a/tests/test_pagure_repospanner.py b/tests/test_pagure_repospanner.py
index a6600de..bb33983 100644
--- a/tests/test_pagure_repospanner.py
+++ b/tests/test_pagure_repospanner.py
@@ -148,14 +148,18 @@ class PagureRepoSpannerTests(tests.Modeltests):
                 repobridgebin = option
                 break
 
+        print("XXXXX")
+        a = os.listdir("/usr/bin")
+        for i in a:
+            if i.startswith("repo"):
+                print(i)
+
         if not self.repospanner_binary:
             raise unittest.SkipTest('repoSpanner not found')
 
         if not hookrunbin:
             raise Exception('repoSpanner found, but repohookrunner not')
 
-        repobridgebin = os.path.join(os.path.dirname(self.repospanner_binary),
-                                     'repobridge')
         if not repobridgebin:
             raise Exception('repoSpanner found, but repobridge not')
 

