X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=test%2Fut_behave_tests%2Ftest_testapi.py;h=0fbcd96805454593a4e8f81917f5581388f2bedb;hb=87d88eab6fe50101abc607857f13af9273aef80a;hp=2b57483c1cf4327bb202702d950ce6072f91815d;hpb=e2faa91512043386aa3a11ca44792bd3c009db76;p=nfvbench.git diff --git a/test/ut_behave_tests/test_testapi.py b/test/ut_behave_tests/test_testapi.py index 2b57483..0fbcd96 100644 --- a/test/ut_behave_tests/test_testapi.py +++ b/test/ut_behave_tests/test_testapi.py @@ -109,3 +109,24 @@ class TestTestapiClient(unittest.TestCase): with self.assertRaises(ValueError): client.find_last_result(testapi_params, scenario_tag="throughput", nfvbench_test_input=nfvbench_test_input) + + def test_flavor_is_ignored(self): + """Check that lookup in TestAPI does not filter on the flavor_type.""" + client = TestapiClient("http://127.0.0.1:8000/api/v1/results") + testapi_params = {"project_name": "nfvbench", "case_name": "characterization"} + nfvbench_test_input = {"frame_sizes": ['64'], + "flow_count": "100k", + "duration_sec": '10', + "rate": "ndr", + "user_label": "amical_tc18_loopback", + "flavor_type": "no_such_flavor"} + last_result = client.find_last_result(testapi_params, + scenario_tag="throughput", + nfvbench_test_input=nfvbench_test_input) + self.assertIsNotNone(last_result) + self.assertEqual(16765582, last_result["synthesis"]["total_tx_rate"]) + self.assertEqual(25, round(last_result["synthesis"]["avg_delay_usec"])) + + self.mock_requests.get.assert_called_once_with( + "http://127.0.0.1:8000/api/v1/results?" + "project=nfvbench&case=characterization&criteria=PASS&page=1")