root: make database port configurable
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
cd629dfbaa
commit
c7d4e69669
|
@ -3,6 +3,7 @@ postgresql:
|
|||
host: localhost
|
||||
name: authentik
|
||||
user: authentik
|
||||
port: 5432
|
||||
password: 'env://POSTGRES_PASSWORD'
|
||||
|
||||
web:
|
||||
|
|
|
@ -29,17 +29,19 @@ class TestOutpostServiceConnectionsAPI(APITestCase):
|
|||
|
||||
def test_outpost_config(self):
|
||||
"""Test Outpost's config field"""
|
||||
provider = ProxyProvider.objects.create(name="test", authorization_flow=Flow.objects.first())
|
||||
invalid = OutpostSerializer(data={
|
||||
"name": "foo",
|
||||
"providers": [provider.pk],
|
||||
"config": {}
|
||||
})
|
||||
provider = ProxyProvider.objects.create(
|
||||
name="test", authorization_flow=Flow.objects.first()
|
||||
)
|
||||
invalid = OutpostSerializer(
|
||||
data={"name": "foo", "providers": [provider.pk], "config": {}}
|
||||
)
|
||||
self.assertFalse(invalid.is_valid())
|
||||
self.assertIn("config", invalid.errors)
|
||||
valid = OutpostSerializer(data={
|
||||
"name": "foo",
|
||||
"providers": [provider.pk],
|
||||
"config": default_outpost_config("foo")
|
||||
})
|
||||
valid = OutpostSerializer(
|
||||
data={
|
||||
"name": "foo",
|
||||
"providers": [provider.pk],
|
||||
"config": default_outpost_config("foo"),
|
||||
}
|
||||
)
|
||||
self.assertTrue(valid.is_valid())
|
||||
|
|
|
@ -248,6 +248,7 @@ DATABASES = {
|
|||
"NAME": CONFIG.y("postgresql.name"),
|
||||
"USER": CONFIG.y("postgresql.user"),
|
||||
"PASSWORD": CONFIG.y("postgresql.password"),
|
||||
"PORT": int(CONFIG.y("postgresql.port")),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue