Merge "add check 'rally verify' related job in our CLI"
This commit is contained in:
commit
3cbcb149aa
@ -89,7 +89,7 @@ class Step(object):
|
|||||||
"""Execute step. The default action - execute the command"""
|
"""Execute step. The default action - execute the command"""
|
||||||
self.setUp()
|
self.setUp()
|
||||||
|
|
||||||
cmd = "rally --rally-debug verify %s" % (self.COMMAND % self.CALL_ARGS)
|
cmd = "rally --rally-debug %s" % (self.COMMAND % self.CALL_ARGS)
|
||||||
self.result["cmd"] = cmd
|
self.result["cmd"] = cmd
|
||||||
self.result["status"], self.result["output"] = self.call_rally(cmd)
|
self.result["status"], self.result["output"] = self.call_rally(cmd)
|
||||||
|
|
||||||
@ -217,14 +217,14 @@ class SetUpStep(Step):
|
|||||||
class ListPlugins(Step):
|
class ListPlugins(Step):
|
||||||
"""List plugins for verifiers management."""
|
"""List plugins for verifiers management."""
|
||||||
|
|
||||||
COMMAND = "list-plugins"
|
COMMAND = "verify list-plugins"
|
||||||
DEPENDS_ON = SetUpStep
|
DEPENDS_ON = SetUpStep
|
||||||
|
|
||||||
|
|
||||||
class CreateVerifier(Step):
|
class CreateVerifier(Step):
|
||||||
"""Create a Tempest verifier."""
|
"""Create a Tempest verifier."""
|
||||||
|
|
||||||
COMMAND = ("create-verifier --type %(type)s --name %(name)s "
|
COMMAND = ("verify create-verifier --type %(type)s --name %(name)s "
|
||||||
"--source %(source)s")
|
"--source %(source)s")
|
||||||
DEPENDS_ON = ListPlugins
|
DEPENDS_ON = ListPlugins
|
||||||
CALL_ARGS = {"type": "tempest",
|
CALL_ARGS = {"type": "tempest",
|
||||||
@ -235,21 +235,21 @@ class CreateVerifier(Step):
|
|||||||
class ShowVerifier(Step):
|
class ShowVerifier(Step):
|
||||||
"""Show information about the created verifier."""
|
"""Show information about the created verifier."""
|
||||||
|
|
||||||
COMMAND = "show-verifier"
|
COMMAND = "verify show-verifier"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
class ListVerifiers(Step):
|
class ListVerifiers(Step):
|
||||||
"""List all installed verifiers."""
|
"""List all installed verifiers."""
|
||||||
|
|
||||||
COMMAND = "list-verifiers"
|
COMMAND = "verify list-verifiers"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
class UpdateVerifier(Step):
|
class UpdateVerifier(Step):
|
||||||
"""Switch the verifier to the penultimate version."""
|
"""Switch the verifier to the penultimate version."""
|
||||||
|
|
||||||
COMMAND = "update-verifier --version %(version)s --update-venv"
|
COMMAND = "verify update-verifier --version %(version)s --update-venv"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@ -268,14 +268,14 @@ class UpdateVerifier(Step):
|
|||||||
class ConfigureVerifier(Step):
|
class ConfigureVerifier(Step):
|
||||||
"""Generate and show the verifier config file."""
|
"""Generate and show the verifier config file."""
|
||||||
|
|
||||||
COMMAND = "configure-verifier --show"
|
COMMAND = "verify configure-verifier --show"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
class ExtendVerifier(Step):
|
class ExtendVerifier(Step):
|
||||||
"""Extend verifier with keystone integration tests."""
|
"""Extend verifier with keystone integration tests."""
|
||||||
|
|
||||||
COMMAND = "add-verifier-ext --source %(source)s"
|
COMMAND = "verify add-verifier-ext --source %(source)s"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
CALL_ARGS = {"source": "https://git.openstack.org/openstack/keystone"}
|
CALL_ARGS = {"source": "https://git.openstack.org/openstack/keystone"}
|
||||||
|
|
||||||
@ -283,14 +283,14 @@ class ExtendVerifier(Step):
|
|||||||
class ListVerifierExtensions(Step):
|
class ListVerifierExtensions(Step):
|
||||||
"""List all extensions of verifier."""
|
"""List all extensions of verifier."""
|
||||||
|
|
||||||
COMMAND = "list-verifier-exts"
|
COMMAND = "verify list-verifier-exts"
|
||||||
DEPENDS_ON = ExtendVerifier
|
DEPENDS_ON = ExtendVerifier
|
||||||
|
|
||||||
|
|
||||||
class ListVerifierTests(Step):
|
class ListVerifierTests(Step):
|
||||||
"""List all tests of specific verifier."""
|
"""List all tests of specific verifier."""
|
||||||
|
|
||||||
COMMAND = "list-verifier-tests"
|
COMMAND = "verify list-verifier-tests"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ class RunVerification(Step):
|
|||||||
"""Run a verification."""
|
"""Run a verification."""
|
||||||
|
|
||||||
DEPENDS_ON = ConfigureVerifier
|
DEPENDS_ON = ConfigureVerifier
|
||||||
COMMAND = ("start --pattern set=%(set)s --skip-list %(skip_tests)s "
|
COMMAND = ("verify start --pattern set=%(set)s --skip-list %(skip_tests)s "
|
||||||
"--xfail-list %(xfail_tests)s --tag %(tag)s %(set)s-set "
|
"--xfail-list %(xfail_tests)s --tag %(tag)s %(set)s-set "
|
||||||
"--detailed")
|
"--detailed")
|
||||||
SKIP_TESTS = {
|
SKIP_TESTS = {
|
||||||
@ -331,7 +331,7 @@ class RunVerification(Step):
|
|||||||
class ReRunVerification(RunVerification):
|
class ReRunVerification(RunVerification):
|
||||||
"""Re-Run previous verification."""
|
"""Re-Run previous verification."""
|
||||||
|
|
||||||
COMMAND = "rerun --tag one-more-attempt"
|
COMMAND = "verify rerun --tag one-more-attempt"
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
super(RunVerification, self).run()
|
super(RunVerification, self).run()
|
||||||
@ -342,7 +342,7 @@ class ReRunVerification(RunVerification):
|
|||||||
class ShowVerification(Step):
|
class ShowVerification(Step):
|
||||||
"""Show results of verification."""
|
"""Show results of verification."""
|
||||||
|
|
||||||
COMMAND = "show"
|
COMMAND = "verify show"
|
||||||
DEPENDS_ON = RunVerification
|
DEPENDS_ON = RunVerification
|
||||||
|
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ class ShowSecondVerification(ShowVerification):
|
|||||||
class ShowDetailedVerification(Step):
|
class ShowDetailedVerification(Step):
|
||||||
"""Show detailed results of verification."""
|
"""Show detailed results of verification."""
|
||||||
|
|
||||||
COMMAND = "show --detailed"
|
COMMAND = "verify show --detailed"
|
||||||
DEPENDS_ON = RunVerification
|
DEPENDS_ON = RunVerification
|
||||||
|
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ class ShowDetailedSecondVerification(ShowDetailedVerification):
|
|||||||
class ReportVerificationMixin(Step):
|
class ReportVerificationMixin(Step):
|
||||||
"""Mixin for obtaining reports of verifications."""
|
"""Mixin for obtaining reports of verifications."""
|
||||||
|
|
||||||
COMMAND = "report --uuid %(uuids)s --type %(type)s --to %(out)s"
|
COMMAND = "verify report --uuid %(uuids)s --type %(type)s --to %(out)s"
|
||||||
|
|
||||||
HTML_TEMPLATE = ("<span class=\"%(status)s\">[%(status)s]</span>\n"
|
HTML_TEMPLATE = ("<span class=\"%(status)s\">[%(status)s]</span>\n"
|
||||||
"<a href=\"%(out)s\">%(doc)s</a> "
|
"<a href=\"%(out)s\">%(doc)s</a> "
|
||||||
@ -420,26 +420,37 @@ class JunitVerificationReport(ReportVerificationMixin):
|
|||||||
class ListVerifications(Step):
|
class ListVerifications(Step):
|
||||||
"""List all verifications."""
|
"""List all verifications."""
|
||||||
|
|
||||||
COMMAND = "list"
|
COMMAND = "verify list"
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
class DeleteVerifierExtension(Step):
|
class DeleteVerifierExtension(Step):
|
||||||
"""Delete keystone extension."""
|
"""Delete keystone extension."""
|
||||||
|
|
||||||
COMMAND = "delete-verifier-ext --name %(name)s"
|
COMMAND = "verify delete-verifier-ext --name %(name)s"
|
||||||
CALL_ARGS = {"name": "keystone_tests"}
|
CALL_ARGS = {"name": "keystone_tests"}
|
||||||
DEPENDS_ON = ExtendVerifier
|
DEPENDS_ON = ExtendVerifier
|
||||||
|
|
||||||
|
|
||||||
class DeleteVerifier(Step):
|
class DeleteVerifier(Step):
|
||||||
"""Delete Tempest verifier and all verifications."""
|
"""Delete only Tempest verifier.
|
||||||
|
|
||||||
COMMAND = "delete-verifier --id %(id)s --force"
|
all verifications will be delete when destroy deployment.
|
||||||
|
|
||||||
|
"""
|
||||||
|
COMMAND = "verify delete-verifier --id %(id)s --force"
|
||||||
CALL_ARGS = {"id": CreateVerifier.CALL_ARGS["name"]}
|
CALL_ARGS = {"id": CreateVerifier.CALL_ARGS["name"]}
|
||||||
DEPENDS_ON = CreateVerifier
|
DEPENDS_ON = CreateVerifier
|
||||||
|
|
||||||
|
|
||||||
|
class DestroyDeployment(Step):
|
||||||
|
"""Delete the deployment, and verifications of this deployment."""
|
||||||
|
|
||||||
|
COMMAND = "deployment destroy --deployment %(id)s"
|
||||||
|
CALL_ARGS = {"id": SetUpStep.DEPLOYMENT_NAME}
|
||||||
|
DEPENDS_ON = SetUpStep
|
||||||
|
|
||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
|
|
||||||
steps = [SetUpStep,
|
steps = [SetUpStep,
|
||||||
@ -460,6 +471,7 @@ def run(args):
|
|||||||
JunitVerificationReport,
|
JunitVerificationReport,
|
||||||
ListVerifications,
|
ListVerifications,
|
||||||
DeleteVerifierExtension,
|
DeleteVerifierExtension,
|
||||||
|
DestroyDeployment,
|
||||||
DeleteVerifier]
|
DeleteVerifier]
|
||||||
|
|
||||||
if args.compare:
|
if args.compare:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user