pass the correct app type when initializing command in tests

The first argument to a Command class should be the App that is
loading the command.

Change-Id: I8ad67accb5bd3c377dda31fde49447f68f608a48
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-07-12 21:03:20 +00:00
parent 80e1a67ffe
commit e65eab6639
1 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@
import json
import yaml
from kolla_kubernetes import app
from kolla_kubernetes.commands.cmd_resource import ResourceTemplate
from kolla_kubernetes.service_resources import KollaKubernetesResources
from kolla_kubernetes.tests import base
@ -55,6 +56,7 @@ class argobj(object):
def on_each_template(func):
the_app = app.KollaKubernetesApp()
for service_name in KKR.getServices():
service = KKR.getServiceByName(service_name)
for resource_type in RESOURCE_TYPES:
@ -67,7 +69,7 @@ def on_each_template(func):
template_name)
print("Processing:", resource_type,
service_name, template_name)
rt = ResourceTemplate('kolla-kubernetes.py',
rt = ResourceTemplate(the_app,
'', 'resource-template')
o = rt.take_action(args=args, skip_and_return=True)
func(args, o)