-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When an application defines both expected_location and expected_content, the current logic in GetStatus() bypasses validation of the original response and fetches the redirect target directly.
This causes the test to validate the wrong response (target instead of source) and fails on relative expected_location values (e.g., mng/login → unsupported protocol scheme "").
Steps to Reproduce
Add this entry to config/applications.yml:
name: primo-ve-search
url: "https://search.library.nyu.edu/"
expected_status: 302
expected_location: "mng/login"
expected_content: "Log into your account"
Run:
docker compose run aswa primo-ve-search
Observe the output:
Error performing request: Get "mng/login": unsupported protocol scheme ""
or, if the URL is made absolute, the test compares status=302 and location=/discovery/... from the wrong response.
Expected Behavior:
The test should:
Perform a request to the original URL (https://search.library.nyu.edu/) with redirects disabled.
Validate expected_status and expected_location against that original response.
If expected_content is defined, follow to the resolved target (e.g., /mng/login or /discovery/...) and verify that the content matches.