Skip to content

Commit

Permalink
upd steps for none field postgres and oracle and upd db operation for…
Browse files Browse the repository at this point in the history
… not print cache result query
  • Loading branch information
Lucaaccenture committed Sep 17, 2024
1 parent 6852dbe commit 36039fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def executeQuery(conn, query:str, as_dict:bool = False) -> list:
print(f">>>>>>>>>>>>>>db operation apicfg URL {url}")
response = requests.post(url, data=query, headers=headers)
assert response.status_code == 200, f"Error status code db operation apicfg RESPONSE is {response.status_code}"
print(f">>>>>>>>>>>>>>db operation apicfg RESPONSE {response.json()}")

if 'select * from cache' not in query:
print(f">>>>>>>>>>>>>>db operation apicfg RESPONSE {response.json()}")

if as_dict:
return response.json()
else:
Expand Down
10 changes: 7 additions & 3 deletions src/integ-test/bdd-test/features/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4028,9 +4028,13 @@ def step_impl(context, value, column, query_name, table_name, db_name, name_macr
query_result = [t[0] for t in exec_query]
print('query_result: ', query_result)

if value == 'None':
print('Check value None')
assert query_result[0] == None, f"assert result query with None for Failed!"
if value == 'None':
if dbRun == 'Postgres':
print('Check value None for Postgres')
assert query_result[0] == '', f"assert result query with None for Failed!"
elif dbRun == 'Oracle':
print('Check value None for Oracle')
assert query_result[0] == None, f"assert result query with None for Failed!"
elif value == 'NotNone':
print('Check value NotNone')
assert query_result[0] != None, f"assert result query with Not None Failed!"
Expand Down

0 comments on commit 36039fd

Please sign in to comment.