#56 Update 'rawhide' tag for compose with Rawhide number, related test fixes (#55)
Merged by jcline. Opened by adamwill.
adamwill/cloud-image-uploader container-iot-rawhide  into  main

The intended fix here is the third commit: @pwhalen wants us to update the 'rawhide' tag in registries for IoT composes, but they are not actually versioned "Rawhide" like regular Fedora Rawhide composes are, they are versioned with the release number currently associated with Rawhide (e.g. 43 right now). This adds a condition to update the 'rawhide' tag if the release number of the compose being processed is the Rawhide release number.

The other two commits are test suite fixups.

The first is a necessary precursor to be able to test the intended fix here - the container tests were broken because fedfind behaviour changed so their cassettes were no longer valid, but we could not re-record the cassettes because the composes we used in those tests no longer exist on the server. So we have to change to using newer composes, change the message fixtures, update the test expectations, and re-record the cassettes to make those tests work again. Some other tests use the same fixtures, so we have to update those too. I kept the old RC compose message under a different name for the GCP tests, as I do not have API access set up so cannot re-record those cassettes.

The second I noticed while updating the azure tests for the new fixtures - even after doing that, the tests weren't all passing, and I realized they were also already broken, because F40 EOL recently passed. The stable_nightly_compose fixture used in several azure tests is for F40, and the azure code skips uploading if the EOL date for the release is near or has passed, so now we were never uploading any images for that compose and the tests broke. To fix that we have to update that fixture to be for F42, update the test expectations, and re-record the cassettes. While doing that I noticed the EOL synthesis test was completely broken, so I fixed it too.

With this all tests outside of GCP pass for me locally.

LGTM, thanks @adamwill

Thanks. Maybe we should do that for the Atomic Desktops as well.

Thanks for cleaning up all the broken tests in addition to this fix, I know they're a huge pain to deal with.

Pull-Request has been merged by jcline

Metadata
Changes Summary 25
+3 -0
file changed
fedora-image-uploader/fedora_image_uploader/handler.py
+820 -609
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_aws_messages.yaml
+820 -609
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_aws_nacks_boto_exceptions.yaml
+119 -118
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_azure_messages[expected_messages0].yaml
+398 -433
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_azure_messages[expected_messages1].yaml
+1658 -1158
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_containers[compose0].yaml
+1651 -1229
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_containers[compose1].yaml
+808 -878
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_containers[compose2].yaml
+806
file added
fedora-image-uploader/tests/fixtures/cassettes/test_containers[compose3].yaml
+801 -576
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_containers_registries_not_configured.yaml
+226 -468
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_eol_synthesis.yaml
+810 -703
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_gallery_name[compose0].yaml
+120 -119
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_gallery_name[compose2].yaml
+838 -626
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_gallery_name[compose3].yaml
+398 -433
file changed
fedora-image-uploader/tests/fixtures/cassettes/test_gallery_name[compose4].yaml
+9 -7
file changed
fedora-image-uploader/tests/fixtures/messages/eln_compose.json
+28
file added
fedora-image-uploader/tests/fixtures/messages/iot_compose.json
+8 -6
file changed
fedora-image-uploader/tests/fixtures/messages/rawhide_compose.json
+10 -8
file changed
fedora-image-uploader/tests/fixtures/messages/rc_compose.json
+26
file added
fedora-image-uploader/tests/fixtures/messages/rc_compose_40.json
+9 -8
file changed
fedora-image-uploader/tests/fixtures/messages/stable_nightly_compose.json
+6 -6
file changed
fedora-image-uploader/tests/test_aws.py
+25 -21
file changed
fedora-image-uploader/tests/test_azure.py
+2 -2
file changed
fedora-image-uploader/tests/test_gcp.py
+39 -23
file changed
fedora-image-uploader/tests/test_handler.py