#3806 TestRawHeaderFields.test_header_sizes fails on centos 8
Closed: Invalid by mikem. Opened by mikem.

as reported by @jcupova unit tests fail on centos 8

podman run -it --rm -v ~/Work/koji/:/koji --security-opt label=disable --name koji-centos-test-8 quay.io/tkopecek/koji-centos-test:8 bash
[root@f6e5bcaeb04f /]# cd koji/
[root@f6e5bcaeb04f koji]# make test3
...
____________________ TestRawHeaderFields.test_header_sizes _____________________
self = <tests.test_lib.test_rawheader_fields.TestRawHeaderFields testMethod=test_header_sizes>
    def test_header_sizes(self):
        for basename in self.RPMFILES:
            fn = os.path.join(os.path.dirname(__file__), 'data/rpms', basename)
            rh = koji.RawHeader(koji.rip_rpm_hdr(fn))
            hdr = koji.get_rpm_header(fn)
            for key in rh.index:
                if key in (63, 1141):
                    continue
                ours = rh.get(key, decode=True)
                theirs = hdr[key]
                if type(ours) != type(theirs):
                    if isinstance(ours, list) and len(ours) == 1 and ours[0] == theirs:
                        # rpm is presenting as a scalar
                        continue
                # otherwise
>               self.assertEqual(ours, theirs)
E               AssertionError: Lists differ: ['C'] != [b'C']
E               
E               First differing element 0:
E               'C'
E               b'C'
E               
E               - ['C']
E               + [b'C']
E               ?  +
tests/test_lib/test_rawheader_fields.py:37: AssertionError

Metadata Update from @jcupova:
- Custom field Size adjusted to None

I am unable to replicate this on current HEAD

$ podman run -it --rm -v ~/Devel/koji/koji/:/koji --security-opt label=disable --name koji-centos-test-8 quay.io/tkopecek/koji-centos-test:8 bash
[root@995dcad396d7 /]# cd koji
[root@995dcad396d7 koji]# make test3
...
============= 2313 passed in 24.84 seconds ====================
...
_____________________ summary ___________________
  py3: commands succeeded
  congratulations :)

Interesting...I checked it again with check that I have current HEAD and with the same error still:

$ git fetch upstream
$ git merge upstream/master 
Already up to date.
$ podman run -it --rm -v ~/Work/koji/:/koji --security-opt label=disable --name koji-centos-test-8 quay.io/tkopecek/koji-centos-test:8 bash
[root@8fff8f145e94 /]# cd koji/
[root@8fff8f145e94 koji]# make test3
....
=========================== short test summary info ============================
FAILED tests/test_hub/test_rpmdiff.py::TestRPMDiff::test_rpmdiff_kojihash - A...
FAILED tests/test_lib/test_rawheader_fields.py::TestRawHeaderFields::test_header_sizes
================== 2 failed, 2311 passed, 1 warning in 24.27s ==================

It seems the problem disappeared with a fresh pull.
Here is where we are

$ podman pull quay.io/tkopecek/koji-centos-test:8
Trying to pull quay.io/tkopecek/koji-centos-test:8...
Getting image source signatures
Copying blob 545a3da6de9e skipped: already exists  
Copying blob 998ceb85f375 skipped: already exists  
Copying blob b0eb4fd5a26a skipped: already exists  
Copying blob 45081c646f63 skipped: already exists  
Copying blob fdc12ef68aee skipped: already exists  
Copying config a8ccd51b47 done  
Writing manifest to image destination
Storing signatures
a8ccd51b47a5f775a3e4726ce125e9bd6d21ed11f0684f6921988f5443ff18f6

Metadata Update from @mikem:
- Issue close_status updated to: Invalid
- Issue status updated to: Closed (was: Open)

This issue has been migrated to Fedora Forge:
https://forge.fedoraproject.org/koji/koji/issues/3806

Please continue any further discussion there.

Metadata