-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
The admin ban integration tests are currently disabled because they require admin credentials that aren't configured in CI.
Background
The requestLine.spec.js test file includes a test for user banning functionality:
should return 403 when user is banned
This test requires:
AUTH_USERNAMEandAUTH_PASSWORDenvironment variables set for the test runner- A corresponding admin user with credentials in better-auth
Requirements
To enable these tests, configure the following in .env:
# Default admin user (created by auth service when CREATE_DEFAULT_USER=TRUE)
[email protected]
DEFAULT_USER_USERNAME=testadmin
DEFAULT_USER_PASSWORD=<secure-password>
DEFAULT_USER_DJ_NAME=Test DJ
DEFAULT_USER_REAL_NAME=Test Admin
DEFAULT_ORG_SLUG=test-org
DEFAULT_ORG_NAME=Test Organization
# Credentials for test runner (should match DEFAULT_USER)
AUTH_USERNAME=testadmin
AUTH_PASSWORD=<secure-password>Implementation
- Add the required environment variables to
.env - Update
scripts/ci-test.shto enableTEST_ADMIN_BAN=true - Verify admin ban test passes with
npm run ci:testmock:full
Current Workaround
The admin ban test is skipped when TEST_ADMIN_BAN is not set to true. The ci:test:full script currently does not enable this flag.
Files
scripts/ci-test.sh- CI test runner (hasTEST_ADMIN_BANcommented out)scripts/ci-env.sh- CI environment setup (checks for DEFAULT_USER credentials)tests/integration/requestLine.spec.js- Contains the admin ban testtests/utils/anonymous_auth.js- ContainsbanUser,unbanUser,getAdminTokenfunctions
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request