Skip to content

Testing "add members" randomizes the value type #44

@gunnar-rydberg

Description

@gunnar-rydberg

When the tester generates the test to add a user to a group it incorrectly (pretty sure) randomly picks attribute type from ["User", "Group"]

Here's an example where the tester tries to add a user to a group using type=group,
My service corrects the type in the response but this later fails the test when comparing the data.
:

>>> REQUEST: POST http://localhost:8002/scim/v2/Users
{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "3e15d2b6-5256-4b59-b9af-b86b1d6e4487"
}
<<< RESPONSE: 201
{
  "id": "019bc270-a5b5-7fa8-ae50-7b1eaf667fde",
  "externalId": "",
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User"
  ],
  "userName": "3e15d2b6-5256-4b59-b9af-b86b1d6e4487",
  "name": {
    "givenName": "",
    "familyName": "",
    "formatted": "3e15d2b6-5256-4b59-b9af-b86b1d6e4487"
  },
  "displayName": "3e15d2b6-5256-4b59-b9af-b86b1d6e4487",
  "emails": [
    {
      "value": "",
      "primary": true
    }
  ],
  "active": true,
  "groups": [],
  "meta": {
    "resourceType": "User",
    "created": "2026-01-15T16:15:21.009482+00:00",
    "lastModified": "2026-01-15T16:15:21.009482+00:00",
    "location": "http://localhost:8002/scim/v2/Users/019bc270-a5b5-7fa8-ae50-7b1eaf667fde"
  }
}

>>> REQUEST: PATCH http://localhost:8002/scim/v2/Groups/584
{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "add",
      "path": "members",
      "value": [
        {
          "value": "019bc270-a5b5-7fa8-ae50-7b1eaf667fde",
          "$ref": "http://localhost:8002/scim/v2/Users/019bc270-a5b5-7fa8-ae50-7b1eaf667fde",
          "type": "Group"
        }
      ]
    }
  ]
}
<<< RESPONSE: 200
{
  "id": "584",
  "externalId": "b05488d0-516d-4af8-b2e7-fb7c2ba6b37b",
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:Group"
  ],
  "displayName": "014caa7b-949a-4c90-905f-1943ab1ed17a",
  "members": [
    {
      "value": "019bc270-a5b5-7fa8-ae50-7b1eaf667fde",
      "$ref": "http://localhost:8002/scim/v2/Users/019bc270-a5b5-7fa8-ae50-7b1eaf667fde",
      "type": "User"
    }
  ],
  "meta": {
    "resourceType": "Group",
    "location": "http://localhost:8002/scim/v2/Groups/584"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions