Fix skip decorator
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import logging
|
||||
import zaza.model
|
||||
|
||||
import zaza.charm_lifecycle.utils as utils
|
||||
|
||||
|
||||
def skipIfNotHA(service_name):
|
||||
def _skipIfNotHA_inner_1(f):
|
||||
def _skipIfNotHA_inner_2(*args, **kwargs):
|
||||
if len(zaza.model.get_app_ips(service_name)) > 1:
|
||||
ips = zaza.model.get_app_ips(utils.get_juju_model(), service_name)
|
||||
if len(ips) > 1:
|
||||
return f(*args, **kwargs)
|
||||
else:
|
||||
logging.warn("Skipping HA test for non-ha service {}".format(
|
||||
|
||||
Reference in New Issue
Block a user