From 67d1147d81809ca21bf9f5602c11233b0158c2f1 Mon Sep 17 00:00:00 2001 From: Toni Rico Date: Wed, 19 Jul 2023 07:52:02 -0700 Subject: [PATCH] Remove integration test flavor (#1143) ### Description After we joined all modules into one, we can remove the integration test flavor. This will simplify things --- .circleci/config.yml | 10 ++--- .run/Debug tests.run.xml | 2 +- ...ml => Purchases Integration Tests.run.xml} | 2 +- .run/Release tests.run.xml | 2 +- base-application.gradle | 4 -- fastlane/Fastfile | 16 ++++---- gradle.properties | 2 +- library.gradle | 23 ++++++----- purchases/build.gradle | 35 ++++++++--------- purchases/src/androidTest/AndroidManifest.xml | 13 +++++++ .../purchases/BasePurchasesIntegrationTest.kt | 0 .../com/revenuecat/purchases/Constants.kt | 0 .../com/revenuecat/purchases/MainActivity.kt | 4 +- .../purchases/PurchasesIntegrationTest.kt | 0 .../factories/StoreProductFactory.kt | 0 .../factories/StoreTransactionFactory.kt | 0 .../helpers/BillingAbstractMockHelper.kt | 0 .../BaseOfflineEntitlementsIntegrationTest.kt | 0 ...EntitlementsFreshInstallIntegrationTest.kt | 0 ...InitialRequestsCompletedIntegrationTest.kt | 0 .../purchases/purchasesExtensions.kt | 1 + ...lementsInformationalModeIntegrationTest.kt | 0 .../src/integrationTest/AndroidManifest.xml | 17 --------- .../purchases/common/DispatcherConstants.kt | 9 ----- .../res/mipmap-hdpi/ic_launcher.png | Bin 3593 -> 0 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 5339 -> 0 bytes .../res/mipmap-mdpi/ic_launcher.png | Bin 2636 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 3388 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher.png | Bin 4926 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 7472 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher.png | Bin 7909 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 11873 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher.png | Bin 10652 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 16570 -> 0 bytes .../src/integrationTest/res/values/colors.xml | 10 ----- .../integrationTest/res/values/strings.xml | 3 -- .../revenuecat/purchases/PurchasesFactory.kt | 9 ++--- .../revenuecat/purchases/common/Dispatcher.kt | 9 ++++- .../purchases/common/DispatcherConstants.kt | 1 - .../BaseBackendIntegrationTest.kt | 4 +- .../purchases/common/DispatcherTest.kt | 36 ++++++++++++++++++ 41 files changed, 108 insertions(+), 104 deletions(-) rename .run/{Purchases Integration Tests (set purchases module variant before executing).run.xml => Purchases Integration Tests.run.xml} (94%) create mode 100644 purchases/src/androidTest/AndroidManifest.xml rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/BasePurchasesIntegrationTest.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/Constants.kt (100%) rename purchases/src/{integrationTest => androidTest}/kotlin/com/revenuecat/purchases/MainActivity.kt (72%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/PurchasesIntegrationTest.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/factories/StoreProductFactory.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/factories/StoreTransactionFactory.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/helpers/BillingAbstractMockHelper.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/offlineentitlements/BaseOfflineEntitlementsIntegrationTest.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/offlineentitlements/OfflineEntitlementsFreshInstallIntegrationTest.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/offlineentitlements/OfflineEntitlementsWithInitialRequestsCompletedIntegrationTest.kt (100%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/purchasesExtensions.kt (96%) rename purchases/src/{androidTestIntegrationTest => androidTest}/kotlin/com/revenuecat/purchases/trustedentitlements/TrustedEntitlementsInformationalModeIntegrationTest.kt (100%) delete mode 100644 purchases/src/integrationTest/AndroidManifest.xml delete mode 100644 purchases/src/integrationTest/kotlin/com/revenuecat/purchases/common/DispatcherConstants.kt delete mode 100644 purchases/src/integrationTest/res/mipmap-hdpi/ic_launcher.png delete mode 100644 purchases/src/integrationTest/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 purchases/src/integrationTest/res/mipmap-mdpi/ic_launcher.png delete mode 100644 purchases/src/integrationTest/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 purchases/src/integrationTest/res/mipmap-xxxhdpi/ic_launcher_round.png delete mode 100644 purchases/src/integrationTest/res/values/colors.xml delete mode 100644 purchases/src/integrationTest/res/values/strings.xml rename purchases/src/{defaults => main}/kotlin/com/revenuecat/purchases/common/DispatcherConstants.kt (70%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15205bf6e..20dca0e91 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -151,9 +151,7 @@ jobs: - android/restore-build-cache - run: name: Run Tests - # We are running tests in the "defaults" flavor only. If we ever add/remove flavors, we will need to update - # this command. - command: ./gradlew lint testDefaultsDebugUnitTest testDefaultsReleaseUnitTest + command: ./gradlew lint test - run: name: Consolidate artifacts command: | @@ -161,12 +159,12 @@ jobs: find . -type f -regex ".*/build/test-results/.*xml" -exec cp --parents {} build/test-results/ \; - run: name: Kover HTML - command: ./gradlew purchases:koverHtmlReportDefaultsRelease + command: ./gradlew purchases:koverHtmlReportRelease - run: name: Kover XML - command: ./gradlew purchases:koverXmlReportDefaultsRelease + command: ./gradlew purchases:koverXmlReportRelease - codecov/upload: - file: purchases/build/reports/kover/reportDefaultsRelease.xml + file: purchases/build/reports/kover/reportRelease.xml - android/save-build-cache - store_artifacts: path: build/reports diff --git a/.run/Debug tests.run.xml b/.run/Debug tests.run.xml index 75065f4f4..1b2d8596b 100644 --- a/.run/Debug tests.run.xml +++ b/.run/Debug tests.run.xml @@ -10,7 +10,7 @@