From 4fe0bd4b6c2a4c52aa04fa60eb25a44c7692e0e2 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 14 Jul 2021 09:58:40 +0200 Subject: [PATCH] tests/e2e: fix e2e tests for ldap provider Signed-off-by: Jens Langhammer --- schema.yml | 44 +++++++++++++++++++++++++++++++++ tests/e2e/test_provider_ldap.py | 4 +++ 2 files changed, 48 insertions(+) diff --git a/schema.yml b/schema.yml index 051c31547..bc496fe38 100644 --- a/schema.yml +++ b/schema.yml @@ -20499,8 +20499,19 @@ components: type: string uid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for uidNumbers, this number is added to the user.Pk + to make sure that the numbers aren't too low for POSIX users. Default + is 2000 to ensure that we don't collide with local users uidNumber gid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for gidNumbers, this number is added to a number + generated from the group.Pk to make sure that the numbers aren't too low + for POSIX groups. Default is 4000 to ensure that we don't collide with + local groups or users primary groups gidNumber required: - application_slug - bind_flow_slug @@ -20621,8 +20632,19 @@ components: type: string uid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for uidNumbers, this number is added to the user.Pk + to make sure that the numbers aren't too low for POSIX users. Default + is 2000 to ensure that we don't collide with local users uidNumber gid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for gidNumbers, this number is added to a number + generated from the group.Pk to make sure that the numbers aren't too low + for POSIX groups. Default is 4000 to ensure that we don't collide with + local groups or users primary groups gidNumber required: - assigned_application_name - assigned_application_slug @@ -20664,8 +20686,19 @@ components: type: string uid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for uidNumbers, this number is added to the user.Pk + to make sure that the numbers aren't too low for POSIX users. Default + is 2000 to ensure that we don't collide with local users uidNumber gid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for gidNumbers, this number is added to a number + generated from the group.Pk to make sure that the numbers aren't too low + for POSIX groups. Default is 4000 to ensure that we don't collide with + local groups or users primary groups gidNumber required: - authorization_flow - name @@ -25010,8 +25043,19 @@ components: type: string uid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for uidNumbers, this number is added to the user.Pk + to make sure that the numbers aren't too low for POSIX users. Default + is 2000 to ensure that we don't collide with local users uidNumber gid_start_number: type: integer + maximum: 2147483647 + minimum: -2147483648 + description: The start for gidNumbers, this number is added to a number + generated from the group.Pk to make sure that the numbers aren't too low + for POSIX groups. Default is 4000 to ensure that we don't collide with + local groups or users primary groups gidNumber PatchedLDAPSourceRequest: type: object description: LDAP Source Serializer diff --git a/tests/e2e/test_provider_ldap.py b/tests/e2e/test_provider_ldap.py index fd0b3d056..36de96c22 100644 --- a/tests/e2e/test_provider_ldap.py +++ b/tests/e2e/test_provider_ldap.py @@ -194,6 +194,8 @@ class TestProviderLDAP(SeleniumTestCase): "organizationalPerson", "goauthentik.io/ldap/user", ], + "uidNumber": [str(2000 + outpost_user.pk)], + "gidNumber": [str(2000 + outpost_user.pk)], "memberOf": [], "accountStatus": ["true"], "superuser": ["false"], @@ -217,6 +219,8 @@ class TestProviderLDAP(SeleniumTestCase): "organizationalPerson", "goauthentik.io/ldap/user", ], + "uidNumber": [str(2000 + USER().pk)], + "gidNumber": [str(2000 + USER().pk)], "memberOf": [ "cn=authentik Admins,ou=groups,dc=ldap,dc=goauthentik,dc=io" ],