Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tests_api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
tests_api
Commits
2c2faa17
Commit
2c2faa17
authored
2 years ago
by
Kristupas Bobraitis
Browse files
Options
Downloads
Patches
Plain Diff
Added 'IS_DIRECT_CALL_HAFAH' env var
parent
160911f1
No related branches found
Branches containing commit
No related tags found
1 merge request
!246
Add 'IS_DIRECT_CALL_HAFAH' env var
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/validate_response.py
+4
-2
4 additions, 2 deletions
scripts/validate_response.py
with
4 additions
and
2 deletions
scripts/validate_response.py
+
4
−
2
View file @
2c2faa17
...
@@ -106,7 +106,10 @@ def compare_response_with_pattern(response, method=None, directory=None, ignore_
...
@@ -106,7 +106,10 @@ def compare_response_with_pattern(response, method=None, directory=None, ignore_
response_json
=
response
.
json
()
response_json
=
response
.
json
()
error
=
response_json
.
get
(
"
error
"
,
None
)
error
=
response_json
.
get
(
"
error
"
,
None
)
result
=
response_json
.
get
(
"
result
"
,
None
)
if
os
.
getenv
(
"
IS_DIRECT_CALL_HAFAH
"
,
""
).
lower
()
==
"
true
"
:
result
=
response_json
else
:
result
=
response_json
.
get
(
"
result
"
,
None
)
exclude_regex_path
=
None
exclude_regex_path
=
None
if
isinstance
(
ignore_tags
,
str
):
if
isinstance
(
ignore_tags
,
str
):
...
@@ -202,4 +205,3 @@ def has_valid_response(response, method=None, directory=None, error_response=Fal
...
@@ -202,4 +205,3 @@ def has_valid_response(response, method=None, directory=None, error_response=Fal
if
correct_response
is
None
:
if
correct_response
is
None
:
msg
=
"
Error detected in response: result is null, json object was expected
"
msg
=
"
Error detected in response: result is null, json object was expected
"
raise
NoResultException
(
msg
)
raise
NoResultException
(
msg
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment