T-7: M0.3a — Harden dev Mongo safety: env-safety throws on unsafe data-pipeline QA reads, scheduled jobs default off, read-only bypass tests
This commit is contained in:
parent
75e459f50b
commit
3bbf25ca25
3 changed files with 551 additions and 137 deletions
|
|
@ -139,6 +139,10 @@ describe('Environment safety & multi-env isolation', () => {
|
|||
'MONGODB_READ_URI',
|
||||
'MONGODB_DATABASE',
|
||||
'QUEUE_ENABLE_SCHEDULED_JOBS',
|
||||
'HTTP_PROXY',
|
||||
'HTTPS_PROXY',
|
||||
'http_proxy',
|
||||
'https_proxy',
|
||||
] as const;
|
||||
const savedEnv: Partial<Record<(typeof envKeys)[number], string | undefined>> = {};
|
||||
for (const key of envKeys) {
|
||||
|
|
@ -158,6 +162,10 @@ describe('Environment safety & multi-env isolation', () => {
|
|||
'mongodb://studio_stock_bot_read:secret@localhost:27017/stock?authSource=stock';
|
||||
process.env.MONGODB_DATABASE = 'stock_dev';
|
||||
delete process.env.QUEUE_ENABLE_SCHEDULED_JOBS;
|
||||
delete process.env.HTTP_PROXY;
|
||||
delete process.env.HTTPS_PROXY;
|
||||
delete process.env.http_proxy;
|
||||
delete process.env.https_proxy;
|
||||
|
||||
resetStockConfig();
|
||||
const cfg = initializeStockConfig('dataPipeline', { mongoReadOnly: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue