| Age | Commit message (Collapse) | Author |
|
The search endpoint occasionally returns a page without 'records found'
when GN2 is under load or just restarted (cold query path). The test
passes on immediate re-run. Mark transient as a signal for future retry
logic (e.g. pytest-rerunfailures) rather than treating failures as
definitive.
|
|
|
|
|
|
|
|
|
|
RFC 6749 section
5.2 (https://www.rfc-editor.org/rfc/rfc6749.html#section-5.2) states
that the response code for `invalid_grant` should be 400, not
401. Update the test, therefore, to check for the correct status code.
|
|
Test that POST /auth/user/masquerade/ enforces the
system:user:masquerade privilege. Both admin and basic users can
obtain a token with masquerade scope (the test client supports it),
but gn-auth's can_masquerade decorator checks the user's roles:
- Basic user → ForbiddenAccess → 403
- Admin user → can masquerade as basic user → 200
Adds three session-scoped fixtures to the test module: admin_masquerade_token,
basic_masquerade_token, and basic_user_id.
|
|
Test that GET /auth/user/ returns 200 with user fields when a valid
Bearer token is present, and 401 when no token or a garbage token is
supplied.
|
|
Test that POST /auth/token returns 401 when given a wrong password or
an unknown email address.
|
|
Test that POST /auth/token with valid admin credentials returns 200,
includes an access_token, sets token_type to bearer, and grants at
least the requested scopes.
|
|
Replace individual GN_TEST_EMAIL/GN_TEST_PASSWORD/GN_OAUTH2_CLIENT_ID/
GN_OAUTH2_CLIENT_SECRET env vars with GN_TEST_USERS_FILE and
GN_TEST_CLIENT_FILE, which point to the JSON files produced by the CI
test-session setup commands (create-test-users, create-test-oauth2-client).
The oauth2_credentials fixture retains the individual env var fallback so
manual runs against an existing account still work. basic_oauth2_credentials
requires the file-based approach (basic users are only created by the CI
setup, not for manual runs).
Adds _read_json_file and _user_by_role helpers, and appends
basic_oauth2_credentials and basic_access_token fixtures.
|
|
Poll each service base URL until it responds with a non-502/503 status
before the test session begins. Retries on:
- ConnectionError: process not yet bound to its port
- 502/503: Nginx upstream-not-ready response (served while the upstream
gunicorn process is still starting up behind the reverse proxy)
Any other HTTP response is treated as "service is up". Polls every 2
seconds for up to 120 seconds, then raises RuntimeError with a clear
message.
This prevents spurious failures when smoke tests are queued immediately
after a service restart.
|
|
|
|
Without a [build-system] table Guix's pyproject-build-system has no
backend to invoke. Declare setuptools so the package builds cleanly.
|
|
The three BASE_URL variables are not limited to CD and production — they
work for any live deployment. Add an explicit note and a concrete example
using a personal/feature instance so this is clear to new contributors.
|
|
The code in this commit was written by claude code, and is yet to be
reviewed. Expect changes once the code has been reviewed.
|