Skip to content

Commit

Permalink
added a new option --caas-provider to let user to decide which k8s cl…
Browse files Browse the repository at this point in the history
…oud provider to use for this test.
  • Loading branch information
ycliuhw committed Mar 18, 2019
1 parent 58626ab commit eccc301
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions acceptancetests/assess_caas_deploy_charms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

from jujupy.utility import until_timeout
from jujupy.k8s_provider import (
MicroK8s,
# KubernetesCore,
providers,
K8sProviderType,
)

__metaclass__ = type
Expand Down Expand Up @@ -118,7 +118,12 @@ def parse_args(argv):
parser = argparse.ArgumentParser(description="Cass charm deployment CI test")
parser.add_argument(
'--caas-image', action='store', default=None,
help='Caas operator docker image name to use with format of <username>/jujud-operator:<tag>.'
help='CAAS operator docker image name to use with format of <username>/caas-jujud-operator:<tag>.'
)
parser.add_argument(
'--caas-provider', action='store', default='MICROK8S',
choices=K8sProviderType.keys,
help='Specify K8s cloud provider to use for CAAS tests.'
)

add_basic_testing_arguments(parser, existing=False)
Expand All @@ -136,13 +141,9 @@ def main(argv=None):
with bs_manager.booted_context(args.upload_tools):
client = bs_manager.client
ensure_operator_image_path(client, image_path=args.caas_image)
for k8s_provider in (
# all k8s client we need support.
MicroK8s,
# KubernetesCore # disable for now.
):
caas_client = k8s_provider(client)
assess_caas_charm_deployment(caas_client)
k8s_provider = providers[args.caas_provider]
caas_client = k8s_provider(client)
assess_caas_charm_deployment(caas_client)
return 0


Expand Down

0 comments on commit eccc301

Please sign in to comment.