e2e test: Fix e2e invalid configuration
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -7,3 +7,4 @@ Removed the database choice from the `create-app` command.
|
||||
This reduces the step from development to production by always installing the dependencies and templating the production configuration in `app-config.production.yaml`.
|
||||
|
||||
Added `app-config.local.yaml` to allow for local configuration overrides.
|
||||
To replicate this behavior in an existing installation simply `touch app-config.local.yaml` in the project root and apply your local configuration.
|
||||
|
||||
@@ -80,5 +80,5 @@ jobs:
|
||||
BACKSTAGE_TEST_DISABLE_DOCKER: 1
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_HOST: localhost
|
||||
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||
|
||||
@@ -62,10 +62,10 @@ export async function run() {
|
||||
print('Starting the app');
|
||||
await testAppServe(pluginName, appDir);
|
||||
|
||||
const appConfig = path.resolve(appDir, 'app-config.yaml');
|
||||
if (Boolean(process.env.POSTGRES_USER)) {
|
||||
print('Testing the PostgreSQL backend startup');
|
||||
await preCleanPostgres();
|
||||
const appConfig = path.resolve(appDir, 'app-config.yaml');
|
||||
const productionConfig = path.resolve(appDir, 'app-config.production.yaml');
|
||||
await testBackendStart(
|
||||
appDir,
|
||||
@@ -76,7 +76,7 @@ export async function run() {
|
||||
);
|
||||
}
|
||||
print('Testing the SQLite backend startup');
|
||||
await testBackendStart(appDir, '--config', appConfig);
|
||||
await testBackendStart(appDir);
|
||||
|
||||
if (process.env.CI) {
|
||||
// Cleanup actually takes significant time, so skip it in CI since the
|
||||
@@ -408,7 +408,7 @@ async function dropDB(database: string) {
|
||||
};
|
||||
|
||||
try {
|
||||
await pgtools.dropdb({ config }, database);
|
||||
await pgtools.dropdb(config, database);
|
||||
} catch (_) {
|
||||
/* do nothing*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user