Test #6476
Updated by pulpbot almost 3 years ago
**Ticket moved to GitHub**: "pulp/pulp_rpm/2244":https://github.com/pulp/pulp_rpm/issues/2244 ---- on repomd we have: primary.xml.gz update_info.xml.gz When testing xml.gz behaves like it is not compressed On the other hand, it behaves as compressed on S3 testing https://github.com/pulp/pulp_rpm/blob/master/pulp_rpm/tests/functional/api/test_publish.py#L51-L67 ~~~ python def read_xml_gz(content): """ Read xml and xml.gz. Tests work normally but fails for S3 due '.gz' Why is it only compressed for S3? """ with NamedTemporaryFile() as temp_file: temp_file.write(content) temp_file.seek(0) try: content_xml = gzip.open(temp_file.name).read() except OSError: # FIXME: fix this as in CI primary/update_info.xml has '.gz' but it is not gzipped content_xml = temp_file.read() return content_xml ~~~