Skip to content

Conversation

@karilint
Copy link
Contributor

Motivation

  • Ensure API tests can log in after a test database reset by recreating or updating test user accounts with known credentials.

Description

  • Call test/create-test-users from resetDatabase in backend/src/api-tests/utils.ts so test users are (re)created after database resets.
  • Update createTestUsers in backend/src/services/user.ts to update existing accounts by setting newpassword and now_user_group so passwords and roles are refreshed for preexisting users.
  • Remove an obsolete API test file (src/api-tests/species/create.test.ts) that was deleted in the diff.

Testing

  • Ran npm run lint and the linter completed successfully.
  • Ran npm run tsc and TypeScript compilation completed successfully.
  • API tests (npm run test:api:local) were not executed as part of this rollout because they require a configured test database and environment.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants