ConusAI vendor v0.1.0-dev.20261027+9b1131fb
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import { defineConfig } from '@playwright/test'
|
||||
|
||||
// The app runs against @conusai-kit/testing's fake platform. The optional
|
||||
// module variables are withheld, so the dashboard shows every enable card (plan D13).
|
||||
const platform = 'http://127.0.0.1:4010'
|
||||
const fakePlatformCommand = process.env.CONUSAI_FAKE_PLATFORM_COMMAND
|
||||
if (!fakePlatformCommand) {
|
||||
throw new Error('CONUSAI_FAKE_PLATFORM_COMMAND must run @conusai-kit/testing/fake-platform')
|
||||
}
|
||||
// The variables of the optional modules, withheld from the app under test.
|
||||
const optional = new Set([
|
||||
'NATS_URL',
|
||||
'NATS_TOKEN',
|
||||
'QDRANT_URL',
|
||||
'QDRANT_API_KEY',
|
||||
'REDIS_URL',
|
||||
'GIT_URL',
|
||||
'AWS_ENDPOINT_URL',
|
||||
'AWS_ACCESS_KEY_ID',
|
||||
'AWS_SECRET_ACCESS_KEY',
|
||||
])
|
||||
const base = Object.fromEntries(
|
||||
Object.entries(process.env).filter((entry): entry is [string, string] => entry[1] !== undefined && !optional.has(entry[0])),
|
||||
)
|
||||
|
||||
export default defineConfig({
|
||||
testDir: 'e2e',
|
||||
workers: 1,
|
||||
reporter: [['list']],
|
||||
use: { baseURL: 'http://localhost:3000' },
|
||||
webServer: [
|
||||
{
|
||||
command: fakePlatformCommand,
|
||||
url: `${platform}/__e2e/health`,
|
||||
reuseExistingServer: false,
|
||||
},
|
||||
{
|
||||
command: 'npm run start',
|
||||
url: 'http://localhost:3000/api/health',
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
env: {
|
||||
...base,
|
||||
CONUSAI_API_URL: `${platform}/api`,
|
||||
CONUSAI_API_TOKEN: 'e2e-deployment-token',
|
||||
CONUSAI_PROJECT_ID: 'e2e',
|
||||
CONUSAI_DSN: "http://e2e@127.0.0.1:4010/1",
|
||||
CONUSAI_RELEASE: 'e2e',
|
||||
USAGE_ORG_SLUG: 'e2e',
|
||||
// Mirrors env_resolver.rs's OTEL_* derivation from CONUSAI_API_URL/CONUSAI_API_TOKEN
|
||||
// (showcase D23): without these, register() never calls initOtlp() and the otlp e2e
|
||||
// spec would pass for the wrong reason (nothing ever attempted, rather than delivered).
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT: `${platform}/api/otel`,
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf',
|
||||
OTEL_EXPORTER_OTLP_HEADERS: 'Authorization=Bearer e2e-deployment-token',
|
||||
OTEL_SERVICE_NAME: 'showcase-e2e',
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user