mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Fix review findings validating OM-84
This commit is contained in:
1 parent
8f23959a01
commit
f0efe26068
1 file changed
+7
-1
@@ -713,6 +713,7 @@ describe('sandbox secret specs', () => {
|
||||
})
|
||||
|
||||
it('refuses to derive a placeholder without an AUTH_SECRET', async () => {
|
||||
const previousAuthSecret = process.env.AUTH_SECRET
|
||||
process.env.AUTH_SECRET = ''
|
||||
try {
|
||||
vi.resetModules()
|
||||
@@ -721,7 +722,12 @@ describe('sandbox secret specs', () => {
|
||||
)
|
||||
expect(() => placeholderForEmptySecret(VM_NAME, SECRET_NAME)).toThrow('AUTH_SECRET')
|
||||
} finally {
|
||||
delete process.env.AUTH_SECRET
|
||||
if (previousAuthSecret === undefined) {
|
||||
delete process.env.AUTH_SECRET
|
||||
} else {
|
||||
process.env.AUTH_SECRET = previousAuthSecret
|
||||
}
|
||||
vi.resetModules()
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user