Refactor global readiness check to not use web browser
What does this MR do and why?
Aim of this change is to refactor gitlab "readiness" or "sanity" check to not use web browser. This allows for api tests to be more efficient and not start instance of web browser when the test itself doesn't require any interaction through UI.
Initial idea to use readiness api endpoint
Replace opening login page with readiness api endpoint check for global environment sanity check before test execution.
Readiness api endpoint is not usable because by default it is only available when called from the same host. This means that in most cases a specific ip address has to be added to allowlist in order for the endpoint to be used which makes it unsuitable.
Updated implementation:
- Refactor sanity check to fetch sign_in page via api request and check for presence of required elements by manually parsing html of the page
- Reset expired admin password in the hook rather than during license fabrication thus making sure tests work correctly even without license variable defined
Closes: gitlab-org/quality/quality-engineering/team-tasks#2518 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.