implement/init e2e tests (#135)

* init e2e

* updated/moved vitest, finished merge

* fix bun picking up e2e tests

* e2e: overwrite webserver config with env

* e2e: added adapter configs

* e2e: replaced image
This commit is contained in:
dswbx
2025-04-03 11:08:16 +02:00
committed by GitHub
parent 0b41aa5a2d
commit fa6c7acaf5
16 changed files with 365 additions and 78 deletions

23
app/e2e/inc/adapters.ts Normal file
View File

@@ -0,0 +1,23 @@
const adapter = process.env.TEST_ADAPTER;
const default_config = {
media_adapter: "local"
} as const;
const configs = {
cloudflare: {
media_adapter: "r2"
}
}
export function getAdapterConfig(): typeof default_config {
if (adapter) {
if (!configs[adapter]) {
throw new Error(`Adapter "${adapter}" not found. Available adapters: ${Object.keys(configs).join(", ")}`);
}
return configs[adapter] as typeof default_config;
}
return default_config;
}