about summary refs log tree commit diff
AgeCommit message (Collapse)Author
2026-06-26tests: mark test_search_shows_results_found as transient HEAD mainClaude
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.
2026-06-26tests: add valid-token passthrough test for case-attribute editClaude
2026-06-26tests: add token-required tests for approve and reject case-attribute endpointsClaude
2026-06-26tests: add gn3 auth-flow tests for case-attribute token enforcementClaude
2026-06-22Remove misplaced mark.Frederick Muriuki Muriithi
2026-06-22Test for error code 400.Frederick Muriuki Muriithi
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.
2026-06-15tests: add TestMasqueradePrivilege auth-flow testsClaude Sonnet 4.6
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.
2026-06-15tests: add TestUserProfileWithToken and TestUserProfileWithoutTokenClaude Sonnet 4.6
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.
2026-06-15tests: add TestTokenGrantRejection auth-flow testsClaude Sonnet 4.6
Test that POST /auth/token returns 401 when given a wrong password or an unknown email address.
2026-06-15tests: add TestTokenGrant auth-flow testsClaude Sonnet 4.6
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.
2026-06-15conftest: file-based credentials for auth-flow testsClaude Sonnet 4.6
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.
2026-06-15conftest: add readiness check before test sessionClaude Sonnet 4.6
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.
2026-05-28Remove the expectation for failure after fixing the bug.Frederick Muriuki Muriithi
2026-05-27pyproject: add build-system stanza for Guix packagingClaude Sonnet 4.6
Without a [build-system] table Guix's pyproject-build-system has no backend to invoke. Declare setuptools so the package builds cleanly.
2026-05-27README: document that env vars work for any deploymentClaude Sonnet 4.6
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.
2026-05-27Initialise with smoke tests for various GeneNetwork services.Frederick Muriuki Muriithi
The code in this commit was written by claude code, and is yet to be reviewed. Expect changes once the code has been reviewed.