#118 libtaskotron builds fail on i386 due to hard-coded x86_64 value
Closed: Fixed Opened by tflink.

When I build libtaskotron on non-x86_64 (in this case, i386), the following test failures happen:

____ TestYumrepoinfoDirective.test_pending _______
self =
def test_pending(self):
directive = yumrepoinfo_directive.YumrepoinfoDirective(self.repoinfo)
ref_input = {"koji_tag": "f20-pending", "arch": "x86_64"}

      output = directive.process(ref_input, None)
  assert output == {"f20": "http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/x86_64/os"}

E assert {'f20': 'http...hing/i386/os'} == {'f20': 'http:...ng/x86_64/os'}
E Differing items:
E {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os'} != {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/x86_64/os'}
testing/test_yumrepoinfo_directive.py:74: AssertionError
------------------------------- Captured stderr --------------------------------
[libtaskotron:yumrepoinfo_directive.py:82] 2014-05-29 15:03:36 DEBUG Found 1 repos for f20-pending: {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os'}
DEBUG:libtaskotron:Found 1 repos for f20-pending: {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os'}
____ TestYumrepoinfoDirective.test_rawhide _______
self =
def test_rawhide(self):
directive = yumrepoinfo_directive.YumrepoinfoDirective(self.repoinfo)
ref_input = {"koji_tag": "rawhide", "arch": "x86_64"}

      output = directive.process(ref_input, None)
  assert output == {"rawhide": "http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os"}

E assert {'rawhide': '...hide/i386/os'} == {'rawhide': 'h...de/x86_64/os'}
E Differing items:
E {'rawhide': 'http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/i386/os'} != {'rawhide': 'http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os'}
testing/test_yumrepoinfo_directive.py:82: AssertionError
------------------------------- Captured stderr --------------------------------
[libtaskotron:yumrepoinfo_directive.py:82] 2014-05-29 15:03:36 DEBUG Found 1 repos for rawhide: {'rawhide': 'http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/i386/os'}
DEBUG:libtaskotron:Found 1 repos for rawhide: {'rawhide': 'http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/i386/os'}
___ TestYumrepoinfoDirective.test_repo_path ______
self =
def test_repo_path(self):

      directive = yumrepoinfo_directive.YumrepoinfoDirective(self.repoinfo)
      ref_input = {"koji_tag": "f20-updates", "arch": "x86_64"}
      output = directive.process(ref_input, None)
  assert output == {
              "f20": "http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/x86_64/os",
              "f20-updates": "http://download.fedoraproject.org/pub/fedora/linux/updates/20/x86_64",
              }

E assert {'f20': 'http...ates/20/i386'} == {'f20': 'http:...es/20/x86_64'}
E Differing items:
E {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os'} != {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/x86_64/os'}
E {'f20-updates': 'http://download.fedoraproject.org/pub/fedora/linux/updates/20/i386'} != {'f20-updates': 'http://download.fedoraproject.org/pub/fedora/linux/updates/20/x86_64'}
testing/test_yumrepoinfo_directive.py:98: AssertionError
------------------------------- Captured stderr --------------------------------
[libtaskotron:yumrepoinfo_directive.py:82] 2014-05-29 15:03:36 DEBUG Found 2 repos for f20-updates: {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os', 'f20-updates': 'http://download.fedoraproject.org/pub/fedora/linux/updates/20/i386'}
DEBUG:libtaskotron:Found 2 repos for f20-updates: {'f20': 'http://download.fedoraproject.org/pub/fedora/linux/releases/20/Everything/i386/os', 'f20-updates': 'http://download.fedoraproject.org/pub/fedora/linux/updates/20/i386'}
=============== 3 failed, 184 passed, 1 skipped in 1.28 seconds ================

Fix the tests so that they aren't arch specific


This ticket had assigned some Differential requests:
D115

Sorry to take you your tickets, Mike, but this is familiar and it took me a minute:
https://phab.qadevel.cloud.fedoraproject.org/differential/diff/328/

It should fix it, but please do verify. I haven't tested it with an i386 machine.

Sorry to take you your tickets, Mike, but this is familiar and it took me a minute

I suppose it depends on whether we want to fix the root problem or just patch the tests. That does look like it'll fix the tests but the yumrepoinfo directive will still ignore the passed in arch.

The code change is easy, it was the additional tests that we were both stumbling over. I had my head stuck in a 'stupid hole' for a while last night but I did learn quite a bit about Dingus and pytest's monkeypatch in my fumbling around :)

I suppose it depends on whether we want to fix the root problem or just patch the tests. That does look like it'll fix the tests but the yumrepoinfo directive will still ignore the passed in arch.

Oh, I didn't know there's some underlying problem. OK. For the actual release, I think patching the tests is fine. Of course, proper fix is even better.

Closed by commit rLTRN570a0eb651a3.

Metadata