Replace SystemUserBackend with UNIXUserController

This commit is contained in:
Santiago L 2021-03-30 13:11:41 +02:00
parent f4c0a7413c
commit c505f9a3c6
2 changed files with 63 additions and 63 deletions

View file

@ -39,7 +39,7 @@ class SystemUserMixin(object):
def add_route(self): def add_route(self):
master = Server.objects.create(name=self.MASTER_SERVER) master = Server.objects.create(name=self.MASTER_SERVER)
backend = backends.SystemUserBackend.get_name() backend = backends.UNIXUserController.get_name()
Route.objects.create(backend=backend, match=True, host=master) Route.objects.create(backend=backend, match=True, host=master)
def save(self): def save(self):

View file

@ -5,7 +5,7 @@ from io import StringIO
from django.conf import settings as djsettings from django.conf import settings as djsettings
from orchestra.contrib.orchestration.models import Server, Route from orchestra.contrib.orchestration.models import Server, Route
from orchestra.contrib.systemusers.backends import SystemUserBackend from orchestra.contrib.systemusers.backends import UNIXUserController
from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error from orchestra.utils.tests import BaseLiveServerTestCase, random_ascii, snapshot_on_error, save_response_on_error
from ... import backends from ... import backends
@ -26,7 +26,7 @@ class WebAppMixin(object):
def add_route(self): def add_route(self):
server, __ = Server.objects.get_or_create(name=self.MASTER_SERVER) server, __ = Server.objects.get_or_create(name=self.MASTER_SERVER)
backend = SystemUserBackend.get_name() backend = UNIXUserController.get_name()
Route.objects.get_or_create(backend=backend, match=True, host=server) Route.objects.get_or_create(backend=backend, match=True, host=server)
backend = self.backend.get_name() backend = self.backend.get_name()
match = 'webapp.type == "%s"' % self.type_value match = 'webapp.type == "%s"' % self.type_value