Fix crash for operator policy HTTP API #6788
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Test Authentication/Authorization backends via mutiple messaging protocols | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v4.0.x | |
| paths: | |
| - 'deps/rabbit/src/rabbit_auth**' | |
| - 'deps/rabbit/src/rabbit_access_control**' | |
| - 'deps/rabbitmq_auth_**' | |
| - 'deps/rabbitmq_management/src/**' | |
| - 'deps/rabbitmq_management/priv/**' | |
| - 'deps/rabbitmq_management/selenium/**' | |
| - 'scripts/**' | |
| - .github/workflows/test-authnz.yaml | |
| pull_request: | |
| paths: | |
| - 'selenium/**' | |
| - 'deps/rabbit/**' | |
| - 'deps/rabbitmq_auth_/**' | |
| - 'deps/rabbitmq_mqtt/**' | |
| - .github/workflows/test-authnz.yaml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| selenium: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| erlang_version: | |
| - "27.3" | |
| browser: | |
| - chrome | |
| include: | |
| - erlang_version: "27.3" | |
| elixir_version: 1.17.3 | |
| env: | |
| SELENIUM_DIR: selenium | |
| DOCKER_NETWORK: rabbitmq_net | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Configure OTP & Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.erlang_version }} | |
| elixir-version: ${{ matrix.elixir_version }} | |
| hexpm-mirrors: | | |
| https://builds.hex.pm | |
| https://cdn.jsdelivr.net/hex | |
| - name: Authenticate To Google Cloud | |
| uses: google-github-actions/[email protected] | |
| with: | |
| credentials_json: ${{ secrets.REMOTE_CACHE_CREDENTIALS_JSON }} | |
| - name: Build & Load RabbitMQ OCI | |
| run: | | |
| make package-generic-unix | |
| make docker-image | |
| - name: Configure Docker Network | |
| run: | | |
| docker network create ${DOCKER_NETWORK} | |
| - name: Build Test Runner Image | |
| run: | | |
| cd ${SELENIUM_DIR} | |
| docker build -t mocha-test --target test . | |
| - name: Run Suites | |
| id: tests | |
| run: | | |
| export IMAGE_TAG=$(find PACKAGES/rabbitmq-server-generic-unix-*.tar.xz | awk -F 'PACKAGES/rabbitmq-server-generic-unix-|.tar.xz' '{print $2}') | |
| export CONF_DIR_PREFIX="$(mktemp -d)" | |
| export RABBITMQ_DOCKER_IMAGE=pivotalrabbitmq/rabbitmq:$IMAGE_TAG | |
| echo "Running selenium tests with " | |
| echo " - CONF_DIR_PREFIX: ${CONF_DIR_PREFIX}" | |
| echo " - IMAGE_TAG: ${IMAGE_TAG}" | |
| echo " - RABBITMQ_DOCKER_IMAGE: ${RABBITMQ_DOCKER_IMAGE}" | |
| echo "SELENIUM_ARTIFACTS=${CONF_DIR_PREFIX}" >> $GITHUB_ENV | |
| ${SELENIUM_DIR}/run-suites.sh full-suite-authnz-messaging | |
| - name: Upload Test Artifacts | |
| if: ${{ failure() && steps.tests.outcome == 'failure' }} | |
| uses: actions/[email protected] | |
| with: | |
| name: test-artifacts-${{ matrix.browser }}-${{ matrix.erlang_version }} | |
| path: ${{ env.SELENIUM_ARTIFACTS }}/* | |
| summary-selenium: | |
| needs: | |
| - selenium | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: SUMMARY | |
| run: | | |
| echo "SUCCESS" |