Skip to content

Commit

Permalink
Analysis: skip sending test event if token not configured (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot-team committed Jan 17, 2023
1 parent 23fac56 commit ff2cbb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generator/test/analysis_test.dart
Expand Up @@ -31,7 +31,10 @@ void main() {
// Create a token file just for this test (delete right after to avoid
// CI sending events).
final token = Platform.environment["DART_ANALYSIS_TOKEN"];
if (token == null) fail("DART_ANALYSIS_TOKEN not set");
if (token == null) {
markTestSkipped("DART_ANALYSIS_TOKEN not set");
return;
}
var obfuscatedToken = await obfuscateToken(token);
final tokenFile = File("lib/${ObjectBoxAnalysis.tokenFilePath}");
await tokenFile.writeAsString(
Expand Down

0 comments on commit ff2cbb0

Please sign in to comment.