diora-web/e2e/env.js

22 lines
712 B
JavaScript
Raw Permalink Normal View History

// Shared constants between playwright.config.js and e2e/global-setup.js.
// E2E_PORT / E2E_PYTHON: a port that no dev server holds (the suite must never
// run against a real database), and the Python with the requirements installed.
const PORT = Number(process.env.E2E_PORT || 8000);
const BASE_URL = `http://127.0.0.1:${PORT}`;
const PYTHON = process.env.E2E_PYTHON || 'python3';
const SERVER_ENV = {
...process.env,
DIORA_DB_NAME: 'e2e_test.sqlite3',
SECRET_KEY: 'e2e-test-secret-key',
DEBUG: 'True',
ALLOWED_HOSTS: 'localhost 127.0.0.1',
};
const TEST_USER = {
username: 'e2e_test_user',
password: 'e2e-test-pw-12345',
};
module.exports = { PORT, BASE_URL, PYTHON, SERVER_ENV, TEST_USER };