Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-2384

test_move_with_no_signing_service errors 500 unless user is django superuser

Details

    Description

      Description

      When the test_move_with_no_signing_service [1] test runs against CRC Stage, upon calling test_collection_signing.py:573 sign_on_demand it results in a 500 error in the test job [2].

      Server log of this error server_log_500_error.txt

      It seems this problem may not be isolated to CRC Stage, but may happen everywhere. When integration tests are run in locally and in GitHub Actions, it is with a django superuser. And when a superuser, further checks don’t occur [3]

      CRC Stage user ansible-hub-qe-pe2 is able to approve collections from the approval dashboard, some possibilities:

      • This user is a superuser and the bug applies to all users (there should not be a superuser in CRC Stage, but we should double-check) CRC Stage has no superusers.
      • The test calls the api in a way differently than the approval dashboard

      [1] https://github.com/ansible/galaxy_ng/blob/accc2ebe5d5fc9e24c27ab87f883d1a15dc3423a/galaxy_ng/tests/integration/api/test_collection_signing.py#L523
      [2] https://jenkins-insights-qe-ci.apps.ocp4.prod.psi.redhat.com/job/galaxy-ng-integration-tests-stage/172/testReport/
      [3] https://github.com/django/django/blob/stable/3.2.x/django/contrib/auth/models.py#L296-L297

      Steps to Reproduce

      Run CRC Stage integraiton tests, or run tests locally but change user so it is not a django superuser.

      Attachments

        Activity

          People

            jtanner@redhat.com James Tanner
            awcrosby5 Andrew Crosby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: