Failure in ee/api/10_govern/instance_audit_event_streaming_spec.rb | Govern Instance audit event streaming when a project is created behaves like streamed events received by an external server

Test metadata (don't modify)

Field Value
File qa/qa/specs/features/ee/api/10_govern/instance_audit_event_streaming_spec.rb#L86
Description Govern Instance audit event streaming when a project is created behaves like streamed events received by an external server
Test level
Hash 2add33ee5006f423cc96c71184460a929e8564f94046b0dd06ab78c66e15e63b
Duration 3.36 seconds
Expected duration < 240 seconds
Test case https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/415875

Stack trace

Failure/Error:
  expect(verify_response).to be_success,
    "Failures when verifying events received:\n#{JSON.pretty_generate(verify_response.failures)}"

  Failures when verifying events received:
  [
    {
      "context": {
      },
      "request": {
        "path": "/logs",
        "method": "POST",
        "origin": "172.19.0.2",
        "body_string": "{\"id\":356,\"author_id\":1,\"entity_id\":16,\"entity_type\":\"User\",\"details\":{\"author_name\":\"Administrator\",\"author_class\":\"User\",\"target_id\":16,\"target_type\":\"User\",\"target_details\":\"qa-user-25c990c84a1c42ec\",\"custom_message\":\"User qa-user-25c990c84a1c42ec scheduled for deletion\",\"ip_address\":\"172.19.0.3\",\"entity_path\":\"qa-user-25c990c84a1c42ec\"},\"ip_address\":\"172.19.0.3\",\"author_name\":\"Administrator\",\"entity_path\":\"qa-user-25c990c84a1c42ec\",\"target_details\":\"qa-user-25c990c84a1c42ec\",\"created_at\":\"2023-08-16T22:04:07.925Z\",\"target_type\":\"User\",\"target_id\":16,\"event_type\":\"user_destroyed\"}",
        "body": {
          "author_id": 1,
          "author_name": "Administrator",
          "created_at": "2023-08-16T22:04:07.925Z",
          "details": {
            "author_class": "User",
            "author_name": "Administrator",
            "custom_message": "User qa-user-25c990c84a1c42ec scheduled for deletion",
            "entity_path": "qa-user-25c990c84a1c42ec",
            "ip_address": "172.19.0.3",
            "target_details": "qa-user-25c990c84a1c42ec",
            "target_id": 16,
            "target_type": "User"
          },
          "entity_id": 16,
          "entity_path": "qa-user-25c990c84a1c42ec",
          "entity_type": "User",
          "event_type": "user_destroyed",
          "id": 356,
          "ip_address": "172.19.0.3",
          "target_details": "qa-user-25c990c84a1c42ec",
          "target_id": 16,
          "target_type": "User"
        },
        "headers": {
          "Accept": [
            "*/*"
          ],
          "Accept-Encoding": [
            "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
          ],
          "Connection": [
            "close"
          ],
          "Content-Length": [
            "590"
          ],
          "Content-Type": [
            "application/x-www-form-urlencoded"
          ],
          "Host": [
            "smocker-server.test:8080"
          ],
          "User-Agent": [
            "Ruby"
          ],
          "X-Gitlab-Audit-Event-Type": [
            "user_destroyed"
          ],
          "X-Gitlab-Event-Streaming-Token": [
            "Ys34EAgigGB88jFGCD2TZoef"
          ]
        },
        "date": "2023-08-16T22:04:08.115848478Z"
      },
      "response": {
        "status": 666,
        "body": {
          "message": "No mock found matching the request",
          "request": {
            "body": {
              "author_id": 1,
              "author_name": "Administrator",
              "created_at": "2023-08-16T22:04:07.925Z",
              "details": {
                "author_class": "User",
                "author_name": "Administrator",
                "custom_message": "User qa-user-25c990c84a1c42ec scheduled for deletion",
                "entity_path": "qa-user-25c990c84a1c42ec",
                "ip_address": "172.19.0.3",
                "target_details": "qa-user-25c990c84a1c42ec",
                "target_id": 16,
                "target_type": "User"
              },
              "entity_id": 16,
              "entity_path": "qa-user-25c990c84a1c42ec",
              "entity_type": "User",
              "event_type": "user_destroyed",
              "id": 356,
              "ip_address": "172.19.0.3",
              "target_details": "qa-user-25c990c84a1c42ec",
              "target_id": 16,
              "target_type": "User"
            },
            "body_string": "{\"id\":356,\"author_id\":1,\"entity_id\":16,\"entity_type\":\"User\",\"details\":{\"author_name\":\"Administrator\",\"author_class\":\"User\",\"target_id\":16,\"target_type\":\"User\",\"target_details\":\"qa-user-25c990c84a1c42ec\",\"custom_message\":\"User qa-user-25c990c84a1c42ec scheduled for deletion\",\"ip_address\":\"172.19.0.3\",\"entity_path\":\"qa-user-25c990c84a1c42ec\"},\"ip_address\":\"172.19.0.3\",\"author_name\":\"Administrator\",\"entity_path\":\"qa-user-25c990c84a1c42ec\",\"target_details\":\"qa-user-25c990c84a1c42ec\",\"created_at\":\"2023-08-16T22:04:07.925Z\",\"target_type\":\"User\",\"target_id\":16,\"event_type\":\"user_destroyed\"}",
            "date": "2023-08-16T22:04:08.115898658Z",
            "headers": {
              "Accept": [
                "*/*"
              ],
              "Accept-Encoding": [
                "gzip;q=1.0,deflate;q=0.6,identity;q=0.3"
              ],
              "Connection": [
                "close"
              ],
              "Content-Length": [
                "590"
              ],
              "Content-Type": [
                "application/x-www-form-urlencoded"
              ],
              "Host": [
                "smocker-server.test:8080"
              ],
              "User-Agent": [
                "Ruby"
              ],
              "X-Gitlab-Audit-Event-Type": [
                "user_destroyed"
              ],
              "X-Gitlab-Event-Streaming-Token": [
                "Ys34EAgigGB88jFGCD2TZoef"
              ]
            },
            "method": "POST",
            "origin": "172.19.0.2",
            "path": "/logs"
          }
        },
        "headers": {
          "Content-Type": [
            "application/json; charset=UTF-8"
          ]
        },
        "date": "2023-08-16T22:04:08.118937471Z"
      }
    }
  ]
Shared Example Group: "streamed events" called from ./qa/specs/features/ee/api/10_govern/instance_audit_event_streaming_spec.rb:86

Reports (2)

  1. 2023-08-16: https://gitlab.com/gitlab-org/gitlab/-/jobs/4887853131 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/970236003)
  2. 2023-08-19: https://gitlab.com/gitlab-org/gitlab/-/jobs/4905008678 (https://gitlab.com/gitlab-org/gitlab/-/pipelines/973004372)
Edited by Ghost User