mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 02:29:29 +00:00
refactor(e2e): replace S3 bucket name check with explicit SHUMAI_E2E env flag
This commit is contained in:
@@ -18,6 +18,7 @@ async function start() {
|
||||
process.env.SHUMAI_SERVER_PORT = '5200'
|
||||
process.env.BETTER_AUTH_URL = 'http://localhost:5200'
|
||||
process.env.NODE_ENV = 'development'
|
||||
process.env.SHUMAI_E2E = 'true'
|
||||
|
||||
// Write variables to .env.e2e file so the teardown can load them
|
||||
const envContent = [`DATABASE_URL=${process.env.DATABASE_URL}`, `S3_BUCKET=${bucketName}`].join(
|
||||
|
||||
@@ -135,7 +135,7 @@ async function run() {
|
||||
process.on('SIGTERM', shutdown)
|
||||
}
|
||||
|
||||
if (process.env.S3_BUCKET && process.env.S3_BUCKET.startsWith('shumai-e2e')) {
|
||||
if (process.env.SHUMAI_E2E === 'true') {
|
||||
run().catch((err) => {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user