tests/integration: fix tests failing due to incorrect comparison
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4715e7bf04
commit
036a4e86e2
|
@ -20,7 +20,7 @@ class ServiceReconciler(KubernetesObjectReconciler[V1Service]):
|
||||||
self.api = CoreV1Api(controller.client)
|
self.api = CoreV1Api(controller.client)
|
||||||
|
|
||||||
def reconcile(self, current: V1Service, reference: V1Service):
|
def reconcile(self, current: V1Service, reference: V1Service):
|
||||||
compare_ports(current.spec, reference.spec)
|
compare_ports(current.spec.ports, reference.spec.ports)
|
||||||
# run the base reconcile last, as that will probably raise NeedsUpdate
|
# run the base reconcile last, as that will probably raise NeedsUpdate
|
||||||
# after an authentik update. However the ports might have also changed during
|
# after an authentik update. However the ports might have also changed during
|
||||||
# the update, so this causes the service to be re-created with higher
|
# the update, so this causes the service to be re-created with higher
|
||||||
|
|
|
@ -5,9 +5,9 @@ from authentik.flows.models import Flow
|
||||||
from authentik.lib.config import CONFIG
|
from authentik.lib.config import CONFIG
|
||||||
from authentik.outposts.controllers.k8s.deployment import DeploymentReconciler
|
from authentik.outposts.controllers.k8s.deployment import DeploymentReconciler
|
||||||
from authentik.outposts.controllers.k8s.triggers import NeedsUpdate
|
from authentik.outposts.controllers.k8s.triggers import NeedsUpdate
|
||||||
from authentik.outposts.controllers.kubernetes import KubernetesController
|
|
||||||
from authentik.outposts.models import KubernetesServiceConnection, Outpost, OutpostType
|
from authentik.outposts.models import KubernetesServiceConnection, Outpost, OutpostType
|
||||||
from authentik.outposts.tasks import outpost_local_connection
|
from authentik.outposts.tasks import outpost_local_connection
|
||||||
|
from authentik.providers.proxy.controllers.kubernetes import ProxyKubernetesController
|
||||||
from authentik.providers.proxy.models import ProxyProvider
|
from authentik.providers.proxy.models import ProxyProvider
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class OutpostKubernetesTests(TestCase):
|
||||||
|
|
||||||
def test_deployment_reconciler(self):
|
def test_deployment_reconciler(self):
|
||||||
"""test that deployment requires update"""
|
"""test that deployment requires update"""
|
||||||
controller = KubernetesController(self.outpost, self.service_connection)
|
controller = ProxyKubernetesController(self.outpost, self.service_connection)
|
||||||
deployment_reconciler = DeploymentReconciler(controller)
|
deployment_reconciler = DeploymentReconciler(controller)
|
||||||
|
|
||||||
self.assertIsNotNone(deployment_reconciler.retrieve())
|
self.assertIsNotNone(deployment_reconciler.retrieve())
|
||||||
|
|
Reference in a new issue