Skip to content

Commit

Permalink
update swagger links for networks
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Harby committed Apr 16, 2024
1 parent fdda75c commit 1811cac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scheme_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
push:
pull_request:
branches:
- master
- development


jobs:
Expand Down
10 changes: 7 additions & 3 deletions grid-proxy/tests/schema_test/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@
network = os.environ['NETWORK']
if network == 'main':
url = 'https://gridproxy.grid.tf'
swagger = 'https://gridproxy.grid.tf/swagger/doc.json'
schema = schemathesis.from_uri(swagger, base_url = url)
elif network == '':
url = 'http://localhost:8080'
swagger = "docs/swagger.json"
schemathesis.from_path(swagger, base_url = url)
else:
url = 'https://gridproxy.'+ network +'.grid.tf'

schema = schemathesis.from_path("docs/swagger.json", base_url = url)
url = 'https://gridproxy.' + network + '.grid.tf'
swagger = 'https://gridproxy.' + network + '.grid.tf/swagger/doc.json'
schema = schemathesis.from_uri(swagger, base_url = url)


@pytest.mark.parametrize("check", [not_a_server_error, status_code_conformance, content_type_conformance, response_schema_conformance, response_headers_conformance])
Expand Down

0 comments on commit 1811cac

Please sign in to comment.