core: bump goauthentik.io/api/v3 from 3.2023106.4 to 3.2023106.5 (#8302)
* core: bump goauthentik.io/api/v3 from 3.2023106.4 to 3.2023106.5 Bumps [goauthentik.io/api/v3](https://github.com/goauthentik/client-go) from 3.2023106.4 to 3.2023106.5. - [Release notes](https://github.com/goauthentik/client-go/releases) - [Commits](https://github.com/goauthentik/client-go/compare/v3.2023106.4...v3.2023106.5) --- updated-dependencies: - dependency-name: goauthentik.io/api/v3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * fix flaky recovery tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix startup error with pk in outpost task Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix flaky user api tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
@ -261,7 +261,14 @@ class TestUsersAPI(APITestCase):
|
||||
reverse("authentik_api:user-paths"),
|
||||
)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertJSONEqual(response.content.decode(), {"paths": ["users"]})
|
||||
expected = list(
|
||||
User.objects.all()
|
||||
.values("path")
|
||||
.distinct()
|
||||
.order_by("path")
|
||||
.values_list("path", flat=True)
|
||||
)
|
||||
self.assertJSONEqual(response.content.decode(), {"paths": expected})
|
||||
|
||||
def test_path_valid(self):
|
||||
"""Test path"""
|
||||
|
||||
@ -192,7 +192,7 @@ def outpost_post_save(model_class: str, model_pk: Any):
|
||||
|
||||
if isinstance(instance, Outpost):
|
||||
LOGGER.debug("Trigger reconcile for outpost", instance=instance)
|
||||
outpost_controller.delay(instance.pk)
|
||||
outpost_controller.delay(str(instance.pk))
|
||||
|
||||
if isinstance(instance, (OutpostModel, Outpost)):
|
||||
LOGGER.debug("triggering outpost update from outpostmodel/outpost", instance=instance)
|
||||
@ -200,7 +200,7 @@ def outpost_post_save(model_class: str, model_pk: Any):
|
||||
|
||||
if isinstance(instance, OutpostServiceConnection):
|
||||
LOGGER.debug("triggering ServiceConnection state update", instance=instance)
|
||||
outpost_service_connection_state.delay(instance.pk)
|
||||
outpost_service_connection_state.delay(str(instance.pk))
|
||||
|
||||
for field in instance._meta.get_fields():
|
||||
# Each field is checked if it has a `related_model` attribute (when ForeginKeys or M2Ms)
|
||||
|
||||
@ -18,7 +18,7 @@ class TestRecovery(TestCase):
|
||||
def test_create_key(self):
|
||||
"""Test creation of a new key"""
|
||||
out = StringIO()
|
||||
self.assertEqual(len(Token.objects.all()), 0)
|
||||
self.assertEqual(len(Token.objects.filter(intent=TokenIntents.INTENT_RECOVERY)), 0)
|
||||
call_command(
|
||||
"create_recovery_key",
|
||||
"1",
|
||||
@ -28,12 +28,12 @@ class TestRecovery(TestCase):
|
||||
)
|
||||
token = Token.objects.get(intent=TokenIntents.INTENT_RECOVERY, user=self.user)
|
||||
self.assertIn(token.key, out.getvalue())
|
||||
self.assertEqual(len(Token.objects.all()), 1)
|
||||
self.assertEqual(len(Token.objects.filter(intent=TokenIntents.INTENT_RECOVERY)), 1)
|
||||
|
||||
def test_create_key_invalid(self):
|
||||
"""Test creation of a new key (invalid)"""
|
||||
out = StringIO()
|
||||
self.assertEqual(len(Token.objects.all()), 0)
|
||||
self.assertEqual(len(Token.objects.filter(intent=TokenIntents.INTENT_RECOVERY)), 0)
|
||||
call_command("create_recovery_key", "1", "foo", schema=get_public_schema_name(), stderr=out)
|
||||
self.assertIn("not found", out.getvalue())
|
||||
|
||||
|
||||
2
go.mod
2
go.mod
@ -28,7 +28,7 @@ require (
|
||||
github.com/spf13/cobra v1.8.0
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/wwt/guac v1.3.2
|
||||
goauthentik.io/api/v3 v3.2023106.4
|
||||
goauthentik.io/api/v3 v3.2023106.5
|
||||
golang.org/x/exp v0.0.0-20230210204819-062eb4c674ab
|
||||
golang.org/x/oauth2 v0.16.0
|
||||
golang.org/x/sync v0.6.0
|
||||
|
||||
4
go.sum
4
go.sum
@ -290,8 +290,8 @@ go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYO
|
||||
go.opentelemetry.io/otel/trace v1.17.0/go.mod h1:I/4vKTgFclIsXRVucpH25X0mpFSczM7aHeaz0ZBLWjY=
|
||||
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
|
||||
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
|
||||
goauthentik.io/api/v3 v3.2023106.4 h1:HYVgTdFIQzGvLkl0PugAkhdvRXOW1+0Dw5dHunlmf7Q=
|
||||
goauthentik.io/api/v3 v3.2023106.4/go.mod h1:zz+mEZg8rY/7eEjkMGWJ2DnGqk+zqxuybGCGrR2O4Kw=
|
||||
goauthentik.io/api/v3 v3.2023106.5 h1:ogldINBGXP0J+8DALdqVtHvqhh5ePDMFe22WYczUIks=
|
||||
goauthentik.io/api/v3 v3.2023106.5/go.mod h1:zz+mEZg8rY/7eEjkMGWJ2DnGqk+zqxuybGCGrR2O4Kw=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
|
||||
Reference in New Issue
Block a user