fix(cli): e2e backend PR adjustments

This commit is contained in:
Ivan Shmidt
2020-07-27 14:38:07 +02:00
parent 411b4af8bc
commit e5ed8f95d1
4 changed files with 10 additions and 10 deletions
+4 -2
View File
@@ -318,7 +318,7 @@ async function testBackendStart(appDir, isPostgres) {
await waitFor(() => stdout.includes('Listening on ') || stderr !== '');
if (stderr !== '') {
// Skipping the whole block
throw new Error();
throw new Error(stderr);
}
print('Try to fetch entities from the backend');
@@ -328,6 +328,8 @@ async function testBackendStart(appDir, isPostgres) {
);
print('Entities fetched successfully');
successful = true;
} catch (error) {
throw new Error(`Backend failed to startup: ${error}`);
} finally {
print('Stopping the child process');
// Kill entire process group, otherwise we'll end up with hanging serve processes
@@ -338,7 +340,7 @@ async function testBackendStart(appDir, isPostgres) {
await waitForExit(child);
} catch (error) {
if (!successful) {
throw error;
throw new Error(`Backend failed to startup: ${stderr}`);
}
print('Backend startup test finished successfully');
}
@@ -29,8 +29,6 @@ AUTH_GOOGLE_CLIENT_ID=x AUTH_GOOGLE_CLIENT_SECRET=x \
AUTH_GITHUB_CLIENT_ID=x AUTH_GITHUB_CLIENT_SECRET=x \
AUTH_OAUTH2_CLIENT_ID=x AUTH_OAUTH2_CLIENT_SECRET=x \
AUTH_OAUTH2_AUTH_URL=x AUTH_OAUTH2_TOKEN_URL=x \
ROLLBAR_ACCOUNT_TOKEN=x \
SENTRY_TOKEN=x \
LOG_LEVEL=debug \
yarn start
```