-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Feature: Build stops when mapping file upload fails | ||
|
||
Scenario: Upload successfully with API key, mapping file, and correct endpoint | ||
When I build "default_app" using the "standard" bugsnag config | ||
Then I should receive 2 requests | ||
And the exit code equals 0 | ||
|
||
Scenario: No uploads or build failures when obfuscation is disabled | ||
When I build "disabled_obfuscation" using the "standard" bugsnag config | ||
Then I should receive 0 requests | ||
And the exit code equals 0 | ||
|
||
Scenario: Upload failure due to empty API key | ||
When I build the failing "default_app" using the "empty_api_key" bugsnag config | ||
Then I should receive 1 request | ||
And the request 0 is valid for the Build API | ||
And the exit code equals 1 | ||
|
||
Scenario: Upload failure due to connectivity failure | ||
When I build the failing "default_app" using the "wrong_endpoint" bugsnag config | ||
Then I should receive 0 requests | ||
And the exit code equals 1 | ||
|
||
Scenario: Upload failure due to missing mapping file | ||
When I build the failing "missing_mapping_file" using the "standard" bugsnag config | ||
Then I should receive 1 request | ||
And the request 0 is valid for the Build API | ||
And the exit code equals 1 |
20 changes: 20 additions & 0 deletions
20
features/fixtures/app/module/config/android/disabled_obfuscation.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion Integer.parseInt(project.ANDROID_COMPILE_SDK_VERSION) | ||
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION | ||
|
||
defaultConfig { | ||
applicationId 'com.bugsnag.android.example' | ||
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK_VERSION) | ||
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION) | ||
versionCode Integer.parseInt(project.SAMPLE_VERSION_CODE) | ||
versionName project.SAMPLE_VERSION_NAME | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
features/fixtures/app/module/config/android/missing_mapping_file.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apply plugin: 'com.android.application' | ||
apply from: 'config/android/common.gradle' | ||
|
||
task deleteMappingFile { | ||
doLast { | ||
File mappingFile = new File("module/build/outputs/mapping/release/mapping.txt") | ||
mappingFile.delete() | ||
project.logger.lifecycle("Delete mapping file!") | ||
} | ||
} | ||
|
||
// delete the mapping file after generation, but before bugsnag can upload it | ||
project.afterEvaluate { | ||
project.android.applicationVariants.all { variant -> | ||
variant.outputs.each { output -> | ||
output.assemble.finalizedBy(deleteMappingFile) | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
features/fixtures/app/module/config/bugsnag/empty_api_key.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project.afterEvaluate { | ||
project.bugsnag.apiKey = "" | ||
project.bugsnag.endpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.releasesEndpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
} |
4 changes: 4 additions & 0 deletions
4
features/fixtures/app/module/config/bugsnag/wrong_endpoint.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project.afterEvaluate { | ||
project.bugsnag.endpoint = "http://localhost:12345" | ||
project.bugsnag.releasesEndpoint = "http://localhost:12345" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
group = com.bugsnag | ||
version = 4.0.0 | ||
version = 4.1.0 | ||
|
||
ANDROID_MIN_SDK_VERSION=14 | ||
ANDROID_TARGET_SDK_VERSION=27 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters