-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ [#4908] Update config check tests for json registration plugin
* Use VCR instead of mock now * Add test for invalid response from API endpoint
- Loading branch information
1 parent
61b638d
commit 707ef37
Showing
3 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...s/files/vcr_cassettes/ConfigCheckTests/ConfigCheckTests.test_config_check_happy_flow.yaml
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,34 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate, br | ||
Authorization: | ||
- Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIiLCJpYXQiOjE3MzU4MTE1NTAsImNsaWVudF9pZCI6IiIsInVzZXJfaWQiOiIiLCJ1c2VyX3JlcHJlc2VudGF0aW9uIjoiIn0.9NfTz6nrkM3ysWrsMYIV1kxDGvtXXF3uugyVpuUFqD0 | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.2 | ||
method: GET | ||
uri: http://localhost/test_connection | ||
response: | ||
body: | ||
string: "{\n \"message\": \"OK\"\n}\n" | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '22' | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Thu, 02 Jan 2025 09:52:30 GMT | ||
Server: | ||
- Werkzeug/3.1.3 Python/3.12.8 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
45 changes: 45 additions & 0 deletions
45
...gCheckTests/ConfigCheckTests.test_invalid_response_from_api_test_connection_endpoint.yaml
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,45 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate, br | ||
Authorization: | ||
- Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIiLCJpYXQiOjE3MzU4MTE1NTAsImNsaWVudF9pZCI6IiIsInVzZXJfaWQiOiIiLCJ1c2VyX3JlcHJlc2VudGF0aW9uIjoiIn0.9NfTz6nrkM3ysWrsMYIV1kxDGvtXXF3uugyVpuUFqD0 | ||
Connection: | ||
- keep-alive | ||
User-Agent: | ||
- python-requests/2.32.2 | ||
method: GET | ||
uri: http://localhost/fake_endpoint | ||
response: | ||
body: | ||
string: '<!doctype html> | ||
<html lang=en> | ||
<title>404 Not Found</title> | ||
<h1>Not Found</h1> | ||
<p>The requested URL was not found on the server. If you entered the URL manually | ||
please check your spelling and try again.</p> | ||
' | ||
headers: | ||
Connection: | ||
- close | ||
Content-Length: | ||
- '207' | ||
Content-Type: | ||
- text/html; charset=utf-8 | ||
Date: | ||
- Thu, 02 Jan 2025 09:52:30 GMT | ||
Server: | ||
- Werkzeug/3.1.3 Python/3.12.8 | ||
status: | ||
code: 404 | ||
message: NOT FOUND | ||
version: 1 |
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