Skip to content

Commit

Permalink
back to previous apitestcases method
Browse files Browse the repository at this point in the history
Signed-off-by: Divya Madala <[email protected]>
  • Loading branch information
Divyaasm committed Sep 21, 2023
1 parent 5475229 commit 8b7635d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validation_workflow/api_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_cases(self, projects: list) -> Any:
test_cases = [
['https://localhost:9200/', 200, ''],
['https://localhost:9200/_cat/plugins?v', 200, ''],
['https://localhost:9200/_cat/health?v', 200, ['green', 'yellow']],
['https://localhost:9200/_cat/health?v', 200, 'green'],
]
if ("opensearch-dashboards" in projects):
test_cases.append(['http://localhost:5601/api/status', 200, ''])
Expand All @@ -41,7 +41,7 @@ def test_cases(self, projects: list) -> Any:
logging.info(f"\nRequest_url ->{str(request_url)} \n")
logging.info(f"\nStatus_code ->{status_code} \nresponse_text ->{response_text}")

if status_code == success_status_code and (any(string in response_text for string in validate_strings)):
if status_code == success_status_code and (not validate_string or validate_string in response_text):
pass_counter += 1
else:
fail_counter += 1
Expand Down

0 comments on commit 8b7635d

Please sign in to comment.