Ejemplo n.º 1
0
def start_verification(args):
    """Start a verification, show results and generate reports."""
    results = call_rally("verify start %s" % args)
    results["uuid"] = envutils.get_global(envutils.ENV_VERIFICATION)
    results["show"] = call_rally("verify show")
    results["show_detailed"] = call_rally("verify show --detailed")
    for output_type in ("json", "html", "junit-xml"):
        results[output_type.replace("-",
                                    "_")] = call_rally("verify report",
                                                       output_type=output_type)
    # NOTE(andreykurilin): we need to clean verification uuid from global
    # environment to be able to load it next time(for another verification).
    envutils.clear_global(envutils.ENV_VERIFICATION)
    return results
Ejemplo n.º 2
0
def launch_verification_once(launch_parameters):
    """Launch verification and show results in different formats."""
    results = call_rally("verify start %s" % launch_parameters)
    results["uuid"] = envutils.get_global(envutils.ENV_VERIFICATION)
    results["result_in_html"] = call_rally(
        "verify results --html", output_type="html")
    results["result_in_json"] = call_rally(
        "verify results --json", output_type="json")
    results["show"] = call_rally("verify show")
    results["show_detailed"] = call_rally("verify show --detailed")
    # NOTE(andreykurilin): we need to clean verification uuid from global
    # environment to be able to load it next time(for another verification).
    envutils.clear_global(envutils.ENV_VERIFICATION)
    return results
Ejemplo n.º 3
0
def launch_verification_once(launch_parameters):
    """Launch verification and show results in different formats."""
    results = call_rally("verify start %s" % launch_parameters)
    results["uuid"] = envutils.get_global(envutils.ENV_VERIFICATION)
    results["result_in_html"] = call_rally("verify results",
                                           output_type="html")
    results["result_in_json"] = call_rally("verify results",
                                           output_type="json")
    results["show"] = call_rally("verify show")
    results["show_detailed"] = call_rally("verify show --detailed")
    # NOTE(andreykurilin): we need to clean verification uuid from global
    # environment to be able to load it next time(for another verification).
    envutils.clear_global(envutils.ENV_VERIFICATION)
    return results
 def test_clear_global(self, mock_update_env_file, mock_path_exists):
     envutils.clear_global(envutils.ENV_DEPLOYMENT)
     mock_update_env_file.assert_called_once_with(
         os.path.expanduser("~/.rally/globals"), envutils.ENV_DEPLOYMENT,
         "\n")
     self.assertEqual(os.environ, {})
Ejemplo n.º 5
0
 def test_clear_global(self, mock_update_env_file, mock_path_exists):
     envutils.clear_global(envutils.ENV_DEPLOYMENT)
     mock_update_env_file.assert_called_once_with(os.path.expanduser(
         "~/.rally/globals"), envutils.ENV_DEPLOYMENT, "\n")
     self.assertEqual(os.environ, {})