-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from bugsnag/add-config-scenario
Add scenario for plugin extension overrides
- Loading branch information
Showing
7 changed files
with
92 additions
and
4 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,31 @@ | ||
Feature: Extension properties control plugin behaviour | ||
|
||
Scenario: Disable autoReportBuilds | ||
When I build "default_app" using the "auto_report_builds_disabled" bugsnag config | ||
Then I should receive 1 request | ||
And the request 0 is valid for the Android Mapping API | ||
|
||
Scenario: Enable debug mapping upload | ||
When I build "debug_proguard" using the "upload_debug_enabled" bugsnag config | ||
Then I should receive 4 requests | ||
And the request 0 is valid for the Build API | ||
And the request 1 is valid for the Build API | ||
And the request 2 is valid for the Android Mapping API | ||
And the request 3 is valid for the Android Mapping API | ||
|
||
Scenario: Enable overwrite | ||
When I build "default_app" using the "overwrite_enabled" bugsnag config | ||
Then I should receive 1 request | ||
And the request 0 is valid for the Android Mapping API | ||
And the field "overwrite" for multipart request 0 equals "true" | ||
|
||
Scenario: Alter build API values | ||
When I build "default_app" using the "custom_build_info" bugsnag config | ||
Then I should receive 1 request | ||
And the payload field "builderName" equals "Mark Twain" for request 0 | ||
And the payload field "buildTool" equals "gradle-android" for request 0 | ||
And the payload field "sourceControl.provider" equals "bitbucket" for request 0 | ||
And the payload field "sourceControl.repository" equals "https://example.com/bar/foo.git" for request 0 | ||
And the payload field "sourceControl.revision" equals "fab8721" for request 0 | ||
And the payload field "metadata.MyKey" equals "MyValue" | ||
And the payload field "metadata.os_version" equals "BeOS" |
24 changes: 24 additions & 0 deletions
24
features/fixtures/app/module/config/android/debug_proguard.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,24 @@ | ||
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 { | ||
debug { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
release { | ||
minifyEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
features/fixtures/app/module/config/bugsnag/auto_report_builds_disabled.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.endpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.releasesEndpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.autoReportBuilds = false | ||
} |
16 changes: 16 additions & 0 deletions
16
features/fixtures/app/module/config/bugsnag/custom_build_info.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,16 @@ | ||
project.afterEvaluate { | ||
project.bugsnag.endpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.releasesEndpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.autoUpload = false | ||
|
||
project.bugsnag.builderName = "Mark Twain" | ||
project.bugsnag.sourceControl.provider = "bitbucket" | ||
project.bugsnag.sourceControl.repository = "https://example.com/bar/foo.git" | ||
project.bugsnag.sourceControl.revision = "fab8721" | ||
|
||
def map = new HashMap() | ||
map.put("MyKey", "MyValue") | ||
map.put("os_version", "BeOS") | ||
project.bugsnag.metadata = map | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
features/fixtures/app/module/config/bugsnag/overwrite_enabled.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,6 @@ | ||
project.afterEvaluate { | ||
project.bugsnag.endpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.releasesEndpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.autoReportBuilds = false | ||
project.bugsnag.overwrite = true | ||
} |
5 changes: 5 additions & 0 deletions
5
features/fixtures/app/module/config/bugsnag/upload_debug_enabled.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.endpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.releasesEndpoint = "http://localhost:${System.env.MOCK_API_PORT}" | ||
project.bugsnag.uploadDebugBuildMappings = true | ||
} |