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
|
host: localhost
|
||||||
name: authentik
|
name: authentik
|
||||||
user: authentik
|
user: authentik
|
||||||
|
port: 5432
|
||||||
password: 'env://POSTGRES_PASSWORD'
|
password: 'env://POSTGRES_PASSWORD'
|
||||||
|
|
||||||
web:
|
web:
|
||||||
|
|
|
@ -29,17 +29,19 @@ class TestOutpostServiceConnectionsAPI(APITestCase):
|
||||||
|
|
||||||
def test_outpost_config(self):
|
def test_outpost_config(self):
|
||||||
"""Test Outpost's config field"""
|
"""Test Outpost's config field"""
|
||||||
provider = ProxyProvider.objects.create(name="test", authorization_flow=Flow.objects.first())
|
provider = ProxyProvider.objects.create(
|
||||||
invalid = OutpostSerializer(data={
|
name="test", authorization_flow=Flow.objects.first()
|
||||||
"name": "foo",
|
)
|
||||||
"providers": [provider.pk],
|
invalid = OutpostSerializer(
|
||||||
"config": {}
|
data={"name": "foo", "providers": [provider.pk], "config": {}}
|
||||||
})
|
)
|
||||||
self.assertFalse(invalid.is_valid())
|
self.assertFalse(invalid.is_valid())
|
||||||
self.assertIn("config", invalid.errors)
|
self.assertIn("config", invalid.errors)
|
||||||
valid = OutpostSerializer(data={
|
valid = OutpostSerializer(
|
||||||
"name": "foo",
|
data={
|
||||||
"providers": [provider.pk],
|
"name": "foo",
|
||||||
"config": default_outpost_config("foo")
|
"providers": [provider.pk],
|
||||||
})
|
"config": default_outpost_config("foo"),
|
||||||
|
}
|
||||||
|
)
|
||||||
self.assertTrue(valid.is_valid())
|
self.assertTrue(valid.is_valid())
|
||||||
|
|
|
@ -248,6 +248,7 @@ DATABASES = {
|
||||||
"NAME": CONFIG.y("postgresql.name"),
|
"NAME": CONFIG.y("postgresql.name"),
|
||||||
"USER": CONFIG.y("postgresql.user"),
|
"USER": CONFIG.y("postgresql.user"),
|
||||||
"PASSWORD": CONFIG.y("postgresql.password"),
|
"PASSWORD": CONFIG.y("postgresql.password"),
|
||||||
|
"PORT": int(CONFIG.y("postgresql.port")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue