Skip to content

Commit c686700

Browse files
authored
Skip maestro if SENTRY_AUTH_TOKEN is unavailable (#4269)
1 parent fd54b38 commit c686700

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

dev-packages/e2e-tests/cli.mjs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,19 @@ if (actions.includes('test')) {
231231
execFileSync('adb', ['install', '-r', '-d', testApp]);
232232
}
233233

234-
execSync(
235-
`maestro test maestro \
236-
--env=APP_ID="${appId}" \
237-
--env=SENTRY_AUTH_TOKEN="${sentryAuthToken}" \
238-
--debug-output maestro-logs \
239-
--flatten-debug-output`,
240-
{
241-
stdio: 'inherit',
242-
cwd: e2eDir,
243-
},
244-
);
234+
if (sentryAuthToken === undefined) {
235+
console.log('Skipping maestro test due to unavailable SENTRY_AUTH_TOKEN');
236+
} else {
237+
execSync(
238+
`maestro test maestro \
239+
--env=APP_ID="${appId}" \
240+
--env=SENTRY_AUTH_TOKEN="${sentryAuthToken}" \
241+
--debug-output maestro-logs \
242+
--flatten-debug-output`,
243+
{
244+
stdio: 'inherit',
245+
cwd: e2eDir,
246+
},
247+
);
248+
}
245249
}

0 commit comments

Comments
 (0)