hobo_deploy: remove dedicated hobo_deploy's for combo that is no more needed (#33594)
This commit is contained in:
parent
e5ede8832e
commit
e869920a9d
|
@ -1,11 +0,0 @@
|
|||
from hobo.agent.common.management.commands import hobo_deploy
|
||||
|
||||
class Command(hobo_deploy.Command):
|
||||
help = 'Deploy multitenant combo service from hobo'
|
||||
|
||||
def get_theme(self, hobo_environment):
|
||||
try:
|
||||
me = [x for x in hobo_environment.get('services') if x.get('this')][0]
|
||||
except IndexError:
|
||||
return
|
||||
return super(Command, self).get_theme(hobo_environment)
|
|
@ -9,7 +9,6 @@ import pytest
|
|||
from mock import call, patch, Mock
|
||||
from requests import Response, exceptions
|
||||
|
||||
from hobo.agent.combo.management.commands.hobo_deploy import Command as ComboCommand
|
||||
from hobo.agent.common.management.commands.hobo_deploy import (
|
||||
replace_file, Command, CommandError)
|
||||
from hobo.agent.hobo.management.commands.hobo_deploy import Command as HoboCommand
|
||||
|
@ -404,20 +403,6 @@ def test_configure_template(mocked_call_command, mocked_tenant_context,
|
|||
assert mocked_call_command.mock_calls == []
|
||||
|
||||
|
||||
def test_combo_get_theme(fake_themes):
|
||||
# IMHO, JSON's 'this' entry can't miss
|
||||
# cf: hobo/agent/common/management/commands/hobo_deploy.py::configure_template
|
||||
# cf: hobo/agent/hobo/management/commands/hobo_deploy.py::deploy_specifics
|
||||
# TODO: dead file (I mean it should be removed)
|
||||
|
||||
COMBO = {'service-id': 'combo', 'this': True}
|
||||
ENVIRONMENT = {'services': [COMBO], 'variables': {'theme': 'publik'}}
|
||||
command = ComboCommand()
|
||||
|
||||
# main case
|
||||
assert command.get_theme(ENVIRONMENT)['id'] == 'publik'
|
||||
|
||||
|
||||
@patch('hobo.agent.common.management.commands.hobo_deploy.Command.deploy_specifics')
|
||||
@patch('hobo.agent.hobo.management.commands.hobo_deploy.tenant_context')
|
||||
def test_hobo_deploy_specifics_alone(mocked_tenant_context, mocked_super, db):
|
||||
|
|
|
@ -77,15 +77,3 @@ def test_deploy_specifics_on_hobo_agent(db):
|
|||
# fails to simulate call from bijoe agent, that overload deploy_specifics()
|
||||
# $ bijoe-mange hobo-deploy
|
||||
# here, because this code is not implemented here
|
||||
|
||||
|
||||
def test_get_theme_on_combo_agent(db):
|
||||
"""overloaded case for combo:
|
||||
$ combo-manage hobo-deploy env.json # simulate this bash query
|
||||
"""
|
||||
command = load_command_class('hobo.agent.combo', 'hobo_deploy')
|
||||
domain = 'combo.dev.publik.love'
|
||||
command.handle('https://%s/' % domain, 'tests_schemas/env.json')
|
||||
assert_deployed(domain)
|
||||
# lack an assert statement proving we do reach
|
||||
# get_theme() in hobo/agent/combo/management/commands/hobo_deploy.py
|
||||
|
|
Loading…
Reference in New Issue