Skip to content

Commit

Permalink
Integration tests: Identity v3 test cases (#506)
Browse files Browse the repository at this point in the history
* added extra test case for storekit tests

* added more test cases

* added a few more test cases

* slight cleanup

* added another, particularly gnarly test case

* updated test case name

* added another test case

* one more test case

* refactors and cleanups, made chained calls more reliable for one test case

* fixed name, added debug information to appUserIDs

* fixed issue with test clearing transactions when it shouldn't

* formatting

* code cleanup

* update call to replace api key and proxy url to catch issues if proxy url is empty

* updated syntax since lanes are executed in a block

* updated xcode and simulator versions for storekitTests

* updated syntax for setting log levels

* fixed fastlane changes that broke replace_in for storekit_tests

* update fastlane

* improvements from PR comments

* restricted storekit_tests to release tags and branches

* removed signing for storekittest app since it only runs in simulator

* removed storekitTestCertificate.cer since it's not needed, re-added tests just in case

* restricted storekit_tests to release branches and tags again now that they passed
  • Loading branch information
aboedo authored Jul 13, 2021
1 parent 956da62 commit df3d21b
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 54 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,22 @@ jobs:

storekit_tests:
macos:
xcode: "12.5.0"
xcode: "12.5.1"
working_directory: ~/purchases-ios
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run:
name: Open simulator
command: xcrun instruments -w "iPhone 11 Pro (14.2) [" || true
command: xcrun instruments -w "iPhone 11 Pro (14.5) [" || true

- install-gems

- run:
name: Run StoreKit Tests
command: bundle exec fastlane storekit_tests
environment:
SCAN_DEVICE: iPhone 11 Pro (14.2)
SCAN_DEVICE: iPhone 11 Pro (14.5)
- store_test_results:
path: fastlane/test_output
- store_artifacts:
Expand Down
66 changes: 35 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.1.1)
aws-partitions (1.465.0)
aws-sdk-core (3.114.1)
aws-partitions (1.477.0)
aws-sdk-core (3.117.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.43.0)
aws-sdk-kms (1.44.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.95.1)
aws-sdk-s3 (1.96.1)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.3)
aws-sigv4 (1.2.4)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
Expand Down Expand Up @@ -84,13 +84,15 @@ GEM
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
excon (0.82.0)
faraday (1.4.2)
excon (0.84.0)
faraday (1.5.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
Expand All @@ -99,12 +101,14 @@ GEM
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.2.4)
fastlane (2.184.1)
fastlane (2.187.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -147,37 +151,36 @@ GEM
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.5.0)
google-apis-core (~> 0.1)
google-apis-core (0.3.0)
google-apis-androidpublisher_v3 (0.8.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
httpclient (>= 2.8.1, < 3.0)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
retriable (>= 2.0, < 4.a)
rexml
signet (~> 0.14)
webrick
google-apis-iamcredentials_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-playcustomapp_v1 (0.3.0)
google-apis-core (~> 0.1)
google-apis-storage_v1 (0.4.0)
google-apis-core (~> 0.1)
google-apis-iamcredentials_v1 (0.6.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.5.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.6.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.1.0)
google-cloud-storage (1.31.1)
google-cloud-storage (1.34.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (0.16.2)
faraday (>= 0.17.3, < 2.0)
Expand All @@ -187,7 +190,7 @@ GEM
os (>= 0.9, < 2.0)
signet (~> 0.14)
highline (2.0.3)
http-cookie (1.0.3)
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.8.7)
Expand Down Expand Up @@ -221,7 +224,7 @@ GEM
os (1.1.1)
plist (3.6.0)
public_suffix (4.0.6)
rake (13.0.3)
rake (13.0.6)
redcarpet (3.5.1)
representable (3.1.1)
declarative (< 0.1.0)
Expand All @@ -232,7 +235,7 @@ GEM
rouge (2.0.7)
ruby-macho (1.4.0)
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
rubyzip (2.3.2)
sassc (2.4.0)
ffi (~> 1.9)
security (0.1.3)
Expand Down Expand Up @@ -267,12 +270,13 @@ GEM
word_wrap (1.0.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.19.0)
xcodeproj (1.20.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand All @@ -289,4 +293,4 @@ DEPENDENCIES
jazzy

BUNDLED WITH
2.2.14
2.2.19
2 changes: 1 addition & 1 deletion IntegrationTests/PurchaseTester/Configuration.storekit
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
],
"settings" : {

"_timeRate" : 6
},
"subscriptionGroups" : [
{
Expand Down
2 changes: 2 additions & 0 deletions Purchases.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"StoreKitTestApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = StoreKitTestApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
Expand Down Expand Up @@ -2108,6 +2109,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "\"StoreKitTestApp/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = StoreKitTestApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
skipped = "NO"
testExecutionOrdering = "random">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2DE20B6B264087FB004C597D"
Expand Down
Loading

0 comments on commit df3d21b

Please sign in to comment.