From 24a9497addc256ee2a0888d9126e7bdae6c5259c Mon Sep 17 00:00:00 2001 From: Shashank Reddy Boyapally Date: Wed, 10 Jul 2024 14:34:18 -0400 Subject: [PATCH] updated utility for functional testing Signed-off-by: Shashank Reddy Boyapally --- fmatch/test_fmatch.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/fmatch/test_fmatch.py b/fmatch/test_fmatch.py index a63437b..3d665c5 100644 --- a/fmatch/test_fmatch.py +++ b/fmatch/test_fmatch.py @@ -2,24 +2,31 @@ test_fmatch """ +from datetime import datetime import sys +import warnings # pylint: disable=import-error import pandas as pd # pylint: disable=import-error from matcher import Matcher -match = Matcher(index="perf_scale_ci") -res=match.get_metadata_by_uuid("b4afc724-f175-44d1-81ff-a8255fea034f",'perf_scale_ci') +warnings.filterwarnings("ignore", message="Unverified HTTPS request.*") +warnings.filterwarnings( + "ignore", category=UserWarning, message=".*Connecting to.*verify_certs=False.*" +) + +match = Matcher(index="perf_scale_ci*", verify_certs=False) +res=match.get_metadata_by_uuid("b4afc724-f175-44d1-81ff-a8255fea034f",'perf_scale_ci*') meta = {} meta["masterNodesType"] = "m6a.xlarge" meta["workerNodesType"] = "m6a.xlarge" meta["platform"] = "AWS" meta["masterNodesCount"] = 3 -meta["workerNodesCount"] = 24 +meta["workerNodesCount"] = 6 meta["jobStatus"] = "success" -meta["ocpVersion"] = "4.15" +meta["ocpVersion"] = "4.17" meta["networkType"] = "OVNKubernetes" meta["benchmark.keyword"] = "cluster-density-v2" # meta['encrypted'] = "true" @@ -27,10 +34,15 @@ # meta['fips'] = "false" uuids = match.get_uuid_by_metadata(meta) +print("All uuids",len(uuids)) +date= datetime.strptime("2024-07-01T13:46:24Z","%Y-%m-%dT%H:%M:%SZ") +uuids2= match.get_uuid_by_metadata(meta,lookback_date=date) +print("lookback uuids",len(uuids2)) +uuids2 = match.get_uuid_by_metadata(meta) if len(uuids) == 0: print("No UUID present for given metadata") sys.exit() -runs = match.match_kube_burner(uuids) +runs = match.match_kube_burner(uuids,"ripsaw-kube-burner*") ids = match.filter_runs(runs, runs) podl_metrics = {