This repository has been archived by the owner on Jul 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add integration tests for 200 OK for excluded countries (#294)
- Loading branch information
Showing
4 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: "3" | ||
|
||
services: | ||
contile: | ||
environment: | ||
CONTILE_EXCLUDED_COUNTRIES_200: 0 | ||
client: | ||
environment: | ||
SCENARIOS_FILE: /tmp/client/scenarios_204.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
scenarios: | ||
- name: success_204_No_Content_exluded_region | ||
description: Test that Contile returns a 204 No Content for excluded regions | ||
steps: | ||
- request: | ||
method: GET | ||
path: '/v1/tiles' | ||
headers: | ||
# Contile maps the User-Agent Header value to os-family and form-factor parameters | ||
# The following value will result in os-family: macos and form-factor: desktop | ||
- name: User-Agent | ||
value: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:10.0) Gecko/20100101 Firefox/91.0' | ||
# Contile looks up the IP address from this header value and maps it to proxy information. | ||
# We use a random IP address from the range specified by the CIDR network notation "89.160.20.112/28" | ||
# from https://github.com/maxmind/MaxMind-DB/blob/main/source-data/GeoLite2-City-Test.json | ||
# The following value will result in country-code: SE and region-code: E | ||
- name: X-Forwarded-For | ||
value: '89.160.20.115' | ||
response: | ||
status_code: 204 | ||
content: '' |