- Add E2ESchemaDatabaseConfig interface for database configuration validation. - Implement assertE2ESchemaDatabaseConfig function to enforce schema requirements. - Create prepareE2ESchema function to handle schema preparation and initialization. - Develop E2E lifecycle management functions to provision, prepare, and run tests. - Introduce Docker Compose setup for E2E database environment. - Add Playwright configuration for E2E testing. - Implement various test cases to validate E2E schema preparation and lifecycle. - Create utility functions for environment variable management and database assertions. - Establish smoke tests to verify initial data setup and integrity.
18 lines
611 B
TypeScript
18 lines
611 B
TypeScript
import type { E2ESchemaDatabaseConfig } from "../../../apps/server/src/testing/e2e/e2e-schema-database-config";
|
|
|
|
import type { E2EDatabaseEnvironment } from "./e2e-database-environment";
|
|
|
|
/** Adapta el recurso ya creado por P2 al contrato backend-owned de preparación. */
|
|
export function toE2ESchemaDatabaseConfig(
|
|
environment: E2EDatabaseEnvironment
|
|
): E2ESchemaDatabaseConfig {
|
|
return {
|
|
executionId: environment.executionId,
|
|
host: environment.host,
|
|
port: environment.port,
|
|
database: environment.databaseName,
|
|
username: environment.username,
|
|
password: environment.password,
|
|
};
|
|
}
|