chore: prepare GoodBuddy 0.8.2
Cross-platform packages / Validate source (push) Waiting to run
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, macos, macos-15-intel) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / Publish GitHub Release (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
Cross-platform packages / Validate source (push) Waiting to run
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, macos, macos-15) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, linux, ubuntu-24.04) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, macos, macos-15-intel) (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (x64, windows, windows-2025) (push) Blocked by required conditions
Cross-platform packages / Publish GitHub Release (push) Blocked by required conditions
Cross-platform packages / ${{ matrix.platform }} ${{ matrix.arch }} (arm64, linux, ubuntu-24.04-arm) (push) Blocked by required conditions
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { buildRuntimeEnvironment } from './process-environment'
|
||||
import {
|
||||
buildExplicitProfileRuntimeEnvironment,
|
||||
buildRuntimeEnvironment
|
||||
} from './process-environment'
|
||||
|
||||
describe('buildRuntimeEnvironment', () => {
|
||||
it('keeps required runtime values and excludes unrelated parent secrets', () => {
|
||||
@@ -24,4 +27,73 @@ describe('buildRuntimeEnvironment', () => {
|
||||
GOODBUDDY_RUNTIME_TOKEN: 'scoped-token'
|
||||
})
|
||||
})
|
||||
|
||||
it('propagates insecure TLS only when compatibility mode is enabled', () => {
|
||||
const source = {
|
||||
PATH: '/tools',
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: '1'
|
||||
}
|
||||
|
||||
expect(buildRuntimeEnvironment({}, source, true)).toEqual({
|
||||
PATH: '/tools',
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: '0'
|
||||
})
|
||||
expect(buildRuntimeEnvironment({}, source, false)).toEqual({
|
||||
PATH: '/tools'
|
||||
})
|
||||
expect(
|
||||
buildRuntimeEnvironment(
|
||||
{ NODE_TLS_REJECT_UNAUTHORIZED: '1' },
|
||||
source,
|
||||
true
|
||||
)
|
||||
).toEqual({
|
||||
PATH: '/tools',
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: '0'
|
||||
})
|
||||
})
|
||||
|
||||
it('isolates an explicit profile from inherited provider and cloud credentials', () => {
|
||||
const source = {
|
||||
PATH: '/tools',
|
||||
ANTHROPIC_API_KEY: 'inherited-anthropic',
|
||||
OPENAI_API_KEY: 'inherited-openai',
|
||||
GOOGLE_GENERATIVE_AI_API_KEY: 'inherited-google',
|
||||
GEMINI_API_KEY: 'inherited-gemini',
|
||||
GROQ_API_KEY: 'inherited-groq',
|
||||
AZURE_OPENAI_API_KEY: 'inherited-azure',
|
||||
AWS_ACCESS_KEY_ID: 'inherited-aws-access',
|
||||
AWS_SECRET_ACCESS_KEY: 'inherited-aws-secret',
|
||||
AWS_SESSION_TOKEN: 'inherited-aws-session',
|
||||
AWS_REGION: 'inherited-aws-region',
|
||||
AWS_PROFILE: 'inherited-aws-profile',
|
||||
OPENROUTER_API_KEY: 'inherited-openrouter',
|
||||
XAI_API_KEY: 'inherited-xai',
|
||||
MISTRAL_API_KEY: 'inherited-mistral',
|
||||
COHERE_API_KEY: 'inherited-cohere'
|
||||
}
|
||||
|
||||
expect(
|
||||
buildExplicitProfileRuntimeEnvironment(
|
||||
{ GOODBUDDY_RUNTIME_TOKEN: 'scoped-token' },
|
||||
{ name: 'OPENAI_API_KEY', value: 'selected-key' },
|
||||
source,
|
||||
false
|
||||
)
|
||||
).toEqual({
|
||||
PATH: '/tools',
|
||||
GOODBUDDY_RUNTIME_TOKEN: 'scoped-token',
|
||||
OPENAI_API_KEY: 'selected-key'
|
||||
})
|
||||
expect(
|
||||
buildExplicitProfileRuntimeEnvironment(
|
||||
{},
|
||||
undefined,
|
||||
source,
|
||||
false
|
||||
)
|
||||
).toEqual({
|
||||
PATH: '/tools'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user