Skip to content

Commit

Permalink
Fixed CI tests based uppon latest changes of tools
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecosta90 committed Oct 23, 2023
1 parent 84f3580 commit ba9713e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
pytest:
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
python-version: [ '3.9', '3.10' ]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
USING_COVERAGE: "3.10"
Expand Down
2 changes: 1 addition & 1 deletion redisbench_admin/compare/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def get_by_strings(
baseline_str = baseline_branch
if comparison_branch is not None:
comparison_covered = True
by_str_baseline = "branch"
by_str_comparison = "branch"
comparison_str = comparison_branch

if baseline_tag is not None:
Expand Down
2 changes: 1 addition & 1 deletion redisbench_admin/run_remote/remote_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def remote_env_setup(
pass
else:
logging.warning(
f"Even though there is a spot instance config, avoiding deploying it."
"Even though there is a spot instance config, avoiding deploying it."
)
if spot_available_and_used is False:
(
Expand Down
4 changes: 3 additions & 1 deletion redisbench_admin/run_remote/run_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,9 @@ def run_remote_command_logic(args, project_name, project_version):
)
return_code |= 1
raise Exception(
"Failed to run remote benchmark."
"Failed to run remote benchmark. {}".format(
e.__str__()
)
)

if setup_details["env"] is None:
Expand Down
1 change: 1 addition & 0 deletions redisbench_admin/utils/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def parse_exporter_timemetric(metric_path: str, results_dict: dict):
logging.error(
"Unable to parse time-metric {}. Error: {}".format(metric_path, e.__str__())
)
pass
return datapoints_timestamp


Expand Down
2 changes: 0 additions & 2 deletions redisbench_admin/utils/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,6 @@ def fetch_remote_setup_from_config(
setup_type = remote_setup_property["type"]
if "setup" in remote_setup_property:
setup = remote_setup_property["setup"]
if "spot_instance" in remote_setup_property:
spot_path = "/terraform/" + remote_setup_property["spot_instance"]
# fetch terraform folder
path = "/terraform/{}-{}".format(setup_type, setup)
terraform_working_dir = common_tf(branch, path, repo)
Expand Down
1 change: 1 addition & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def test_extract_test_feasible_setups():
defaults_filename = "./tests/test_data/common-properties-v0.3.yml"
(
default_kpis,
_,
default_metrics,
exporter_timemetric_path,
default_specs,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_compare_command_logic():
assert total_improvements == 0
assert detected_regressions == []
# ensure that we have testcases date
assert "(1 datapoints)" in comment_body
assert "0.0%" in comment_body
assert (
"Detected a total of {} stable tests between versions".format(total_tests)
in comment_body
Expand Down
2 changes: 1 addition & 1 deletion tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_export_command_logic():
args = parser.parse_args(
args=[
"--benchmark-result-file",
"./tests/test_data/result_report_1690282709.835491.json",
"./tests/test_data/results/result_report_1690282709.835491.json",
"--exporter-spec-file",
"./tests/test_data/common-properties-enterprise.yml",
"--redistimeseries_host",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_generate_standalone_redis_server_args():
"--dir",
".",
"--loadmodule",
os.path.abspath(local_module_file),
local_module_file,
]

cmd = generate_standalone_redis_server_args(
Expand Down Expand Up @@ -156,7 +156,7 @@ def test_generate_standalone_redis_server_args():
"--dir",
".",
"--loadmodule",
os.path.abspath(local_module_file),
local_module_file,
"CHUNK_SIZE_BYTES",
"128",
]
Expand Down

0 comments on commit ba9713e

Please sign in to comment.