diff --git a/.circleci/config.yml b/.circleci/config.yml index 5641278c14..05946c6868 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,28 +3,28 @@ version: 2.1 parameters: xcode_version: type: string - default: "12.1.0" + default: "12.4.0" ios_current_version: type: string - default: "14.1" + default: "14.4" ios_previous_version: type: string - default: "13.5" + default: "13.7" ios_sdk: type: string - default: "iphonesimulator14.1" + default: "iphonesimulator14.4" macos_version: # The user-facing version string for macOS builds type: string default: "10.15" macos_sdk: # The full SDK string to use for macOS builds type: string - default: "macosx10.15" + default: "macosx11.1" tvos_version: # The user-facing version string of tvOS builds type: string - default: "14.0" + default: "14.3" tvos_sdk: type: string - default: "appletvsimulator14.0" + default: "appletvsimulator14.3" commands: common_test_steps: @@ -63,7 +63,7 @@ commands: command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty name: Clean and build for testing - run: - command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty + command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcpretty name: Run tests - save-xcodebuild-artifacts - save_cache: @@ -100,6 +100,7 @@ jobs: environment: DESTINATION: platform=macOS,arch=x86_64 CIRCLE_XCODE_SCHEME: Apollo + CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >> steps: - common_test_steps @@ -110,6 +111,7 @@ jobs: environment: DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11 CIRCLE_XCODE_SCHEME: Apollo + CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> steps: - common_test_steps @@ -120,6 +122,7 @@ jobs: environment: DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11 CIRCLE_XCODE_SCHEME: Apollo + CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> steps: - common_test_steps @@ -130,76 +133,18 @@ jobs: environment: DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV CIRCLE_XCODE_SCHEME: Apollo + CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >> steps: - common_test_steps - SQLitemacOS_current: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=macOS,arch=x86_64 - CIRCLE_XCODE_SCHEME: ApolloSQLite - CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >> - steps: - - common_test_steps - - SQLiteiOS_current: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11 - CIRCLE_XCODE_SCHEME: ApolloSQLite - CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> - steps: - - common_test_steps - - SQLiteiOS_previous: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11 - CIRCLE_XCODE_SCHEME: ApolloSQLite - CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> - steps: - - common_test_steps - - WebSocketmacOS_current: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=macOS,arch=x86_64 - CIRCLE_XCODE_SCHEME: ApolloWebSocket - CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >> - steps: - - common_test_steps - - WebSocketiOS_current: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11 - CIRCLE_XCODE_SCHEME: ApolloWebSocket - CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> - steps: - - common_test_steps - - WebSocketiOS_previous: - macos: - xcode: << pipeline.parameters.xcode_version >> - environment: - DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11 - CIRCLE_XCODE_SCHEME: ApolloWebSocket - CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >> - steps: - - common_test_steps - CodegenLibmacOS_current: macos: xcode: << pipeline.parameters.xcode_version >> environment: DESTINATION: platform=macOS,arch=x86_64 CIRCLE_XCODE_SCHEME: ApolloCodegenLib + CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >> steps: - common_test_steps @@ -228,18 +173,6 @@ workflows: name: Apollo iOS << pipeline.parameters.ios_previous_version >> - tvOS_current: name: Apollo tvOS << pipeline.parameters.tvos_version >> - - SQLitemacOS_current: - name: ApolloSQLite macOS << pipeline.parameters.macos_version >> - - SQLiteiOS_current: - name: ApolloSQLite iOS << pipeline.parameters.ios_current_version >> - - SQLiteiOS_previous: - name: ApolloSQLite iOS << pipeline.parameters.ios_previous_version >> - - WebSocketmacOS_current: - name: ApolloWebSocket macOS << pipeline.parameters.macos_version >> - - WebSocketiOS_current: - name: ApolloWebSocket iOS << pipeline.parameters.ios_current_version >> - - WebSocketiOS_previous: - name: ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >> - CodegenLibmacOS_current: name: Swift Code Generation - CocoaPodsTrunk: @@ -249,12 +182,6 @@ workflows: - Apollo iOS << pipeline.parameters.ios_current_version >> - Apollo iOS << pipeline.parameters.ios_previous_version >> - Apollo tvOS << pipeline.parameters.tvos_version >> - - ApolloSQLite macOS << pipeline.parameters.macos_version >> - - ApolloSQLite iOS << pipeline.parameters.ios_current_version >> - - ApolloSQLite iOS << pipeline.parameters.ios_previous_version >> - - ApolloWebSocket macOS << pipeline.parameters.macos_version >> - - ApolloWebSocket iOS << pipeline.parameters.ios_current_version >> - - ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >> - Swift Code Generation filters: # Only build semver tags diff --git a/.gitignore b/.gitignore index 95633047d4..179dc58058 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ scripts/apollo.tar.gz SwiftScripts/ApolloCLI Tests/ApolloCodegenTests/scripts Tests/ApolloCodegenTests/scripts directory +SwiftScripts/.build-** diff --git a/Apollo.xcodeproj/project.pbxproj b/Apollo.xcodeproj/project.pbxproj index 22adc34a43..9c941e9e92 100644 --- a/Apollo.xcodeproj/project.pbxproj +++ b/Apollo.xcodeproj/project.pbxproj @@ -15,11 +15,7 @@ 9B0E471C240B167C0093BDA7 /* String+Apollo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0E471B240B167C0093BDA7 /* String+Apollo.swift */; }; 9B0E471E240B239D0093BDA7 /* ASTEnumValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B0E471D240B239D0093BDA7 /* ASTEnumValue.swift */; }; 9B1CCDD92360F02C007C9032 /* Bundle+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B1CCDD82360F02C007C9032 /* Bundle+Helpers.swift */; }; - 9B20611A2591B3550020D1E0 /* c.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061172591B3550020D1E0 /* c.txt */; }; - 9B20611B2591B3550020D1E0 /* b.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061182591B3550020D1E0 /* b.txt */; }; - 9B20611C2591B3550020D1E0 /* a.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061192591B3550020D1E0 /* a.txt */; }; 9B21FD752422C29D00998B5C /* GraphQLFileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B21FD742422C29D00998B5C /* GraphQLFileTests.swift */; }; - 9B21FD772422C8CC00998B5C /* TestFileHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B21FD762422C8CC00998B5C /* TestFileHelper.swift */; }; 9B21FD782424305700998B5C /* ExpectedEnumWithDifferentCases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B68F05F2416F80C00E97318 /* ExpectedEnumWithDifferentCases.swift */; }; 9B21FD792424305E00998B5C /* ExpectedEnumWithSanitizedCases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B68F063241703B200E97318 /* ExpectedEnumWithSanitizedCases.swift */; }; 9B260BEB245A020300562176 /* ApolloInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B260BEA245A020300562176 /* ApolloInterceptor.swift */; }; @@ -64,8 +60,6 @@ 9B47518D2575AA850001FB87 /* Pluralizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B47516D2575AA690001FB87 /* Pluralizer.swift */; }; 9B4751AD2575B5070001FB87 /* PluralizerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4751AC2575B5070001FB87 /* PluralizerTests.swift */; }; 9B4F453F244A27B900C2CF7D /* URLSessionClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4F453E244A27B900C2CF7D /* URLSessionClient.swift */; }; - 9B4F4541244A2A9200C2CF7D /* HTTPBinAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4F4540244A2A9200C2CF7D /* HTTPBinAPI.swift */; }; - 9B4F4543244A2AD300C2CF7D /* URLSessionClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4F4542244A2AD300C2CF7D /* URLSessionClientTests.swift */; }; 9B518C87235F819E004C426D /* CLIDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B518C85235F8125004C426D /* CLIDownloader.swift */; }; 9B518C8C235F8B5F004C426D /* ApolloFilePathHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B518C8A235F8B05004C426D /* ApolloFilePathHelper.swift */; }; 9B518C8D235F8B9E004C426D /* CLIDownloaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B518C88235F8AD4004C426D /* CLIDownloaderTests.swift */; }; @@ -74,8 +68,6 @@ 9B5A1EFD24352AC100F066BB /* ExpectedReviewInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B68F06C241C646700E97318 /* ExpectedReviewInput.swift */; }; 9B5A1EFE24352AED00F066BB /* ExpectedColorInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B68F06A241C643000E97318 /* ExpectedColorInput.swift */; }; 9B5A1F002435356400F066BB /* ExpectedColorInputNoModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B5A1EFF2435356400F066BB /* ExpectedColorInputNoModifier.swift */; }; - 9B60204D23FDF4B700D0C8E0 /* ApolloSQLiteTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDAE223FDED8000ACD198 /* ApolloSQLiteTestSupport.framework */; }; - 9B60204F23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B60204E23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift */; }; 9B64F6762354D219002D1BB5 /* URL+QueryDict.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B64F6752354D219002D1BB5 /* URL+QueryDict.swift */; }; 9B6835342460B47900337AE6 /* ASTVariableType+TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6835322460B32A00337AE6 /* ASTVariableType+TestHelpers.swift */; }; 9B683538246310D400337AE6 /* ExpectedReviewInputNoModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B683537246310D400337AE6 /* ExpectedReviewInputNoModifier.swift */; }; @@ -99,11 +91,6 @@ 9B7B6F59233C287200F32205 /* ApolloCodegen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B6F57233C287100F32205 /* ApolloCodegen.swift */; }; 9B7B6F5A233C287200F32205 /* ApolloCodegenOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B6F58233C287100F32205 /* ApolloCodegenOptions.swift */; }; 9B7B6F69233C2C0C00F32205 /* FileManager+Apollo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7B6F68233C2C0C00F32205 /* FileManager+Apollo.swift */; }; - 9B7BDA8D23FDE92A00ACD198 /* MockWebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8723FDE92900ACD198 /* MockWebSocket.swift */; }; - 9B7BDA8E23FDE92A00ACD198 /* StarWarsSubscriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8823FDE92900ACD198 /* StarWarsSubscriptionTests.swift */; }; - 9B7BDA8F23FDE92A00ACD198 /* MockWebSocketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8923FDE92900ACD198 /* MockWebSocketTests.swift */; }; - 9B7BDA9023FDE92A00ACD198 /* SplitNetworkTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8A23FDE92900ACD198 /* SplitNetworkTransportTests.swift */; }; - 9B7BDA9223FDE92A00ACD198 /* StarWarsWebSocketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8C23FDE92900ACD198 /* StarWarsWebSocketTests.swift */; }; 9B7BDA9B23FDE94C00ACD198 /* WebSocketError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA9423FDE94C00ACD198 /* WebSocketError.swift */; }; 9B7BDA9C23FDE94C00ACD198 /* WebSocketTask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA9523FDE94C00ACD198 /* WebSocketTask.swift */; }; 9B7BDA9D23FDE94C00ACD198 /* SplitNetworkTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA9623FDE94C00ACD198 /* SplitNetworkTransport.swift */; }; @@ -113,19 +100,9 @@ 9B7BDAAC23FDEA7B00ACD198 /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 9B7BDAAB23FDEA7B00ACD198 /* Starscream */; }; 9B7BDAD023FDEBE300ACD198 /* SQLiteSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDACD23FDEBE300ACD198 /* SQLiteSerialization.swift */; }; 9B7BDAD223FDEBE300ACD198 /* SQLiteNormalizedCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDACF23FDEBE300ACD198 /* SQLiteNormalizedCache.swift */; }; - 9B7BDAD623FDEC9B00ACD198 /* CachePersistenceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDAD423FDEC9B00ACD198 /* CachePersistenceTests.swift */; }; - 9B7BDAEF23FDED9700ACD198 /* TestCacheProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDAEC23FDED9700ACD198 /* TestCacheProvider.swift */; }; - 9B7BDAF023FDED9700ACD198 /* ApolloSQLiteTestSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B7BDAED23FDED9700ACD198 /* ApolloSQLiteTestSupport.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9B7BDAF623FDEE2600ACD198 /* SQLite in Frameworks */ = {isa = PBXBuildFile; productRef = 9B7BDAF523FDEE2600ACD198 /* SQLite */; }; 9B7BDAFA23FDEE8A00ACD198 /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; }; 9B7BDAFD23FDEE9300ACD198 /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; }; - 9B7BDB0423FDF02200ACD198 /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; - 9B7BDB0523FDF02600ACD198 /* ApolloWebSocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */; }; - 9B7BDB0823FDF04400ACD198 /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; - 9B7BDB1423FDF09600ACD198 /* ApolloSQLiteTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDAE223FDED8000ACD198 /* ApolloSQLiteTestSupport.framework */; }; - 9B7BDB1523FDF09600ACD198 /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; - 9B7BDB1A23FDF12000ACD198 /* ApolloSQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */; }; - 9B7BDB1D23FDF22300ACD198 /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; 9B8C3FB3248DA2FE00707B13 /* URL+Apollo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B8C3FB1248DA2EA00707B13 /* URL+Apollo.swift */; }; 9B8C3FB5248DA3E000707B13 /* URLExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B8C3FB4248DA3E000707B13 /* URLExtensionsTests.swift */; }; 9B95EDC022CAA0B000702BB2 /* GETTransformerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B95EDBF22CAA0AF00702BB2 /* GETTransformerTests.swift */; }; @@ -133,12 +110,11 @@ 9B96500C24BE7239003C29C0 /* LegacyCacheReadInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B96500B24BE7239003C29C0 /* LegacyCacheReadInterceptor.swift */; }; 9B9BBAF324DB39D70021C30F /* UploadRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9BBAF224DB39D70021C30F /* UploadRequest.swift */; }; 9B9BBAF524DB4F890021C30F /* AutomaticPersistedQueryInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9BBAF424DB4F890021C30F /* AutomaticPersistedQueryInterceptor.swift */; }; - 9B9BBB1C24DB760B0021C30F /* UploadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9BBB1A24DB75E60021C30F /* UploadTests.swift */; }; + 9B9BBB1C24DB760B0021C30F /* UploadRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9BBB1A24DB75E60021C30F /* UploadRequestTests.swift */; }; 9B9F16A726013DAB00FB2F31 /* SQLiteDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9F16A626013DAB00FB2F31 /* SQLiteDatabase.swift */; }; 9B9F16B82601532500FB2F31 /* SQLiteDotSwiftDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B9F16B72601532500FB2F31 /* SQLiteDotSwiftDatabase.swift */; }; 9BA1244A22D8A8EA00BF1D24 /* JSONSerialization+Sorting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA1244922D8A8EA00BF1D24 /* JSONSerialization+Sorting.swift */; }; 9BA3130E2302BEA5007B7FC5 /* DispatchQueue+Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BA3130D2302BEA5007B7FC5 /* DispatchQueue+Optional.swift */; }; - 9BAD16B923FE362600007BEF /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; 9BAEEBEE2346644600808306 /* ApolloSchemaOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEBED2346644600808306 /* ApolloSchemaOptions.swift */; }; 9BAEEBEF2346644B00808306 /* ApolloSchemaDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEBEB234663F200808306 /* ApolloSchemaDownloader.swift */; }; 9BAEEBF123467E0A00808306 /* ApolloCLI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEBF023467E0A00808306 /* ApolloCLI.swift */; }; @@ -151,7 +127,6 @@ 9BAEEC15234C132600808306 /* CLIExtractorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEC14234C132600808306 /* CLIExtractorTests.swift */; }; 9BAEEC17234C275600808306 /* ApolloSchemaTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEC16234C275600808306 /* ApolloSchemaTests.swift */; }; 9BAEEC19234C297800808306 /* ApolloCodegenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAEEC18234C297800808306 /* ApolloCodegenTests.swift */; }; - 9BB4F5B22581AA50004F0BD6 /* CacheDependentInterceptorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BB4F5B12581AA50004F0BD6 /* CacheDependentInterceptorTests.swift */; }; 9BC139A424EDCA6C00876D29 /* InterceptorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC139A224EDCA4400876D29 /* InterceptorTests.swift */; }; 9BC139A624EDCAD900876D29 /* BlindRetryingTestInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC139A524EDCAD900876D29 /* BlindRetryingTestInterceptor.swift */; }; 9BC139A824EDCE4F00876D29 /* RetryToCountThenSucceedInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC139A724EDCE4F00876D29 /* RetryToCountThenSucceedInterceptor.swift */; }; @@ -199,7 +174,6 @@ 9F27D4641D40379500715680 /* JSONStandardTypeConversions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */; }; 9F295E311E27534800A24949 /* NormalizeQueryResults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F295E301E27534800A24949 /* NormalizeQueryResults.swift */; }; 9F295E381E277B2A00A24949 /* GraphQLResultNormalizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F295E371E277B2A00A24949 /* GraphQLResultNormalizer.swift */; }; - 9F39101725493DDC00AF54A6 /* FetchQueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC51EC0A9F7000017BE /* FetchQueryTests.swift */; }; 9F3910272549741400AF54A6 /* MockGraphQLServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3910262549741400AF54A6 /* MockGraphQLServer.swift */; }; 9F41CBF025A3490600C02CB7 /* schema.graphqls in Resources */ = {isa = PBXBuildFile; fileRef = 9F41CBEF25A3490600C02CB7 /* schema.graphqls */; }; 9F41CC0025A3491E00C02CB7 /* schema.json in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061622591B3860020D1E0 /* schema.json */; }; @@ -223,22 +197,14 @@ 9F68F9F125415827004F26D0 /* XCTestCase+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F68F9F025415827004F26D0 /* XCTestCase+Helpers.swift */; }; 9F69FFA91D42855900E000B1 /* NetworkTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F69FFA81D42855900E000B1 /* NetworkTransport.swift */; }; 9F7BA89922927A3700999B3B /* ResponsePath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F7BA89822927A3700999B3B /* ResponsePath.swift */; }; - 9F8622F81EC2004200C38162 /* ReadWriteFromStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8622F71EC2004200C38162 /* ReadWriteFromStoreTests.swift */; }; 9F8622FA1EC2117C00C38162 /* FragmentConstructionAndConversionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8622F91EC2117C00C38162 /* FragmentConstructionAndConversionTests.swift */; }; 9F86B68B1E6438D700B885FF /* GraphQLSelectionSetMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F86B68A1E6438D700B885FF /* GraphQLSelectionSetMapper.swift */; }; 9F86B6901E65533D00B885FF /* GraphQLResponseGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F86B68F1E65533D00B885FF /* GraphQLResponseGenerator.swift */; }; 9F8A958D1EC0FFAB00304A2D /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; - 9F8A95901EC0FFC100304A2D /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; 9F8E0BD325668552000D9FA5 /* DataLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FADC84E1E6B865E00C677E6 /* DataLoader.swift */; }; 9F8E0BE325668559000D9FA5 /* PossiblyDeferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F33D6A32566475600A1543F /* PossiblyDeferred.swift */; }; 9F8F334C229044A200C0E83B /* Decoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8F334B229044A200C0E83B /* Decoding.swift */; }; 9F91CF8F1F6C0DB2008DD0BE /* MutatingResultsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F91CF8E1F6C0DB2008DD0BE /* MutatingResultsTests.swift */; }; - 9FA6ABCD1EC0A9F7000017BE /* LoadQueryFromStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC61EC0A9F7000017BE /* LoadQueryFromStoreTests.swift */; }; - 9FA6ABCF1EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC81EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift */; }; - 9FA6ABD01EC0A9F7000017BE /* StarWarsServerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC91EC0A9F7000017BE /* StarWarsServerTests.swift */; }; - 9FA6ABD21EC0A9F7000017BE /* WatchQueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABCB1EC0A9F7000017BE /* WatchQueryTests.swift */; }; - 9FA6ABD51EC0AA49000017BE /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; - 9FA6ABD61EC0AA4D000017BE /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; }; 9FA6F3681E65DF4700BF8D73 /* GraphQLResultAccumulator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6F3671E65DF4700BF8D73 /* GraphQLResultAccumulator.swift */; }; 9FACA9BE1F42E67200AE2DBD /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; }; 9FBE0D4025407B64002ED0B1 /* AsyncResultObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FBE0D3F25407B64002ED0B1 /* AsyncResultObserver.swift */; }; @@ -258,7 +224,6 @@ 9FCDFD291E33D0CE007519DC /* GraphQLQueryWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCDFD281E33D0CE007519DC /* GraphQLQueryWatcher.swift */; }; 9FCE2CEE1E6BE2D900E34457 /* NormalizedCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCE2CED1E6BE2D800E34457 /* NormalizedCache.swift */; }; 9FCE2D091E6C254700E34457 /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; - 9FD03C2E25527CE7002227DC /* StoreConcurrencyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD03C2D25527CE6002227DC /* StoreConcurrencyTests.swift */; }; 9FD1519A255D7F30003BDAAA /* IssuesAndCommentsForRepository.json in Resources */ = {isa = PBXBuildFile; fileRef = 9FD15199255D7F30003BDAAA /* IssuesAndCommentsForRepository.json */; }; 9FDE0731258F3AA100DC0CA5 /* SchemaLoadingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1A96AF258F36B200A06EEB /* SchemaLoadingTests.swift */; }; 9FDE0752258F3BC200DC0CA5 /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; @@ -274,7 +239,6 @@ C377CCA922D798BD00572E03 /* GraphQLFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = C377CCA822D798BD00572E03 /* GraphQLFile.swift */; }; C377CCAB22D7992E00572E03 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C377CCAA22D7992E00572E03 /* MultipartFormData.swift */; }; D87AC09F2564D60B0079FAA5 /* ApolloClientOperationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87AC09E2564D60B0079FAA5 /* ApolloClientOperationTests.swift */; }; - D90F1AFB2479E57A007A1534 /* WebSocketTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */; }; DE3C7974260A646300D2F4FF /* dist in Resources */ = {isa = PBXBuildFile; fileRef = DE3C7973260A646300D2F4FF /* dist */; }; DE3C7A94260A6C1000D2F4FF /* ApolloCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B68353E2463481A00337AE6 /* ApolloCore.framework */; }; DE3C7A95260A6C1000D2F4FF /* ApolloCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9B68353E2463481A00337AE6 /* ApolloCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -286,7 +250,43 @@ DE3C7B1B260A6FCA00D2F4FF /* ScalarTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE3C7B15260A6FCA00D2F4FF /* ScalarTypes.swift */; }; DE3C7B4A260A73D800D2F4FF /* AnimalKingdomAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = DE3C79A9260A6ACD00D2F4FF /* AnimalKingdomAPI.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE3C7B4B260A73F900D2F4FF /* schema.graphqls in Resources */ = {isa = PBXBuildFile; fileRef = DE3C7AB9260A6D3E00D2F4FF /* schema.graphqls */; }; + DE4B66EA26264F6C00AE90A9 /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; + DE674D9D261CEEE4000E8FC8 /* c.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061172591B3550020D1E0 /* c.txt */; }; + DE674D9E261CEEE4000E8FC8 /* b.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061182591B3550020D1E0 /* b.txt */; }; + DE674D9F261CEEE4000E8FC8 /* a.txt in Resources */ = {isa = PBXBuildFile; fileRef = 9B2061192591B3550020D1E0 /* a.txt */; }; DE6B156A261505660068D642 /* GraphQLMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6B154A261505450068D642 /* GraphQLMap.swift */; }; + DE6B15AF26152BE10068D642 /* LegacyInterceptorProviderIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6B15AE26152BE10068D642 /* LegacyInterceptorProviderIntegrationTests.swift */; }; + DE6B15B126152BE10068D642 /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; }; + DED45C2A2615319E0086EF63 /* LegacyInterceptorProviderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED45C292615319E0086EF63 /* LegacyInterceptorProviderTests.swift */; }; + DED45D73261675890086EF63 /* StarWarsServerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC91EC0A9F7000017BE /* StarWarsServerTests.swift */; }; + DED45D852616759C0086EF63 /* TestConfigs.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED45D842616759C0086EF63 /* TestConfigs.swift */; }; + DED45D9626167F020086EF63 /* StarWarsServerCachingRoundtripTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC81EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift */; }; + DED45DE9261B96B70086EF63 /* LoadQueryFromStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC61EC0A9F7000017BE /* LoadQueryFromStoreTests.swift */; }; + DED45DEA261B96B70086EF63 /* WatchQueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABCB1EC0A9F7000017BE /* WatchQueryTests.swift */; }; + DED45DEB261B96B70086EF63 /* SQLiteCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B60204E23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift */; }; + DED45DEC261B96B70086EF63 /* CacheDependentInterceptorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BB4F5B12581AA50004F0BD6 /* CacheDependentInterceptorTests.swift */; }; + DED45DED261B96B70086EF63 /* StoreConcurrencyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FD03C2D25527CE6002227DC /* StoreConcurrencyTests.swift */; }; + DED45DEE261B96B70086EF63 /* FetchQueryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA6ABC51EC0A9F7000017BE /* FetchQueryTests.swift */; }; + DED45DEF261B96B70086EF63 /* ReadWriteFromStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8622F71EC2004200C38162 /* ReadWriteFromStoreTests.swift */; }; + DED45E30261B972C0086EF63 /* CachePersistenceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDAD423FDEC9B00ACD198 /* CachePersistenceTests.swift */; }; + DED45E6B261B9EAC0086EF63 /* SQLiteTestCacheProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDAEC23FDED9700ACD198 /* SQLiteTestCacheProvider.swift */; }; + DED45EC3261BA0ED0086EF63 /* WebSocketTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */; }; + DED45EC4261BA0ED0086EF63 /* SplitNetworkTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8A23FDE92900ACD198 /* SplitNetworkTransportTests.swift */; }; + DED45EC7261BA0ED0086EF63 /* WebSocketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8923FDE92900ACD198 /* WebSocketTests.swift */; }; + DED45EE4261BA1FB0086EF63 /* ApolloSQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */; }; + DED45EE5261BA1FB0086EF63 /* ApolloWebSocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */; }; + DED45EFE261CDA2A0086EF63 /* StarWarsSubscriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8823FDE92900ACD198 /* StarWarsSubscriptionTests.swift */; }; + DED45F17261CDA360086EF63 /* StarWarsWebSocketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8C23FDE92900ACD198 /* StarWarsWebSocketTests.swift */; }; + DED45F30261CDB560086EF63 /* URLSessionClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4F4542244A2AD300C2CF7D /* URLSessionClientTests.swift */; }; + DED45F4A261CDBFC0086EF63 /* UploadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED45F49261CDBFC0086EF63 /* UploadTests.swift */; }; + DED45FD0261CE88C0086EF63 /* ApolloSQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */; }; + DED45FE7261CE8C50086EF63 /* ApolloWebSocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */; }; + DED46000261CE9080086EF63 /* HTTPBinAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4F4540244A2A9200C2CF7D /* HTTPBinAPI.swift */; }; + DED4600D261CE9260086EF63 /* TestFileHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B21FD762422C8CC00998B5C /* TestFileHelper.swift */; }; + DED4601A261CE9880086EF63 /* MockWebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B7BDA8723FDE92900ACD198 /* MockWebSocket.swift */; }; + DED46035261CEA660086EF63 /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; }; + DED46042261CEA8A0086EF63 /* TestServerURLs.swift in Sources */ = {isa = PBXBuildFile; fileRef = DED45C172615308E0086EF63 /* TestServerURLs.swift */; }; + DED46051261CEAD20086EF63 /* StarWarsAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */; }; E86D8E05214B32FD0028EFE1 /* JSONTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86D8E03214B32DA0028EFE1 /* JSONTests.swift */; }; F16D083C21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F16D083B21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift */; }; F82E62E122BCD223000C311B /* AutomaticPersistedQueriesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82E62E022BCD223000C311B /* AutomaticPersistedQueriesTests.swift */; }; @@ -307,13 +307,6 @@ remoteGlobalIDString = 9B2DFBB524E1FA0D00ED3AE6; remoteInfo = UploadAPI; }; - 9B60204B23FDF4B300D0C8E0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B7BDAE123FDED8000ACD198; - remoteInfo = ApolloSQLiteTestSupport; - }; 9B683548246348CB00337AE6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; @@ -321,13 +314,6 @@ remoteGlobalIDString = 9B68353D2463481A00337AE6; remoteInfo = ApolloCore; }; - 9B68354C24634A2000337AE6 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B68353D2463481A00337AE6; - remoteInfo = ApolloCore; - }; 9B7BDAF723FDEE8400ACD198 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; @@ -342,181 +328,153 @@ remoteGlobalIDString = 9FC750431D2A532C00458D91; remoteInfo = Apollo; }; - 9B7BDB0023FDF01600ACD198 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B7BDA7C23FDE90400ACD198; - remoteInfo = ApolloWebSocket; - }; - 9B7BDB0223FDF01B00ACD198 /* PBXContainerItemProxy */ = { + 9B8C3FBB248DAA0400707B13 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; - remoteInfo = StarWarsAPI; + remoteGlobalIDString = 9B68353D2463481A00337AE6; + remoteInfo = ApolloCore; }; - 9B7BDB0623FDF04000ACD198 /* PBXContainerItemProxy */ = { + 9BAEEC02234BB8FD00808306 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; - remoteInfo = ApolloTestSupport; + remoteGlobalIDString = 9B7B6F46233C26D100F32205; + remoteInfo = ApolloCodegenLib; }; - 9B7BDB0F23FDF08F00ACD198 /* PBXContainerItemProxy */ = { + 9F54C8BA255D760B0065AFD6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9B7BDAE123FDED8000ACD198; - remoteInfo = ApolloSQLiteTestSupport; + remoteGlobalIDString = 9FC750431D2A532C00458D91; + remoteInfo = Apollo; }; - 9B7BDB1123FDF08F00ACD198 /* PBXContainerItemProxy */ = { + 9F54C8DE255D76810065AFD6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; remoteInfo = ApolloTestSupport; }; - 9B7BDB1823FDF11C00ACD198 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B7BDABE23FDEBB600ACD198; - remoteInfo = ApolloSQLite; - }; - 9B7BDB1B23FDF22000ACD198 /* PBXContainerItemProxy */ = { + 9F54C8E0255D76810065AFD6 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; - remoteInfo = StarWarsAPI; + remoteGlobalIDString = 9FACA9B71F42E67200AE2DBD; + remoteInfo = GitHubAPI; }; - 9B8C3FBB248DAA0400707B13 /* PBXContainerItemProxy */ = { + 9F65B11F1EC106E80090B25F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9B68353D2463481A00337AE6; - remoteInfo = ApolloCore; + remoteGlobalIDString = 9FC750431D2A532C00458D91; + remoteInfo = Apollo; }; - 9BAD16B723FE361F00007BEF /* PBXContainerItemProxy */ = { + 9F8A958B1EC0FF9F00304A2D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; remoteInfo = ApolloTestSupport; }; - 9BAEEC02234BB8FD00808306 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B7B6F46233C26D100F32205; - remoteInfo = ApolloCodegenLib; - }; - 9BEEDC2C24EB6419001D1294 /* PBXContainerItemProxy */ = { + 9FA5FBB51EC05CE900304A9D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; - remoteInfo = ApolloTestSupport; + remoteGlobalIDString = 9FC750431D2A532C00458D91; + remoteInfo = Apollo; }; - 9F54C8BA255D760B0065AFD6 /* PBXContainerItemProxy */ = { + 9FACA9B91F42E67200AE2DBD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9FC750431D2A532C00458D91; remoteInfo = Apollo; }; - 9F54C8DE255D76810065AFD6 /* PBXContainerItemProxy */ = { + 9FC750501D2A532D00458D91 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; - remoteInfo = ApolloTestSupport; + remoteGlobalIDString = 9FC750431D2A532C00458D91; + remoteInfo = Apollo; }; - 9F54C8E0255D76810065AFD6 /* PBXContainerItemProxy */ = { + 9FCE2D071E6C254000E34457 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FACA9B71F42E67200AE2DBD; - remoteInfo = GitHubAPI; + remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; + remoteInfo = StarWarsAPI; }; - 9F65B11F1EC106E80090B25F /* PBXContainerItemProxy */ = { + 9FDE0741258F3B6100DC0CA5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FC750431D2A532C00458D91; - remoteInfo = Apollo; + remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; + remoteInfo = StarWarsAPI; }; - 9F8A958B1EC0FF9F00304A2D /* PBXContainerItemProxy */ = { + DE3C7A96260A6C1000D2F4FF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; - remoteInfo = ApolloTestSupport; + remoteGlobalIDString = 9B68353D2463481A00337AE6; + remoteInfo = ApolloCore; }; - 9F8A958E1EC0FFB800304A2D /* PBXContainerItemProxy */ = { + DE4B66E826264F6900AE90A9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; remoteInfo = ApolloTestSupport; }; - 9FA5FBB51EC05CE900304A9D /* PBXContainerItemProxy */ = { + DE6B15B226152BE10068D642 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9FC750431D2A532C00458D91; remoteInfo = Apollo; }; - 9FA6ABD31EC0AA42000017BE /* PBXContainerItemProxy */ = { + DED45E97261B9EFA0086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; - remoteInfo = StarWarsAPI; + remoteGlobalIDString = 9B7BDABE23FDEBB600ACD198; + remoteInfo = ApolloSQLite; }; - 9FA6ABD71EC0AA55000017BE /* PBXContainerItemProxy */ = { + DED45E99261B9F000086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FC750431D2A532C00458D91; - remoteInfo = Apollo; + remoteGlobalIDString = 9B7BDA7C23FDE90400ACD198; + remoteInfo = ApolloWebSocket; }; - 9FACA9B91F42E67200AE2DBD /* PBXContainerItemProxy */ = { + DED45FCE261CE8890086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FC750431D2A532C00458D91; - remoteInfo = Apollo; + remoteGlobalIDString = 9B7BDABE23FDEBB600ACD198; + remoteInfo = ApolloSQLite; }; - 9FC750501D2A532D00458D91 /* PBXContainerItemProxy */ = { + DED45FD5261CE89C0086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FC750431D2A532C00458D91; - remoteInfo = Apollo; + remoteGlobalIDString = 9B7BDA7C23FDE90400ACD198; + remoteInfo = ApolloWebSocket; }; - 9FCE2D071E6C254000E34457 /* PBXContainerItemProxy */ = { + DED46033261CEA610086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; - remoteInfo = StarWarsAPI; + remoteGlobalIDString = 9F8A95771EC0FC1200304A2D; + remoteInfo = ApolloTestSupport; }; - 9FDE0741258F3B6100DC0CA5 /* PBXContainerItemProxy */ = { + DED4606A261CEDD10086EF63 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; proxyType = 1; remoteGlobalIDString = 9FCE2CF91E6C213D00E34457; remoteInfo = StarWarsAPI; }; - DE3C7A96260A6C1000D2F4FF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9B68353D2463481A00337AE6; - remoteInfo = ApolloCore; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -556,7 +514,6 @@ 90690D142243363D00FC2E54 /* Apollo-Target-TestHost-iOS.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-TestHost-iOS.xcconfig"; sourceTree = ""; }; 90690D2122433C1900FC2E54 /* Apollo-Target-StarWarsAPI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-StarWarsAPI.xcconfig"; sourceTree = ""; }; 90690D2222433C2800FC2E54 /* Apollo-Target-GitHubAPI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-GitHubAPI.xcconfig"; sourceTree = ""; }; - 90690D2322433C5900FC2E54 /* Apollo-Target-CacheDependentTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-CacheDependentTests.xcconfig"; sourceTree = ""; }; 90690D2422433C8000FC2E54 /* Apollo-Target-PerformanceTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-PerformanceTests.xcconfig"; sourceTree = ""; }; 90690D2522433CAF00FC2E54 /* Apollo-Target-TestSupport.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-TestSupport.xcconfig"; sourceTree = ""; }; 9B0E4717240AF6D70093BDA7 /* ASTVariableType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTVariableType.swift; sourceTree = ""; }; @@ -683,13 +640,11 @@ 9B7B6F57233C287100F32205 /* ApolloCodegen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApolloCodegen.swift; sourceTree = ""; }; 9B7B6F58233C287100F32205 /* ApolloCodegenOptions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApolloCodegenOptions.swift; sourceTree = ""; }; 9B7B6F68233C2C0C00F32205 /* FileManager+Apollo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "FileManager+Apollo.swift"; sourceTree = ""; }; - 9B7BDA6F23FDE8F200ACD198 /* ApolloWebSocketTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ApolloWebSocketTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApolloWebSocket.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9B7BDA8723FDE92900ACD198 /* MockWebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockWebSocket.swift; sourceTree = ""; }; 9B7BDA8823FDE92900ACD198 /* StarWarsSubscriptionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarWarsSubscriptionTests.swift; sourceTree = ""; }; - 9B7BDA8923FDE92900ACD198 /* MockWebSocketTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockWebSocketTests.swift; sourceTree = ""; }; + 9B7BDA8923FDE92900ACD198 /* WebSocketTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketTests.swift; sourceTree = ""; }; 9B7BDA8A23FDE92900ACD198 /* SplitNetworkTransportTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplitNetworkTransportTests.swift; sourceTree = ""; }; - 9B7BDA8B23FDE92900ACD198 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9B7BDA8C23FDE92900ACD198 /* StarWarsWebSocketTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarWarsWebSocketTests.swift; sourceTree = ""; }; 9B7BDA9423FDE94C00ACD198 /* WebSocketError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketError.swift; sourceTree = ""; }; 9B7BDA9523FDE94C00ACD198 /* WebSocketTask.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketTask.swift; sourceTree = ""; }; @@ -698,26 +653,18 @@ 9B7BDA9823FDE94C00ACD198 /* ApolloWebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApolloWebSocket.swift; sourceTree = ""; }; 9B7BDA9923FDE94C00ACD198 /* WebSocketTransport.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocketTransport.swift; sourceTree = ""; }; 9B7BDA9A23FDE94C00ACD198 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "ApolloWebSocket-Target-Tests.xcconfig"; sourceTree = ""; }; 9B7BDAA323FDE98C00ACD198 /* ApolloWebSocket-Project-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "ApolloWebSocket-Project-Release.xcconfig"; sourceTree = ""; }; 9B7BDAA423FDE98C00ACD198 /* ApolloWebSocket-Target-Framework.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "ApolloWebSocket-Target-Framework.xcconfig"; sourceTree = ""; }; 9B7BDAA523FDE98C00ACD198 /* ApolloWebSocket-Project-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "ApolloWebSocket-Project-Debug.xcconfig"; sourceTree = ""; }; - 9B7BDAB123FDEBA800ACD198 /* ApolloSQLiteTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ApolloSQLiteTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApolloSQLite.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9B7BDACD23FDEBE300ACD198 /* SQLiteSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLiteSerialization.swift; sourceTree = ""; }; 9B7BDACE23FDEBE300ACD198 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9B7BDACF23FDEBE300ACD198 /* SQLiteNormalizedCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLiteNormalizedCache.swift; sourceTree = ""; }; 9B7BDAD423FDEC9B00ACD198 /* CachePersistenceTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CachePersistenceTests.swift; sourceTree = ""; }; - 9B7BDAD523FDEC9B00ACD198 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9B7BDAD823FDECB300ACD198 /* ApolloSQLite-Target-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ApolloSQLite-Target-Framework.xcconfig"; sourceTree = ""; }; 9B7BDAD923FDECB400ACD198 /* ApolloSQLite-Project-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ApolloSQLite-Project-Debug.xcconfig"; sourceTree = ""; }; - 9B7BDADA23FDECB400ACD198 /* ApolloSQLite-Target-Tests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ApolloSQLite-Target-Tests.xcconfig"; sourceTree = ""; }; - 9B7BDADB23FDECB400ACD198 /* ApolloSQLite-Target-TestSupport.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ApolloSQLite-Target-TestSupport.xcconfig"; sourceTree = ""; }; 9B7BDADC23FDECB400ACD198 /* ApolloSQLite-Project-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "ApolloSQLite-Project-Release.xcconfig"; sourceTree = ""; }; - 9B7BDAE223FDED8000ACD198 /* ApolloSQLiteTestSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApolloSQLiteTestSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9B7BDAEC23FDED9700ACD198 /* TestCacheProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCacheProvider.swift; sourceTree = ""; }; - 9B7BDAED23FDED9700ACD198 /* ApolloSQLiteTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApolloSQLiteTestSupport.h; sourceTree = ""; }; - 9B7BDAEE23FDED9700ACD198 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9B7BDAEC23FDED9700ACD198 /* SQLiteTestCacheProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SQLiteTestCacheProvider.swift; sourceTree = ""; }; 9B8110A723A1995D00688AC4 /* .keep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .keep; sourceTree = ""; }; 9B8C3FB1248DA2EA00707B13 /* URL+Apollo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URL+Apollo.swift"; sourceTree = ""; }; 9B8C3FB4248DA3E000707B13 /* URLExtensionsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtensionsTests.swift; sourceTree = ""; }; @@ -727,7 +674,7 @@ 9B9BBAF224DB39D70021C30F /* UploadRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadRequest.swift; sourceTree = ""; }; 9B9BBAF424DB4F890021C30F /* AutomaticPersistedQueryInterceptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutomaticPersistedQueryInterceptor.swift; sourceTree = ""; }; 9B9BBB1624DB74720021C30F /* Apollo-Target-UploadAPI.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "Apollo-Target-UploadAPI.xcconfig"; sourceTree = ""; }; - 9B9BBB1A24DB75E60021C30F /* UploadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTests.swift; sourceTree = ""; }; + 9B9BBB1A24DB75E60021C30F /* UploadRequestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadRequestTests.swift; sourceTree = ""; }; 9B9F16A626013DAB00FB2F31 /* SQLiteDatabase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLiteDatabase.swift; sourceTree = ""; }; 9B9F16B72601532500FB2F31 /* SQLiteDotSwiftDatabase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SQLiteDotSwiftDatabase.swift; sourceTree = ""; }; 9BA1244922D8A8EA00BF1D24 /* JSONSerialization+Sorting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "JSONSerialization+Sorting.swift"; sourceTree = ""; }; @@ -826,8 +773,6 @@ 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApolloTestSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9F8F334B229044A200C0E83B /* Decoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Decoding.swift; sourceTree = ""; }; 9F91CF8E1F6C0DB2008DD0BE /* MutatingResultsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutatingResultsTests.swift; sourceTree = ""; }; - 9FA6ABBC1EC0A988000017BE /* ApolloCacheDependentTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ApolloCacheDependentTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 9FA6ABC01EC0A988000017BE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 9FA6ABC51EC0A9F7000017BE /* FetchQueryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchQueryTests.swift; sourceTree = ""; }; 9FA6ABC61EC0A9F7000017BE /* LoadQueryFromStoreTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadQueryFromStoreTests.swift; sourceTree = ""; }; 9FA6ABC81EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarWarsServerCachingRoundtripTests.swift; sourceTree = ""; }; @@ -889,7 +834,40 @@ DE3C7B14260A6FCA00D2F4FF /* GraphQLEnum.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphQLEnum.swift; sourceTree = ""; }; DE3C7B15260A6FCA00D2F4FF /* ScalarTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScalarTypes.swift; sourceTree = ""; }; DE6B154A261505450068D642 /* GraphQLMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphQLMap.swift; sourceTree = ""; }; + DE6B15AC26152BE10068D642 /* ApolloServerIntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ApolloServerIntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + DE6B15AE26152BE10068D642 /* LegacyInterceptorProviderIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyInterceptorProviderIntegrationTests.swift; sourceTree = ""; }; + DE6B15B026152BE10068D642 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DE6B15E826152CD80068D642 /* Apollo-Target-ServerIntegrationTests.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-ServerIntegrationTests.xcconfig"; sourceTree = ""; }; + DE6B15FA26152D210068D642 /* Workspace-Target-Application.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Target-Application.xcconfig"; sourceTree = ""; }; + DE6B15FB26152D210068D642 /* Workspace-Deployment-Targets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Deployment-Targets.xcconfig"; sourceTree = ""; }; + DE6B15FC26152D210068D642 /* Workspace-Analysis.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Analysis.xcconfig"; sourceTree = ""; }; + DE6B15FD26152D210068D642 /* Project-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Release.xcconfig"; sourceTree = ""; }; + DE6B15FE26152D210068D642 /* Workspace-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Debug.xcconfig"; sourceTree = ""; }; + DE6B15FF26152D210068D642 /* Workspace-Universal-Test.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Universal-Test.xcconfig"; sourceTree = ""; }; + DE6B160026152D210068D642 /* Workspace-Universal-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Universal-Framework.xcconfig"; sourceTree = ""; }; + DE6B160126152D210068D642 /* Workspace-Target-Test.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Target-Test.xcconfig"; sourceTree = ""; }; + DE6B160226152D210068D642 /* Workspace-Code-Generation.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Code-Generation.xcconfig"; sourceTree = ""; }; + DE6B160326152D210068D642 /* Workspace-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Release.xcconfig"; sourceTree = ""; }; + DE6B160426152D210068D642 /* Project-Version.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Version.xcconfig"; sourceTree = ""; }; + DE6B160526152D210068D642 /* Workspace-Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Warnings.xcconfig"; sourceTree = ""; }; + DE6B160626152D210068D642 /* Workspace-Target-Framework.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Target-Framework.xcconfig"; sourceTree = ""; }; + DE6B160726152D210068D642 /* Workspace-Search-Paths.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Search-Paths.xcconfig"; sourceTree = ""; }; + DE6B160826152D210068D642 /* Workspace-Universal-Target.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Universal-Target.xcconfig"; sourceTree = ""; }; + DE6B160926152D210068D642 /* Workspace-Linking.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Linking.xcconfig"; sourceTree = ""; }; + DE6B160A26152D210068D642 /* Workspace-Language.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Language.xcconfig"; sourceTree = ""; }; + DE6B160B26152D210068D642 /* Project-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Debug.xcconfig"; sourceTree = ""; }; + DE6B160C26152D210068D642 /* Workspace-Packaging.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Packaging.xcconfig"; sourceTree = ""; }; + DE6B160D26152D210068D642 /* Workspace-Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Shared.xcconfig"; sourceTree = ""; }; DEA34AF6260E821F00F95F86 /* Apollo-Target-AnimalKingdomAPI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-AnimalKingdomAPI.xcconfig"; sourceTree = ""; }; + DED45C172615308E0086EF63 /* TestServerURLs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestServerURLs.swift; sourceTree = ""; }; + DED45C292615319E0086EF63 /* LegacyInterceptorProviderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyInterceptorProviderTests.swift; sourceTree = ""; }; + DED45C3B26165DD70086EF63 /* Apollo-IntegrationTestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Apollo-IntegrationTestPlan.xctestplan"; sourceTree = ""; }; + DED45D842616759C0086EF63 /* TestConfigs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestConfigs.swift; sourceTree = ""; }; + DED45DC7261682260086EF63 /* Apollo-UnitTestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Apollo-UnitTestPlan.xctestplan"; sourceTree = ""; }; + DED45F49261CDBFC0086EF63 /* UploadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTests.swift; sourceTree = ""; }; + DED45FB1261CDE7D0086EF63 /* Apollo-PerformanceTestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Apollo-PerformanceTestPlan.xctestplan"; sourceTree = ""; }; + DED45FB2261CDE980086EF63 /* Apollo-CITestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Apollo-CITestPlan.xctestplan"; sourceTree = ""; }; + DED45FB3261CDEC60086EF63 /* Apollo-CodegenTestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Apollo-CodegenTestPlan.xctestplan"; sourceTree = ""; }; E86D8E03214B32DA0028EFE1 /* JSONTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONTests.swift; sourceTree = ""; }; F16D083B21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryFromJSONBuildingTests.swift; sourceTree = ""; }; F82E62E022BCD223000C311B /* AutomaticPersistedQueriesTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutomaticPersistedQueriesTests.swift; sourceTree = ""; }; @@ -920,16 +898,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDA6C23FDE8F200ACD198 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDB0823FDF04400ACD198 /* ApolloTestSupport.framework in Frameworks */, - 9B7BDB0523FDF02600ACD198 /* ApolloWebSocket.framework in Frameworks */, - 9B7BDB0423FDF02200ACD198 /* StarWarsAPI.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9B7BDA7A23FDE90400ACD198 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -939,16 +907,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDAAE23FDEBA800ACD198 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDB1D23FDF22300ACD198 /* StarWarsAPI.framework in Frameworks */, - 9B7BDB1423FDF09600ACD198 /* ApolloSQLiteTestSupport.framework in Frameworks */, - 9B7BDB1523FDF09600ACD198 /* ApolloTestSupport.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9B7BDABC23FDEBB600ACD198 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -958,19 +916,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDADF23FDED8000ACD198 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9BAD16B923FE362600007BEF /* ApolloTestSupport.framework in Frameworks */, - 9B7BDB1A23FDF12000ACD198 /* ApolloSQLite.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9BAEEBF9234BB8FD00808306 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DE4B66EA26264F6C00AE90A9 /* ApolloTestSupport.framework in Frameworks */, 9FDE0752258F3BC200DC0CA5 /* StarWarsAPI.framework in Frameworks */, 9BAEEC01234BB8FD00808306 /* ApolloCodegenLib.framework in Frameworks */, ); @@ -991,17 +941,8 @@ buildActionMask = 2147483647; files = ( 9F65B1211EC106F30090B25F /* Apollo.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9FA6ABB91EC0A988000017BE /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B60204D23FDF4B700D0C8E0 /* ApolloSQLiteTestSupport.framework in Frameworks */, - 9FA6ABD61EC0AA4D000017BE /* Apollo.framework in Frameworks */, - 9F8A95901EC0FFC100304A2D /* ApolloTestSupport.framework in Frameworks */, - 9FA6ABD51EC0AA49000017BE /* StarWarsAPI.framework in Frameworks */, + DED45EE4261BA1FB0086EF63 /* ApolloSQLite.framework in Frameworks */, + DED45EE5261BA1FB0086EF63 /* ApolloWebSocket.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1040,12 +981,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DE6B15A926152BE10068D642 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DED46051261CEAD20086EF63 /* StarWarsAPI.framework in Frameworks */, + DED46035261CEA660086EF63 /* ApolloTestSupport.framework in Frameworks */, + DED45FE7261CE8C50086EF63 /* ApolloWebSocket.framework in Frameworks */, + DED45FD0261CE88C0086EF63 /* ApolloSQLite.framework in Frameworks */, + DE6B15B126152BE10068D642 /* Apollo.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 90690D04224333DA00FC2E54 /* Configuration */ = { isa = PBXGroup; children = ( + DE6B15F926152D210068D642 /* Shared */, 90690D05224333DA00FC2E54 /* Apollo-Project-Debug.xcconfig */, 90690D08224333DA00FC2E54 /* Apollo-Project-Performance-Testing.xcconfig */, 90690D07224333DA00FC2E54 /* Apollo-Project-Release.xcconfig */, @@ -1053,7 +1007,6 @@ 9B7B6F55233C27A000F32205 /* Apollo-Target-ApolloCodegenLib.xcconfig */, 9B68354A2463498D00337AE6 /* Apollo-Target-ApolloCore.xcconfig */, DEA34AF6260E821F00F95F86 /* Apollo-Target-AnimalKingdomAPI.xcconfig */, - 90690D2322433C5900FC2E54 /* Apollo-Target-CacheDependentTests.xcconfig */, 9B4AA8AD239EFDC9003E1300 /* Apollo-Target-CodegenTests.xcconfig */, 90690D06224333DA00FC2E54 /* Apollo-Target-Framework.xcconfig */, 90690D2222433C2800FC2E54 /* Apollo-Target-GitHubAPI.xcconfig */, @@ -1061,18 +1014,16 @@ 90690D2122433C1900FC2E54 /* Apollo-Target-StarWarsAPI.xcconfig */, 90690D142243363D00FC2E54 /* Apollo-Target-TestHost-iOS.xcconfig */, 90690D0B2243345500FC2E54 /* Apollo-Target-Tests.xcconfig */, + DE6B15E826152CD80068D642 /* Apollo-Target-ServerIntegrationTests.xcconfig */, 90690D2522433CAF00FC2E54 /* Apollo-Target-TestSupport.xcconfig */, 9B2DFBC824E1FA7E00ED3AE6 /* Apollo-Target-UploadAPI.xcconfig */, 9B7BDAD923FDECB400ACD198 /* ApolloSQLite-Project-Debug.xcconfig */, 9B7BDADC23FDECB400ACD198 /* ApolloSQLite-Project-Release.xcconfig */, 9B7BDAD823FDECB300ACD198 /* ApolloSQLite-Target-Framework.xcconfig */, - 9B7BDADA23FDECB400ACD198 /* ApolloSQLite-Target-Tests.xcconfig */, 9B9BBB1624DB74720021C30F /* Apollo-Target-UploadAPI.xcconfig */, - 9B7BDADB23FDECB400ACD198 /* ApolloSQLite-Target-TestSupport.xcconfig */, 9B7BDAA523FDE98C00ACD198 /* ApolloWebSocket-Project-Debug.xcconfig */, 9B7BDAA323FDE98C00ACD198 /* ApolloWebSocket-Project-Release.xcconfig */, 9B7BDAA423FDE98C00ACD198 /* ApolloWebSocket-Target-Framework.xcconfig */, - 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */, ); name = Configuration; path = Configuration/Apollo; @@ -1083,12 +1034,10 @@ children = ( 9BC139A524EDCAD900876D29 /* BlindRetryingTestInterceptor.swift */, 9B2B66F32513FAFE00B53ABF /* CancellationHandlingInterceptor.swift */, - 9B4F4540244A2A9200C2CF7D /* HTTPBinAPI.swift */, 9BF6C91725194D7B000D5B93 /* MultipartFormData+Testing.swift */, 9BC139A724EDCE4F00876D29 /* RetryToCountThenSucceedInterceptor.swift */, 9BF6C99B25195019000D5B93 /* String+IncludesForTesting.swift */, C3279FC52345233000224790 /* TestCustomRequestBodyCreator.swift */, - 9B21FD762422C8CC00998B5C /* TestFileHelper.swift */, 9B64F6752354D219002D1BB5 /* URL+QueryDict.swift */, ); name = TestHelpers; @@ -1097,9 +1046,9 @@ 9B2061162591B3550020D1E0 /* Resources */ = { isa = PBXGroup; children = ( - 9B2061172591B3550020D1E0 /* c.txt */, - 9B2061182591B3550020D1E0 /* b.txt */, 9B2061192591B3550020D1E0 /* a.txt */, + 9B2061182591B3550020D1E0 /* b.txt */, + 9B2061172591B3550020D1E0 /* c.txt */, ); path = Resources; sourceTree = ""; @@ -1354,20 +1303,6 @@ path = Sources/ApolloCodegenLib; sourceTree = ""; }; - 9B7BDA8623FDE92900ACD198 /* ApolloWebsocketTests */ = { - isa = PBXGroup; - children = ( - 9B7BDA8723FDE92900ACD198 /* MockWebSocket.swift */, - 9B7BDA8923FDE92900ACD198 /* MockWebSocketTests.swift */, - 9B7BDA8A23FDE92900ACD198 /* SplitNetworkTransportTests.swift */, - 9B7BDA8823FDE92900ACD198 /* StarWarsSubscriptionTests.swift */, - 9B7BDA8C23FDE92900ACD198 /* StarWarsWebSocketTests.swift */, - D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */, - 9B7BDA8B23FDE92900ACD198 /* Info.plist */, - ); - path = ApolloWebsocketTests; - sourceTree = ""; - }; 9B7BDA9323FDE94C00ACD198 /* ApolloWebSocket */ = { isa = PBXGroup; children = ( @@ -1396,26 +1331,6 @@ path = Sources/ApolloSQLite; sourceTree = ""; }; - 9B7BDAD323FDEC9B00ACD198 /* ApolloSQLiteTests */ = { - isa = PBXGroup; - children = ( - 9B7BDAD423FDEC9B00ACD198 /* CachePersistenceTests.swift */, - 9B7BDAD523FDEC9B00ACD198 /* Info.plist */, - ); - path = ApolloSQLiteTests; - sourceTree = ""; - }; - 9B7BDAEB23FDED9700ACD198 /* ApolloSQLiteTestSupport */ = { - isa = PBXGroup; - children = ( - 9B7BDAEC23FDED9700ACD198 /* TestCacheProvider.swift */, - 9B7BDAED23FDED9700ACD198 /* ApolloSQLiteTestSupport.h */, - 9B7BDAEE23FDED9700ACD198 /* Info.plist */, - ); - name = ApolloSQLiteTestSupport; - path = Sources/ApolloSQLiteTestSupport; - sourceTree = SOURCE_ROOT; - }; 9B7BDAF923FDEE8A00ACD198 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -1508,12 +1423,16 @@ 9BCF0CDE23FC9CA50031D2A2 /* Info.plist */, 9BCF0CDD23FC9CA50031D2A2 /* MockURLSession.swift */, 9BCF0CDF23FC9CA50031D2A2 /* MockNetworkTransport.swift */, + 9B7BDA8723FDE92900ACD198 /* MockWebSocket.swift */, 9F3910262549741400AF54A6 /* MockGraphQLServer.swift */, + 9B21FD762422C8CC00998B5C /* TestFileHelper.swift */, 9BCF0CD923FC9CA50031D2A2 /* TestCacheProvider.swift */, + 9B7BDAEC23FDED9700ACD198 /* SQLiteTestCacheProvider.swift */, 9BEEDC2A24E61995001D1294 /* TestURLs.swift */, 9BCF0CDC23FC9CA50031D2A2 /* XCTAssertHelpers.swift */, 9FBE0D3F25407B64002ED0B1 /* AsyncResultObserver.swift */, 9F68F9F025415827004F26D0 /* XCTestCase+Helpers.swift */, + 9B2061162591B3550020D1E0 /* Resources */, ); name = ApolloTestSupport; path = Sources/ApolloTestSupport; @@ -1635,23 +1554,6 @@ path = ApolloPerformanceTests; sourceTree = ""; }; - 9FA6ABBD1EC0A988000017BE /* ApolloCacheDependentTests */ = { - isa = PBXGroup; - children = ( - 9BB4F5B12581AA50004F0BD6 /* CacheDependentInterceptorTests.swift */, - 9FA6ABC51EC0A9F7000017BE /* FetchQueryTests.swift */, - 9FA6ABC81EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift */, - 9FA6ABC91EC0A9F7000017BE /* StarWarsServerTests.swift */, - 9FA6ABC61EC0A9F7000017BE /* LoadQueryFromStoreTests.swift */, - 9F8622F71EC2004200C38162 /* ReadWriteFromStoreTests.swift */, - 9B60204E23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift */, - 9FD03C2D25527CE6002227DC /* StoreConcurrencyTests.swift */, - 9FA6ABCB1EC0A9F7000017BE /* WatchQueryTests.swift */, - 9FA6ABC01EC0A988000017BE /* Info.plist */, - ); - path = ApolloCacheDependentTests; - sourceTree = ""; - }; 9FC4B9231D2BE4F00046A641 /* JSON */ = { isa = PBXGroup; children = ( @@ -1691,21 +1593,18 @@ 9FC750441D2A532C00458D91 /* Apollo.framework */, 9FC7504E1D2A532D00458D91 /* ApolloTests.xctest */, 9FCE2CFA1E6C213D00E34457 /* StarWarsAPI.framework */, - 9FA6ABBC1EC0A988000017BE /* ApolloCacheDependentTests.xctest */, 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */, 9FACA9C61F42E67200AE2DBD /* GitHubAPI.framework */, 9B7B6F47233C26D100F32205 /* ApolloCodegenLib.framework */, 9BAEEBFC234BB8FD00808306 /* ApolloCodegenTests.xctest */, - 9B7BDA6F23FDE8F200ACD198 /* ApolloWebSocketTests.xctest */, 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */, - 9B7BDAB123FDEBA800ACD198 /* ApolloSQLiteTests.xctest */, 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */, - 9B7BDAE223FDED8000ACD198 /* ApolloSQLiteTestSupport.framework */, 9B68353E2463481A00337AE6 /* ApolloCore.framework */, 9B2DFBB624E1FA0D00ED3AE6 /* UploadAPI.framework */, 9B2DFBCA24E2016800ED3AE6 /* UploadAPI.framework */, 9F54C8B4255D760B0065AFD6 /* ApolloPerformanceTests.xctest */, DE3C7A11260A6B9800D2F4FF /* AnimalKingdomAPI.framework */, + DE6B15AC26152BE10068D642 /* ApolloServerIntegrationTests.xctest */, ); name = Products; sourceTree = ""; @@ -1735,6 +1634,8 @@ 9FC750521D2A532D00458D91 /* ApolloTests */ = { isa = PBXGroup; children = ( + DED45E9B261BA0CA0086EF63 /* WebSocket */, + DED45DE8261B969F0086EF63 /* Cache */, 9B0417812390320A00C9EC4E /* TestHelpers */, 9FC750551D2A532D00458D91 /* Info.plist */, D87AC09E2564D60B0079FAA5 /* ApolloClientOperationTests.swift */, @@ -1757,11 +1658,10 @@ F16D083B21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift */, 9FF90A6B1DDDEB420034C3B6 /* ReadFieldValueTests.swift */, 9B96500824BE6201003C29C0 /* RequestChainTests.swift */, + DED45C292615319E0086EF63 /* LegacyInterceptorProviderTests.swift */, C338DF1622DD9DE9006AF33E /* RequestBodyCreatorTests.swift */, - 9B4F4542244A2AD300C2CF7D /* URLSessionClientTests.swift */, - 9B9BBB1A24DB75E60021C30F /* UploadTests.swift */, + 9B9BBB1A24DB75E60021C30F /* UploadRequestTests.swift */, 5BB2C0222380836100774170 /* VersionNumberTests.swift */, - 9B2061162591B3550020D1E0 /* Resources */, ); path = ApolloTests; sourceTree = ""; @@ -1815,14 +1715,12 @@ 9FCE2CF41E6C20E000E34457 /* Tests */ = { isa = PBXGroup; children = ( + DE4B66B726260EBE00AE90A9 /* TestPlans */, 9FC750521D2A532D00458D91 /* ApolloTests */, - 9FA6ABBD1EC0A988000017BE /* ApolloCacheDependentTests */, 9F54C8B5255D760B0065AFD6 /* ApolloPerformanceTests */, 9BAEEC0A234BB95B00808306 /* ApolloCodegenTests */, - 9B7BDAD323FDEC9B00ACD198 /* ApolloSQLiteTests */, - 9B7BDAEB23FDED9700ACD198 /* ApolloSQLiteTestSupport */, + DE6B15AD26152BE10068D642 /* ApolloServerIntegrationTests */, 9BCF0CD823FC9CA50031D2A2 /* ApolloTestSupport */, - 9B7BDA8623FDE92900ACD198 /* ApolloWebsocketTests */, ); path = Tests; sourceTree = ""; @@ -1899,6 +1797,105 @@ path = CodegenCore; sourceTree = ""; }; + DE4B66B726260EBE00AE90A9 /* TestPlans */ = { + isa = PBXGroup; + children = ( + DED45DC7261682260086EF63 /* Apollo-UnitTestPlan.xctestplan */, + DED45C3B26165DD70086EF63 /* Apollo-IntegrationTestPlan.xctestplan */, + DED45FB1261CDE7D0086EF63 /* Apollo-PerformanceTestPlan.xctestplan */, + DED45FB2261CDE980086EF63 /* Apollo-CITestPlan.xctestplan */, + DED45FB3261CDEC60086EF63 /* Apollo-CodegenTestPlan.xctestplan */, + ); + path = TestPlans; + sourceTree = ""; + }; + DE6B15AD26152BE10068D642 /* ApolloServerIntegrationTests */ = { + isa = PBXGroup; + children = ( + DED45D62261675620086EF63 /* TestHelpers */, + DE6B15AE26152BE10068D642 /* LegacyInterceptorProviderIntegrationTests.swift */, + 9FA6ABC91EC0A9F7000017BE /* StarWarsServerTests.swift */, + 9FA6ABC81EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift */, + 9B7BDA8823FDE92900ACD198 /* StarWarsSubscriptionTests.swift */, + 9B7BDA8C23FDE92900ACD198 /* StarWarsWebSocketTests.swift */, + 9B4F4542244A2AD300C2CF7D /* URLSessionClientTests.swift */, + DE6B15B026152BE10068D642 /* Info.plist */, + DED45F49261CDBFC0086EF63 /* UploadTests.swift */, + ); + path = ApolloServerIntegrationTests; + sourceTree = ""; + }; + DE6B15F926152D210068D642 /* Shared */ = { + isa = PBXGroup; + children = ( + DE6B15FA26152D210068D642 /* Workspace-Target-Application.xcconfig */, + DE6B15FB26152D210068D642 /* Workspace-Deployment-Targets.xcconfig */, + DE6B15FC26152D210068D642 /* Workspace-Analysis.xcconfig */, + DE6B15FD26152D210068D642 /* Project-Release.xcconfig */, + DE6B15FE26152D210068D642 /* Workspace-Debug.xcconfig */, + DE6B15FF26152D210068D642 /* Workspace-Universal-Test.xcconfig */, + DE6B160026152D210068D642 /* Workspace-Universal-Framework.xcconfig */, + DE6B160126152D210068D642 /* Workspace-Target-Test.xcconfig */, + DE6B160226152D210068D642 /* Workspace-Code-Generation.xcconfig */, + DE6B160326152D210068D642 /* Workspace-Release.xcconfig */, + DE6B160426152D210068D642 /* Project-Version.xcconfig */, + DE6B160526152D210068D642 /* Workspace-Warnings.xcconfig */, + DE6B160626152D210068D642 /* Workspace-Target-Framework.xcconfig */, + DE6B160726152D210068D642 /* Workspace-Search-Paths.xcconfig */, + DE6B160826152D210068D642 /* Workspace-Universal-Target.xcconfig */, + DE6B160926152D210068D642 /* Workspace-Linking.xcconfig */, + DE6B160A26152D210068D642 /* Workspace-Language.xcconfig */, + DE6B160B26152D210068D642 /* Project-Debug.xcconfig */, + DE6B160C26152D210068D642 /* Workspace-Packaging.xcconfig */, + DE6B160D26152D210068D642 /* Workspace-Shared.xcconfig */, + ); + name = Shared; + path = Configuration/Shared; + sourceTree = SOURCE_ROOT; + }; + DED45D62261675620086EF63 /* TestHelpers */ = { + isa = PBXGroup; + children = ( + 9B4F4540244A2A9200C2CF7D /* HTTPBinAPI.swift */, + DED45C172615308E0086EF63 /* TestServerURLs.swift */, + DED45D842616759C0086EF63 /* TestConfigs.swift */, + ); + path = TestHelpers; + sourceTree = ""; + }; + DED45DE8261B969F0086EF63 /* Cache */ = { + isa = PBXGroup; + children = ( + DED45E2F261B971F0086EF63 /* SQLite */, + 9BB4F5B12581AA50004F0BD6 /* CacheDependentInterceptorTests.swift */, + 9FA6ABC51EC0A9F7000017BE /* FetchQueryTests.swift */, + 9FA6ABC61EC0A9F7000017BE /* LoadQueryFromStoreTests.swift */, + 9F8622F71EC2004200C38162 /* ReadWriteFromStoreTests.swift */, + 9FD03C2D25527CE6002227DC /* StoreConcurrencyTests.swift */, + 9FA6ABCB1EC0A9F7000017BE /* WatchQueryTests.swift */, + ); + path = Cache; + sourceTree = ""; + }; + DED45E2F261B971F0086EF63 /* SQLite */ = { + isa = PBXGroup; + children = ( + 9B60204E23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift */, + 9B7BDAD423FDEC9B00ACD198 /* CachePersistenceTests.swift */, + ); + path = SQLite; + sourceTree = ""; + }; + DED45E9B261BA0CA0086EF63 /* WebSocket */ = { + isa = PBXGroup; + children = ( + 9B7BDA8923FDE92900ACD198 /* WebSocketTests.swift */, + 9B7BDA8A23FDE92900ACD198 /* SplitNetworkTransportTests.swift */, + D90F1AF92479DEE5007A1534 /* WebSocketTransportTests.swift */, + ); + path = WebSocket; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -1938,14 +1935,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDADD23FDED8000ACD198 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDAF023FDED9700ACD198 /* ApolloSQLiteTestSupport.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9F8A95751EC0FC1200304A2D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -2050,34 +2039,14 @@ productReference = 9B7B6F47233C26D100F32205 /* ApolloCodegenLib.framework */; productType = "com.apple.product-type.framework"; }; - 9B7BDA6E23FDE8F200ACD198 /* ApolloWebSocketTests */ = { + 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */ = { isa = PBXNativeTarget; - buildConfigurationList = 9B7BDA7723FDE8F200ACD198 /* Build configuration list for PBXNativeTarget "ApolloWebSocketTests" */; + buildConfigurationList = 9B7BDA8223FDE90400ACD198 /* Build configuration list for PBXNativeTarget "ApolloWebSocket" */; buildPhases = ( - 9B7BDA6B23FDE8F200ACD198 /* Sources */, - 9B7BDA6C23FDE8F200ACD198 /* Frameworks */, - 9B7BDA6D23FDE8F200ACD198 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9B7BDB0723FDF04000ACD198 /* PBXTargetDependency */, - 9B7BDB0323FDF01B00ACD198 /* PBXTargetDependency */, - 9B7BDB0123FDF01600ACD198 /* PBXTargetDependency */, - ); - name = ApolloWebSocketTests; - productName = ApolloWebSocketTests; - productReference = 9B7BDA6F23FDE8F200ACD198 /* ApolloWebSocketTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9B7BDA8223FDE90400ACD198 /* Build configuration list for PBXNativeTarget "ApolloWebSocket" */; - buildPhases = ( - 9B7BDA7823FDE90400ACD198 /* Headers */, - 9B7BDA7923FDE90400ACD198 /* Sources */, - 9B7BDA7A23FDE90400ACD198 /* Frameworks */, - 9B7BDA7B23FDE90400ACD198 /* Resources */, + 9B7BDA7823FDE90400ACD198 /* Headers */, + 9B7BDA7923FDE90400ACD198 /* Sources */, + 9B7BDA7A23FDE90400ACD198 /* Frameworks */, + 9B7BDA7B23FDE90400ACD198 /* Resources */, ); buildRules = ( ); @@ -2093,26 +2062,6 @@ productReference = 9B7BDA7D23FDE90400ACD198 /* ApolloWebSocket.framework */; productType = "com.apple.product-type.framework"; }; - 9B7BDAB023FDEBA800ACD198 /* ApolloSQLiteTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9B7BDAB623FDEBA800ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLiteTests" */; - buildPhases = ( - 9B7BDAAD23FDEBA800ACD198 /* Sources */, - 9B7BDAAE23FDEBA800ACD198 /* Frameworks */, - 9B7BDAAF23FDEBA800ACD198 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9B7BDB1C23FDF22000ACD198 /* PBXTargetDependency */, - 9B7BDB1023FDF08F00ACD198 /* PBXTargetDependency */, - 9B7BDB1223FDF08F00ACD198 /* PBXTargetDependency */, - ); - name = ApolloSQLiteTests; - productName = ApolloSQLiteTests; - productReference = 9B7BDAB123FDEBA800ACD198 /* ApolloSQLiteTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; 9B7BDABE23FDEBB600ACD198 /* ApolloSQLite */ = { isa = PBXNativeTarget; buildConfigurationList = 9B7BDAC823FDEBB600ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLite" */; @@ -2136,26 +2085,6 @@ productReference = 9B7BDABF23FDEBB600ACD198 /* ApolloSQLite.framework */; productType = "com.apple.product-type.framework"; }; - 9B7BDAE123FDED8000ACD198 /* ApolloSQLiteTestSupport */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9B7BDAE723FDED8000ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLiteTestSupport" */; - buildPhases = ( - 9B7BDADD23FDED8000ACD198 /* Headers */, - 9B7BDADE23FDED8000ACD198 /* Sources */, - 9B7BDADF23FDED8000ACD198 /* Frameworks */, - 9B7BDAE023FDED8000ACD198 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 9BAD16B823FE361F00007BEF /* PBXTargetDependency */, - 9B7BDB1923FDF11C00ACD198 /* PBXTargetDependency */, - ); - name = ApolloSQLiteTestSupport; - productName = ApolloSQLiteTestSupport; - productReference = 9B7BDAE223FDED8000ACD198 /* ApolloSQLiteTestSupport.framework */; - productType = "com.apple.product-type.framework"; - }; 9BAEEBFB234BB8FD00808306 /* ApolloCodegenTests */ = { isa = PBXNativeTarget; buildConfigurationList = 9BAEEC07234BB8FD00808306 /* Build configuration list for PBXNativeTarget "ApolloCodegenTests" */; @@ -2167,9 +2096,8 @@ buildRules = ( ); dependencies = ( + DE4B66E926264F6900AE90A9 /* PBXTargetDependency */, 9FDE0742258F3B6100DC0CA5 /* PBXTargetDependency */, - 9BEEDC2D24EB6419001D1294 /* PBXTargetDependency */, - 9B68354D24634A2000337AE6 /* PBXTargetDependency */, 9BAEEC03234BB8FD00808306 /* PBXTargetDependency */, ); name = ApolloCodegenTests; @@ -2204,37 +2132,23 @@ 9F8A95731EC0FC1200304A2D /* Sources */, 9F8A95741EC0FC1200304A2D /* Frameworks */, 9F8A95751EC0FC1200304A2D /* Headers */, + DE674D9C261CEEDA000E8FC8 /* Resources */, ); buildRules = ( ); dependencies = ( 9F65B1201EC106E80090B25F /* PBXTargetDependency */, + DED45E98261B9EFA0086EF63 /* PBXTargetDependency */, + DED45E9A261B9F000086EF63 /* PBXTargetDependency */, + DED45E96261B9EE30086EF63 /* PBXTargetDependency */, ); name = ApolloTestSupport; + packageProductDependencies = ( + ); productName = ApolloTestSupport; productReference = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; productType = "com.apple.product-type.framework"; }; - 9FA6ABBB1EC0A988000017BE /* ApolloCacheDependentTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9FA6ABC11EC0A988000017BE /* Build configuration list for PBXNativeTarget "ApolloCacheDependentTests" */; - buildPhases = ( - 9FA6ABB81EC0A988000017BE /* Sources */, - 9FA6ABB91EC0A988000017BE /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 9B60204C23FDF4B300D0C8E0 /* PBXTargetDependency */, - 9FA6ABD81EC0AA55000017BE /* PBXTargetDependency */, - 9F8A958F1EC0FFB800304A2D /* PBXTargetDependency */, - 9FA6ABD41EC0AA42000017BE /* PBXTargetDependency */, - ); - name = ApolloCacheDependentTests; - productName = ApolloCacheDependentTests; - productReference = 9FA6ABBC1EC0A988000017BE /* ApolloCacheDependentTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; 9FACA9B71F42E67200AE2DBD /* GitHubAPI */ = { isa = PBXNativeTarget; buildConfigurationList = 9FACA9C21F42E67200AE2DBD /* Build configuration list for PBXNativeTarget "GitHubAPI" */; @@ -2336,6 +2250,30 @@ productReference = DE3C7A11260A6B9800D2F4FF /* AnimalKingdomAPI.framework */; productType = "com.apple.product-type.framework"; }; + DE6B15AB26152BE10068D642 /* ApolloServerIntegrationTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DE6B15B726152BE10068D642 /* Build configuration list for PBXNativeTarget "ApolloServerIntegrationTests" */; + buildPhases = ( + DE6B15A826152BE10068D642 /* Sources */, + DE6B15A926152BE10068D642 /* Frameworks */, + DE6B15AA26152BE10068D642 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DED46034261CEA610086EF63 /* PBXTargetDependency */, + DED45FCF261CE8890086EF63 /* PBXTargetDependency */, + DED45FD6261CE89C0086EF63 /* PBXTargetDependency */, + DE6B15B326152BE10068D642 /* PBXTargetDependency */, + DED4606B261CEDD10086EF63 /* PBXTargetDependency */, + ); + name = ApolloServerIntegrationTests; + packageProductDependencies = ( + ); + productName = ApolloServerIntegrationTests; + productReference = DE6B15AC26152BE10068D642 /* ApolloServerIntegrationTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -2357,21 +2295,12 @@ CreatedOnToolsVersion = 11.0; LastSwiftMigration = 1100; }; - 9B7BDA6E23FDE8F200ACD198 = { - CreatedOnToolsVersion = 11.3.1; - }; 9B7BDA7C23FDE90400ACD198 = { CreatedOnToolsVersion = 11.3.1; }; - 9B7BDAB023FDEBA800ACD198 = { - CreatedOnToolsVersion = 11.3.1; - }; 9B7BDABE23FDEBB600ACD198 = { CreatedOnToolsVersion = 11.3.1; }; - 9B7BDAE123FDED8000ACD198 = { - CreatedOnToolsVersion = 11.3.1; - }; 9BAEEBFB234BB8FD00808306 = { CreatedOnToolsVersion = 11.0; }; @@ -2383,11 +2312,6 @@ LastSwiftMigration = 1020; ProvisioningStyle = Manual; }; - 9FA6ABBB1EC0A988000017BE = { - CreatedOnToolsVersion = 8.3.2; - LastSwiftMigration = 1020; - ProvisioningStyle = Manual; - }; 9FACA9B71F42E67200AE2DBD = { ProvisioningStyle = Manual; }; @@ -2408,6 +2332,9 @@ LastSwiftMigration = 1020; ProvisioningStyle = Manual; }; + DE6B15AB26152BE10068D642 = { + CreatedOnToolsVersion = 12.4; + }; }; }; buildConfigurationList = 9FC7503E1D2A532C00458D91 /* Build configuration list for PBXProject "Apollo" */; @@ -2432,7 +2359,6 @@ 9FC750431D2A532C00458D91 /* Apollo */, 9B68353D2463481A00337AE6 /* ApolloCore */, 9FC7504D1D2A532D00458D91 /* ApolloTests */, - 9FA6ABBB1EC0A988000017BE /* ApolloCacheDependentTests */, 9F54C8B3255D760B0065AFD6 /* ApolloPerformanceTests */, DE3C7A00260A6B9800D2F4FF /* AnimalKingdomAPI */, 9FCE2CF91E6C213D00E34457 /* StarWarsAPI */, @@ -2442,10 +2368,8 @@ 9B7B6F46233C26D100F32205 /* ApolloCodegenLib */, 9BAEEBFB234BB8FD00808306 /* ApolloCodegenTests */, 9B7BDABE23FDEBB600ACD198 /* ApolloSQLite */, - 9B7BDAE123FDED8000ACD198 /* ApolloSQLiteTestSupport */, - 9B7BDAB023FDEBA800ACD198 /* ApolloSQLiteTests */, 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */, - 9B7BDA6E23FDE8F200ACD198 /* ApolloWebSocketTests */, + DE6B15AB26152BE10068D642 /* ApolloServerIntegrationTests */, ); }; /* End PBXProject section */ @@ -2473,13 +2397,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDA6D23FDE8F200ACD198 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9B7BDA7B23FDE90400ACD198 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2487,73 +2404,73 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDAAF23FDEBA800ACD198 /* Resources */ = { + 9B7BDABD23FDEBB600ACD198 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDABD23FDEBB600ACD198 /* Resources */ = { + 9BAEEBFA234BB8FD00808306 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDAE023FDED8000ACD198 /* Resources */ = { + 9F54C8B2255D760B0065AFD6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9FD1519A255D7F30003BDAAA /* IssuesAndCommentsForRepository.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9BAEEBFA234BB8FD00808306 /* Resources */ = { + 9F62DF3F258F45BF00E6E808 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 9F41CBF025A3490600C02CB7 /* schema.graphqls in Resources */, + 9F41CC0025A3491E00C02CB7 /* schema.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9F54C8B2255D760B0065AFD6 /* Resources */ = { + 9FC750421D2A532C00458D91 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9FD1519A255D7F30003BDAAA /* IssuesAndCommentsForRepository.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9F62DF3F258F45BF00E6E808 /* Resources */ = { + C304EBD522DDC87800748F72 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9F41CBF025A3490600C02CB7 /* schema.graphqls in Resources */, - 9F41CC0025A3491E00C02CB7 /* schema.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9FC750421D2A532C00458D91 /* Resources */ = { + DE3C7A0A260A6B9800D2F4FF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + DE3C7B4B260A73F900D2F4FF /* schema.graphqls in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C304EBD522DDC87800748F72 /* Resources */ = { + DE674D9C261CEEDA000E8FC8 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9B20611C2591B3550020D1E0 /* a.txt in Resources */, - 9B20611A2591B3550020D1E0 /* c.txt in Resources */, - 9B20611B2591B3550020D1E0 /* b.txt in Resources */, + DE674D9F261CEEE4000E8FC8 /* a.txt in Resources */, + DE674D9E261CEEE4000E8FC8 /* b.txt in Resources */, + DE674D9D261CEEE4000E8FC8 /* c.txt in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DE3C7A0A260A6B9800D2F4FF /* Resources */ = { + DE6B15AA26152BE10068D642 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - DE3C7B4B260A73F900D2F4FF /* schema.graphqls in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2590,7 +2507,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nxcrun -sdk macosx swift run Codegen -t \"GitHub\"\n"; + shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nxcrun -sdk macosx swift run --build-path \"./.build-GitHub\" Codegen -t \"GitHub\"\n"; }; 9FCE2D061E6C251100E34457 /* Generate Apollo Client API */ = { isa = PBXShellScriptBuildPhase; @@ -2604,7 +2521,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nxcrun -sdk macosx swift run Codegen -t \"StarWars\"\n"; + shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nxcrun -sdk macosx swift run --build-path \"./.build-StarWars\" Codegen -t \"StarWars\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -2686,19 +2603,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDA6B23FDE8F200ACD198 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDA8D23FDE92A00ACD198 /* MockWebSocket.swift in Sources */, - 9B7BDA8F23FDE92A00ACD198 /* MockWebSocketTests.swift in Sources */, - 9B7BDA9223FDE92A00ACD198 /* StarWarsWebSocketTests.swift in Sources */, - 9B7BDA9023FDE92A00ACD198 /* SplitNetworkTransportTests.swift in Sources */, - 9B7BDA8E23FDE92A00ACD198 /* StarWarsSubscriptionTests.swift in Sources */, - D90F1AFB2479E57A007A1534 /* WebSocketTransportTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9B7BDA7923FDE90400ACD198 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2712,14 +2616,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDAAD23FDEBA800ACD198 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDAD623FDEC9B00ACD198 /* CachePersistenceTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9B7BDABB23FDEBB600ACD198 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2731,14 +2627,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9B7BDADE23FDED8000ACD198 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9B7BDAEF23FDED9700ACD198 /* TestCacheProvider.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9BAEEBF8234BB8FD00808306 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2802,10 +2690,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DED4601A261CE9880086EF63 /* MockWebSocket.swift in Sources */, 9BCF0CE423FC9CA50031D2A2 /* MockURLSession.swift in Sources */, 9FBE0D4025407B64002ED0B1 /* AsyncResultObserver.swift in Sources */, 9F3910272549741400AF54A6 /* MockGraphQLServer.swift in Sources */, + DED45E6B261B9EAC0086EF63 /* SQLiteTestCacheProvider.swift in Sources */, 9BEEDC2B24E61995001D1294 /* TestURLs.swift in Sources */, + DED4600D261CE9260086EF63 /* TestFileHelper.swift in Sources */, 9BCF0CE023FC9CA50031D2A2 /* TestCacheProvider.swift in Sources */, 9BCF0CE323FC9CA50031D2A2 /* XCTAssertHelpers.swift in Sources */, 9F68F9F125415827004F26D0 /* XCTestCase+Helpers.swift in Sources */, @@ -2813,22 +2704,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9FA6ABB81EC0A988000017BE /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9BB4F5B22581AA50004F0BD6 /* CacheDependentInterceptorTests.swift in Sources */, - 9FD03C2E25527CE7002227DC /* StoreConcurrencyTests.swift in Sources */, - 9F39101725493DDC00AF54A6 /* FetchQueryTests.swift in Sources */, - 9FA6ABCD1EC0A9F7000017BE /* LoadQueryFromStoreTests.swift in Sources */, - 9FA6ABCF1EC0A9F7000017BE /* StarWarsServerCachingRoundtripTests.swift in Sources */, - 9FA6ABD21EC0A9F7000017BE /* WatchQueryTests.swift in Sources */, - 9B60204F23FDFA9F00D0C8E0 /* SQLiteCacheTests.swift in Sources */, - 9FA6ABD01EC0A9F7000017BE /* StarWarsServerTests.swift in Sources */, - 9F8622F81EC2004200C38162 /* ReadWriteFromStoreTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 9FACA9BB1F42E67200AE2DBD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2913,37 +2788,46 @@ buildActionMask = 2147483647; files = ( 5BB2C0232380836100774170 /* VersionNumberTests.swift in Sources */, + DED45EC3261BA0ED0086EF63 /* WebSocketTransportTests.swift in Sources */, 9B78C71E2326E86E000C8C32 /* ErrorGenerationTests.swift in Sources */, + DED45EC7261BA0ED0086EF63 /* WebSocketTests.swift in Sources */, 9FC9A9C81E2EFE6E0023C4D5 /* CacheKeyForFieldTests.swift in Sources */, 9BF6C99C25195019000D5B93 /* String+IncludesForTesting.swift in Sources */, + DED45DEF261B96B70086EF63 /* ReadWriteFromStoreTests.swift in Sources */, 9F91CF8F1F6C0DB2008DD0BE /* MutatingResultsTests.swift in Sources */, - 9B9BBB1C24DB760B0021C30F /* UploadTests.swift in Sources */, + 9B9BBB1C24DB760B0021C30F /* UploadRequestTests.swift in Sources */, 9BC139A424EDCA6C00876D29 /* InterceptorTests.swift in Sources */, F82E62E122BCD223000C311B /* AutomaticPersistedQueriesTests.swift in Sources */, 9BC139A824EDCE4F00876D29 /* RetryToCountThenSucceedInterceptor.swift in Sources */, - 9B4F4543244A2AD300C2CF7D /* URLSessionClientTests.swift in Sources */, 9F533AB31E6C4A4200CBE097 /* BatchedLoadTests.swift in Sources */, + DED45DEE261B96B70086EF63 /* FetchQueryTests.swift in Sources */, C3279FC72345234D00224790 /* TestCustomRequestBodyCreator.swift in Sources */, + DED45DED261B96B70086EF63 /* StoreConcurrencyTests.swift in Sources */, 9B95EDC022CAA0B000702BB2 /* GETTransformerTests.swift in Sources */, 9FF90A6F1DDDEB420034C3B6 /* GraphQLMapEncodingTests.swift in Sources */, D87AC09F2564D60B0079FAA5 /* ApolloClientOperationTests.swift in Sources */, 9B64F6762354D219002D1BB5 /* URL+QueryDict.swift in Sources */, 9B2B66F42513FAFE00B53ABF /* CancellationHandlingInterceptor.swift in Sources */, - 9B21FD772422C8CC00998B5C /* TestFileHelper.swift in Sources */, 9BC139A624EDCAD900876D29 /* BlindRetryingTestInterceptor.swift in Sources */, 9B96500A24BE62B7003C29C0 /* RequestChainTests.swift in Sources */, + DED45DEA261B96B70086EF63 /* WatchQueryTests.swift in Sources */, + DED45E30261B972C0086EF63 /* CachePersistenceTests.swift in Sources */, + DED45EC4261BA0ED0086EF63 /* SplitNetworkTransportTests.swift in Sources */, 9B21FD752422C29D00998B5C /* GraphQLFileTests.swift in Sources */, E86D8E05214B32FD0028EFE1 /* JSONTests.swift in Sources */, 9F8622FA1EC2117C00C38162 /* FragmentConstructionAndConversionTests.swift in Sources */, + DED45C2A2615319E0086EF63 /* LegacyInterceptorProviderTests.swift in Sources */, 9F21730E2567E6F000566121 /* DataLoaderTests.swift in Sources */, + DED45DEC261B96B70086EF63 /* CacheDependentInterceptorTests.swift in Sources */, + DED45DEB261B96B70086EF63 /* SQLiteCacheTests.swift in Sources */, C338DF1722DD9DE9006AF33E /* RequestBodyCreatorTests.swift in Sources */, F16D083C21EF6F7300C458B8 /* QueryFromJSONBuildingTests.swift in Sources */, 9BF6C97025194ED7000D5B93 /* MultipartFormDataTests.swift in Sources */, 9FF90A711DDDEB420034C3B6 /* ReadFieldValueTests.swift in Sources */, 9F295E311E27534800A24949 /* NormalizeQueryResults.swift in Sources */, 9FF90A731DDDEB420034C3B6 /* ParseQueryResponseTests.swift in Sources */, + DED45DE9261B96B70086EF63 /* LoadQueryFromStoreTests.swift in Sources */, 9BF6C94325194DE2000D5B93 /* MultipartFormData+Testing.swift in Sources */, - 9B4F4541244A2A9200C2CF7D /* HTTPBinAPI.swift in Sources */, 9F21735B2568F3E200566121 /* PossiblyDeferredTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2963,6 +2847,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DE6B15A826152BE10068D642 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DED46042261CEA8A0086EF63 /* TestServerURLs.swift in Sources */, + DED45EFE261CDA2A0086EF63 /* StarWarsSubscriptionTests.swift in Sources */, + DED45D852616759C0086EF63 /* TestConfigs.swift in Sources */, + DED45D9626167F020086EF63 /* StarWarsServerCachingRoundtripTests.swift in Sources */, + DE6B15AF26152BE10068D642 /* LegacyInterceptorProviderIntegrationTests.swift in Sources */, + DED46000261CE9080086EF63 /* HTTPBinAPI.swift in Sources */, + DED45F4A261CDBFC0086EF63 /* UploadTests.swift in Sources */, + DED45F17261CDA360086EF63 /* StarWarsWebSocketTests.swift in Sources */, + DED45D73261675890086EF63 /* StarWarsServerTests.swift in Sources */, + DED45F30261CDB560086EF63 /* URLSessionClientTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -2976,21 +2877,11 @@ target = 9B2DFBB524E1FA0D00ED3AE6 /* UploadAPI */; targetProxy = 9B2DFBCB24E201A000ED3AE6 /* PBXContainerItemProxy */; }; - 9B60204C23FDF4B300D0C8E0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9B7BDAE123FDED8000ACD198 /* ApolloSQLiteTestSupport */; - targetProxy = 9B60204B23FDF4B300D0C8E0 /* PBXContainerItemProxy */; - }; 9B683549246348CB00337AE6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9B68353D2463481A00337AE6 /* ApolloCore */; targetProxy = 9B683548246348CB00337AE6 /* PBXContainerItemProxy */; }; - 9B68354D24634A2000337AE6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9B68353D2463481A00337AE6 /* ApolloCore */; - targetProxy = 9B68354C24634A2000337AE6 /* PBXContainerItemProxy */; - }; 9B7BDAF823FDEE8400ACD198 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9FC750431D2A532C00458D91 /* Apollo */; @@ -3005,65 +2896,20 @@ isa = PBXTargetDependency; productRef = 9B7BDAFE23FDEF9E00ACD198 /* Starscream */; }; - 9B7BDB0123FDF01600ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */; - targetProxy = 9B7BDB0023FDF01600ACD198 /* PBXContainerItemProxy */; - }; - 9B7BDB0323FDF01B00ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9FCE2CF91E6C213D00E34457 /* StarWarsAPI */; - targetProxy = 9B7BDB0223FDF01B00ACD198 /* PBXContainerItemProxy */; - }; - 9B7BDB0723FDF04000ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; - targetProxy = 9B7BDB0623FDF04000ACD198 /* PBXContainerItemProxy */; - }; - 9B7BDB1023FDF08F00ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9B7BDAE123FDED8000ACD198 /* ApolloSQLiteTestSupport */; - targetProxy = 9B7BDB0F23FDF08F00ACD198 /* PBXContainerItemProxy */; - }; - 9B7BDB1223FDF08F00ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; - targetProxy = 9B7BDB1123FDF08F00ACD198 /* PBXContainerItemProxy */; - }; 9B7BDB1723FDF10300ACD198 /* PBXTargetDependency */ = { isa = PBXTargetDependency; productRef = 9B7BDB1623FDF10300ACD198 /* SQLite */; }; - 9B7BDB1923FDF11C00ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9B7BDABE23FDEBB600ACD198 /* ApolloSQLite */; - targetProxy = 9B7BDB1823FDF11C00ACD198 /* PBXContainerItemProxy */; - }; - 9B7BDB1C23FDF22000ACD198 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9FCE2CF91E6C213D00E34457 /* StarWarsAPI */; - targetProxy = 9B7BDB1B23FDF22000ACD198 /* PBXContainerItemProxy */; - }; 9B8C3FBC248DAA0400707B13 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9B68353D2463481A00337AE6 /* ApolloCore */; targetProxy = 9B8C3FBB248DAA0400707B13 /* PBXContainerItemProxy */; }; - 9BAD16B823FE361F00007BEF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; - targetProxy = 9BAD16B723FE361F00007BEF /* PBXContainerItemProxy */; - }; 9BAEEC03234BB8FD00808306 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9B7B6F46233C26D100F32205 /* ApolloCodegenLib */; targetProxy = 9BAEEC02234BB8FD00808306 /* PBXContainerItemProxy */; }; - 9BEEDC2D24EB6419001D1294 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; - targetProxy = 9BEEDC2C24EB6419001D1294 /* PBXContainerItemProxy */; - }; 9F54C8BB255D760B0065AFD6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9FC750431D2A532C00458D91 /* Apollo */; @@ -3089,26 +2935,11 @@ target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; targetProxy = 9F8A958B1EC0FF9F00304A2D /* PBXContainerItemProxy */; }; - 9F8A958F1EC0FFB800304A2D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; - targetProxy = 9F8A958E1EC0FFB800304A2D /* PBXContainerItemProxy */; - }; 9FA5FBB61EC05CE900304A9D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9FC750431D2A532C00458D91 /* Apollo */; targetProxy = 9FA5FBB51EC05CE900304A9D /* PBXContainerItemProxy */; }; - 9FA6ABD41EC0AA42000017BE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9FCE2CF91E6C213D00E34457 /* StarWarsAPI */; - targetProxy = 9FA6ABD31EC0AA42000017BE /* PBXContainerItemProxy */; - }; - 9FA6ABD81EC0AA55000017BE /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 9FC750431D2A532C00458D91 /* Apollo */; - targetProxy = 9FA6ABD71EC0AA55000017BE /* PBXContainerItemProxy */; - }; 9FACA9B81F42E67200AE2DBD /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 9FC750431D2A532C00458D91 /* Apollo */; @@ -3134,6 +2965,50 @@ target = 9B68353D2463481A00337AE6 /* ApolloCore */; targetProxy = DE3C7A96260A6C1000D2F4FF /* PBXContainerItemProxy */; }; + DE4B66E926264F6900AE90A9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; + targetProxy = DE4B66E826264F6900AE90A9 /* PBXContainerItemProxy */; + }; + DE6B15B326152BE10068D642 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9FC750431D2A532C00458D91 /* Apollo */; + targetProxy = DE6B15B226152BE10068D642 /* PBXContainerItemProxy */; + }; + DED45E96261B9EE30086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + productRef = DED45E95261B9EE30086EF63 /* SQLite */; + }; + DED45E98261B9EFA0086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9B7BDABE23FDEBB600ACD198 /* ApolloSQLite */; + targetProxy = DED45E97261B9EFA0086EF63 /* PBXContainerItemProxy */; + }; + DED45E9A261B9F000086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */; + targetProxy = DED45E99261B9F000086EF63 /* PBXContainerItemProxy */; + }; + DED45FCF261CE8890086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9B7BDABE23FDEBB600ACD198 /* ApolloSQLite */; + targetProxy = DED45FCE261CE8890086EF63 /* PBXContainerItemProxy */; + }; + DED45FD6261CE89C0086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9B7BDA7C23FDE90400ACD198 /* ApolloWebSocket */; + targetProxy = DED45FD5261CE89C0086EF63 /* PBXContainerItemProxy */; + }; + DED46034261CEA610086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9F8A95771EC0FC1200304A2D /* ApolloTestSupport */; + targetProxy = DED46033261CEA610086EF63 /* PBXContainerItemProxy */; + }; + DED4606B261CEDD10086EF63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 9FCE2CF91E6C213D00E34457 /* StarWarsAPI */; + targetProxy = DED4606A261CEDD10086EF63 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -3200,27 +3075,6 @@ }; name = PerformanceTesting; }; - 9B7BDA7423FDE8F200ACD198 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 9B7BDA7523FDE8F200ACD198 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 9B7BDA7623FDE8F200ACD198 /* PerformanceTesting */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */; - buildSettings = { - }; - name = PerformanceTesting; - }; 9B7BDA8323FDE90400ACD198 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9B7BDAA423FDE98C00ACD198 /* ApolloWebSocket-Target-Framework.xcconfig */; @@ -3242,27 +3096,6 @@ }; name = PerformanceTesting; }; - 9B7BDAB723FDEBA800ACD198 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDAA223FDE98B00ACD198 /* ApolloWebSocket-Target-Tests.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 9B7BDAB823FDEBA800ACD198 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDADA23FDECB400ACD198 /* ApolloSQLite-Target-Tests.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 9B7BDAB923FDEBA800ACD198 /* PerformanceTesting */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDADA23FDECB400ACD198 /* ApolloSQLite-Target-Tests.xcconfig */; - buildSettings = { - }; - name = PerformanceTesting; - }; 9B7BDAC923FDEBB600ACD198 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9B7BDAD823FDECB300ACD198 /* ApolloSQLite-Target-Framework.xcconfig */; @@ -3284,27 +3117,6 @@ }; name = PerformanceTesting; }; - 9B7BDAE823FDED8000ACD198 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDADB23FDECB400ACD198 /* ApolloSQLite-Target-TestSupport.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 9B7BDAE923FDED8000ACD198 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDADB23FDECB400ACD198 /* ApolloSQLite-Target-TestSupport.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 9B7BDAEA23FDED8000ACD198 /* PerformanceTesting */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9B7BDADB23FDECB400ACD198 /* ApolloSQLite-Target-TestSupport.xcconfig */; - buildSettings = { - }; - name = PerformanceTesting; - }; 9BAEEC04234BB8FD00808306 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 9B4AA8AD239EFDC9003E1300 /* Apollo-Target-CodegenTests.xcconfig */; @@ -3368,27 +3180,6 @@ }; name = PerformanceTesting; }; - 9FA6ABC21EC0A988000017BE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 90690D2322433C5900FC2E54 /* Apollo-Target-CacheDependentTests.xcconfig */; - buildSettings = { - }; - name = Debug; - }; - 9FA6ABC31EC0A988000017BE /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 90690D2322433C5900FC2E54 /* Apollo-Target-CacheDependentTests.xcconfig */; - buildSettings = { - }; - name = Release; - }; - 9FA6ABC41EC0A988000017BE /* PerformanceTesting */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 90690D2322433C5900FC2E54 /* Apollo-Target-CacheDependentTests.xcconfig */; - buildSettings = { - }; - name = PerformanceTesting; - }; 9FACA9C31F42E67200AE2DBD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 90690D2222433C2800FC2E54 /* Apollo-Target-GitHubAPI.xcconfig */; @@ -3515,6 +3306,27 @@ }; name = PerformanceTesting; }; + DE6B15B426152BE10068D642 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE6B15E826152CD80068D642 /* Apollo-Target-ServerIntegrationTests.xcconfig */; + buildSettings = { + }; + name = Debug; + }; + DE6B15B526152BE10068D642 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE6B15E826152CD80068D642 /* Apollo-Target-ServerIntegrationTests.xcconfig */; + buildSettings = { + }; + name = Release; + }; + DE6B15B626152BE10068D642 /* PerformanceTesting */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DE6B15E826152CD80068D642 /* Apollo-Target-ServerIntegrationTests.xcconfig */; + buildSettings = { + }; + name = PerformanceTesting; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -3548,16 +3360,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9B7BDA7723FDE8F200ACD198 /* Build configuration list for PBXNativeTarget "ApolloWebSocketTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9B7BDA7423FDE8F200ACD198 /* Debug */, - 9B7BDA7523FDE8F200ACD198 /* Release */, - 9B7BDA7623FDE8F200ACD198 /* PerformanceTesting */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 9B7BDA8223FDE90400ACD198 /* Build configuration list for PBXNativeTarget "ApolloWebSocket" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -3568,16 +3370,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9B7BDAB623FDEBA800ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLiteTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9B7BDAB723FDEBA800ACD198 /* Debug */, - 9B7BDAB823FDEBA800ACD198 /* Release */, - 9B7BDAB923FDEBA800ACD198 /* PerformanceTesting */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 9B7BDAC823FDEBB600ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLite" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -3588,16 +3380,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9B7BDAE723FDED8000ACD198 /* Build configuration list for PBXNativeTarget "ApolloSQLiteTestSupport" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9B7BDAE823FDED8000ACD198 /* Debug */, - 9B7BDAE923FDED8000ACD198 /* Release */, - 9B7BDAEA23FDED8000ACD198 /* PerformanceTesting */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 9BAEEC07234BB8FD00808306 /* Build configuration list for PBXNativeTarget "ApolloCodegenTests" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -3628,16 +3410,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 9FA6ABC11EC0A988000017BE /* Build configuration list for PBXNativeTarget "ApolloCacheDependentTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9FA6ABC21EC0A988000017BE /* Debug */, - 9FA6ABC31EC0A988000017BE /* Release */, - 9FA6ABC41EC0A988000017BE /* PerformanceTesting */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 9FACA9C21F42E67200AE2DBD /* Build configuration list for PBXNativeTarget "GitHubAPI" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -3698,6 +3470,16 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + DE6B15B726152BE10068D642 /* Build configuration list for PBXNativeTarget "ApolloServerIntegrationTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DE6B15B426152BE10068D642 /* Debug */, + DE6B15B526152BE10068D642 /* Release */, + DE6B15B626152BE10068D642 /* PerformanceTesting */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -3766,6 +3548,11 @@ package = 9B7BDAF423FDEE2600ACD198 /* XCRemoteSwiftPackageReference "SQLite.swift" */; productName = SQLite; }; + DED45E95261B9EE30086EF63 /* SQLite */ = { + isa = XCSwiftPackageProductDependency; + package = 9B7BDAF423FDEE2600ACD198 /* XCRemoteSwiftPackageReference "SQLite.swift" */; + productName = SQLite; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 9FC7503B1D2A532C00458D91 /* Project object */; diff --git a/Apollo.xcodeproj/xcshareddata/xcschemes/Apollo Playground.xcscheme b/Apollo.xcodeproj/xcshareddata/xcschemes/Apollo Playground.xcscheme index 7352fedcf5..1d9a103e5c 100644 --- a/Apollo.xcodeproj/xcshareddata/xcschemes/Apollo Playground.xcscheme +++ b/Apollo.xcodeproj/xcshareddata/xcschemes/Apollo Playground.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -82,54 +82,12 @@ ReferencedContainer = "container:Apollo.xcodeproj"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + version = "1.7"> @@ -55,54 +55,21 @@ ReferencedContainer = "container:Apollo.xcodeproj"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + version = "1.7"> @@ -55,18 +55,12 @@ ReferencedContainer = "container:Apollo.xcodeproj"> - - - - - - + + + + + version = "1.7"> @@ -27,8 +27,18 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - + + + + + + + + + version = "1.7"> @@ -12,6 +12,12 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES" disableMainThreadChecker = "YES"> + + + + diff --git a/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloSQLite.xcscheme b/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloSQLite.xcscheme index 78a4a2c6f0..fc7b7c0765 100644 --- a/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloSQLite.xcscheme +++ b/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloSQLite.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -46,54 +46,12 @@ ReferencedContainer = "container:Apollo.xcodeproj"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloWebSocket.xcscheme b/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloWebSocket.xcscheme index 7042c3990c..ef6225b929 100644 --- a/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloWebSocket.xcscheme +++ b/Apollo.xcodeproj/xcshareddata/xcschemes/ApolloWebSocket.xcscheme @@ -1,7 +1,7 @@ + version = "1.7"> @@ -46,18 +46,12 @@ ReferencedContainer = "container:Apollo.xcodeproj"> - - - - - - + + + + ApolloCLI { + let lock = try waitForCLIFolderLock(cliFolderURL: cliFolderURL, timeout: timeout) + defer { lock.unlock() } + try CLIDownloader.downloadIfNeeded(cliFolderURL: cliFolderURL, timeout: timeout) if !(try CLIExtractor.validateSHASUMOfDownloadedFile(in: cliFolderURL)) { @@ -22,7 +30,33 @@ public struct ApolloCLI { let binaryFolderURL = try CLIExtractor.extractCLIIfNeeded(from: cliFolderURL) return ApolloCLI(binaryFolderURL: binaryFolderURL) } - + + private static func waitForCLIFolderLock(cliFolderURL: URL, timeout: Double) throws -> NSDistributedLock { + guard let lock = NSDistributedLock(path: cliFolderURL.path + ".lock") else { + throw ApolloCLIError.lockInitializationFailed(cliFolderURL) + } + + let maxPollCount = Int(timeout*2) + var pollCount = 0 + + repeat { + if lock.try() { + return lock + + } else { + pollCount += 1 + + if pollCount <= maxPollCount { + usleep(500_000) // sleep 0.5 seconds + } else { + throw ApolloCLIError.timedOutWaitingOnLock(cliFolderURL) + } + } + } while pollCount <= maxPollCount + + return lock + } + public let binaryFolderURL: URL /// Designated initializer diff --git a/Sources/ApolloCodegenLib/CLIExtractor.swift b/Sources/ApolloCodegenLib/CLIExtractor.swift index 486aac529c..e507a9d4a9 100644 --- a/Sources/ApolloCodegenLib/CLIExtractor.swift +++ b/Sources/ApolloCodegenLib/CLIExtractor.swift @@ -70,11 +70,11 @@ struct CLIExtractor { } let contents = try String(contentsOf: shasumFileURL, encoding: .utf8) - + guard contents == expected else { return contents.hasPrefix(expected) } - + return true } @@ -100,7 +100,7 @@ struct CLIExtractor { static func writeSHASUMToFile(apolloFolderURL: URL) throws { let shasumFileURL = ApolloFilePathHelper.shasumFileURL(fromApollo: apolloFolderURL) try CLIExtractor.expectedSHASUM.write(to: shasumFileURL, - atomically: false, + atomically: true, encoding: .utf8) } @@ -116,7 +116,7 @@ struct CLIExtractor { CodegenLogger.log("Extracting CLI from zip file. This may take a second...") _ = try Basher.run(command: "tar xzf '\(zipFileURL.path)' -C '\(cliFolderURL.path)'", from: nil) - + let apolloFolderURL = ApolloFilePathHelper.apolloFolderURL(fromCLIFolder: cliFolderURL) let binaryFolderURL = ApolloFilePathHelper.binaryFolderURL(fromApollo: apolloFolderURL) diff --git a/Sources/ApolloSQLiteTestSupport/ApolloSQLiteTestSupport.h b/Sources/ApolloSQLiteTestSupport/ApolloSQLiteTestSupport.h deleted file mode 100644 index 20f660686a..0000000000 --- a/Sources/ApolloSQLiteTestSupport/ApolloSQLiteTestSupport.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -//! Project version number for ApolloSQLiteTestSupport. -FOUNDATION_EXPORT double ApolloSQLiteTestSupportVersionNumber; - -//! Project version string for ApolloSQLiteTestSupport. -FOUNDATION_EXPORT const unsigned char ApolloSQLiteTestSupportVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Sources/ApolloSQLiteTestSupport/Info.plist b/Sources/ApolloSQLiteTestSupport/Info.plist deleted file mode 100644 index fbe1e6b314..0000000000 --- a/Sources/ApolloSQLiteTestSupport/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Sources/ApolloTestSupport/MockURLSession.swift b/Sources/ApolloTestSupport/MockURLSession.swift index 290e70b5e9..f074af44e2 100644 --- a/Sources/ApolloTestSupport/MockURLSession.swift +++ b/Sources/ApolloTestSupport/MockURLSession.swift @@ -49,14 +49,26 @@ public final class MockURLSessionClient: URLSessionClient { completion(.success((data, response))) } } - - - let mockTask = URLSessionDataTaskMock() + + let mockTaskType: URLSessionDataTaskMockProtocol.Type = URLSessionDataTaskMock.self + let mockTask = mockTaskType.init() as! URLSessionDataTaskMock return mockTask } } -private final class URLSessionDataTaskMock: URLSessionDataTask { +protocol URLSessionDataTaskMockProtocol { + init() +} + +private final class URLSessionDataTaskMock: URLSessionDataTask, URLSessionDataTaskMockProtocol{ + + // This override is to supress the deprecation warning on macOS 10.15+. + // This deprecated method needs to be used for unit test mocking purposes only. + @available(macOS, deprecated: 10.15) + override init() { + super.init() + } + override func resume() { // No-op } diff --git a/Tests/ApolloWebsocketTests/MockWebSocket.swift b/Sources/ApolloTestSupport/MockWebSocket.swift similarity index 73% rename from Tests/ApolloWebsocketTests/MockWebSocket.swift rename to Sources/ApolloTestSupport/MockWebSocket.swift index 38f90b8a44..878f1a7da1 100644 --- a/Tests/ApolloWebsocketTests/MockWebSocket.swift +++ b/Sources/ApolloTestSupport/MockWebSocket.swift @@ -1,25 +1,23 @@ import Starscream import Foundation -import ApolloTestSupport @testable import ApolloWebSocket -class MockWebSocket: ApolloWebSocketClient { +public class MockWebSocket: ApolloWebSocketClient { - var callbackQueue: DispatchQueue = DispatchQueue.main + public var callbackQueue: DispatchQueue = DispatchQueue.main // A dummy web socket since we can't just return the client var webSocketForDelegate: WebSocket - var request: URLRequest + public var request: URLRequest - required init(request: URLRequest, + public required init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil) { self.webSocketForDelegate = WebSocket(request: request) self.request = request } - public init() { - let request = URLRequest(url: TestURL.starWarsServer.url) + public init(request: URLRequest) { self.request = request self.webSocketForDelegate = WebSocket(request: request) } @@ -48,12 +46,12 @@ class MockWebSocket: ApolloWebSocketClient { open func write(pong: Data, completion: (() -> ())?) { } - func disconnect(closeCode: UInt16) { + public func disconnect(closeCode: UInt16) { } - var delegate: WebSocketDelegate? = nil - var isConnected: Bool = false + public var delegate: WebSocketDelegate? = nil + public var isConnected: Bool = false - func connect() { + public func connect() { } } diff --git a/Tests/ApolloTests/Resources/a.txt b/Sources/ApolloTestSupport/Resources/a.txt similarity index 100% rename from Tests/ApolloTests/Resources/a.txt rename to Sources/ApolloTestSupport/Resources/a.txt diff --git a/Tests/ApolloTests/Resources/b.txt b/Sources/ApolloTestSupport/Resources/b.txt similarity index 100% rename from Tests/ApolloTests/Resources/b.txt rename to Sources/ApolloTestSupport/Resources/b.txt diff --git a/Tests/ApolloTests/Resources/c.txt b/Sources/ApolloTestSupport/Resources/c.txt similarity index 100% rename from Tests/ApolloTests/Resources/c.txt rename to Sources/ApolloTestSupport/Resources/c.txt diff --git a/Sources/ApolloSQLiteTestSupport/TestCacheProvider.swift b/Sources/ApolloTestSupport/SQLiteTestCacheProvider.swift similarity index 98% rename from Sources/ApolloSQLiteTestSupport/TestCacheProvider.swift rename to Sources/ApolloTestSupport/SQLiteTestCacheProvider.swift index 9e44960e74..55bebd166b 100644 --- a/Sources/ApolloSQLiteTestSupport/TestCacheProvider.swift +++ b/Sources/ApolloTestSupport/SQLiteTestCacheProvider.swift @@ -1,6 +1,5 @@ import Foundation import Apollo -import ApolloTestSupport import ApolloSQLite public class SQLiteTestCacheProvider: TestCacheProvider { diff --git a/Tests/ApolloTests/TestFileHelper.swift b/Sources/ApolloTestSupport/TestFileHelper.swift similarity index 69% rename from Tests/ApolloTests/TestFileHelper.swift rename to Sources/ApolloTestSupport/TestFileHelper.swift index 162c636080..f675744a33 100644 --- a/Tests/ApolloTests/TestFileHelper.swift +++ b/Sources/ApolloTestSupport/TestFileHelper.swift @@ -9,9 +9,9 @@ import Foundation import Apollo -struct TestFileHelper { +public struct TestFileHelper { - static func testParentFolder(for file: StaticString = #file) -> URL { + public static func testParentFolder(for file: StaticString = #file) -> URL { let fileAsString = file.withUTF8Buffer { String(decoding: $0, as: UTF8.self) } @@ -19,19 +19,19 @@ struct TestFileHelper { return url.deletingLastPathComponent() } - static func uploadServerFolder(from file: StaticString = #file) -> URL { + public static func uploadServerFolder(from file: StaticString = #file) -> URL { self.testParentFolder(for: file) .deletingLastPathComponent() // test root .deletingLastPathComponent() // source root .appendingPathComponent("SimpleUploadServer") } - static func uploadsFolder(from file: StaticString = #file) -> URL { + public static func uploadsFolder(from file: StaticString = #file) -> URL { self.uploadServerFolder(from: file) .appendingPathComponent("uploads") } - static func fileURLForFile(named name: String, extension fileExtension: String) -> URL { + public static func fileURLForFile(named name: String, extension fileExtension: String) -> URL { return self.testParentFolder() .appendingPathComponent("Resources") .appendingPathComponent(name) diff --git a/Sources/ApolloTestSupport/TestURLs.swift b/Sources/ApolloTestSupport/TestURLs.swift index 655f222bf6..4b1a886050 100644 --- a/Sources/ApolloTestSupport/TestURLs.swift +++ b/Sources/ApolloTestSupport/TestURLs.swift @@ -3,21 +3,15 @@ import Foundation /// URLs used in testing public enum TestURL { case mockServer - case starWarsServer - case starWarsWebSocket - case uploadServer + case mockPort8080 public var url: URL { let urlString: String switch self { - case .starWarsServer: - urlString = "http://localhost:8080/graphql" - case .starWarsWebSocket: - urlString = "ws://localhost:8080/websocket" - case .uploadServer: - urlString = "http://localhost:4000" case .mockServer: urlString = "http://localhost/dummy_url" + case .mockPort8080: + urlString = "http://localhost:8080/graphql" } return URL(string: urlString)! diff --git a/Tests/ApolloCacheDependentTests/SQLiteCacheTests.swift b/Tests/ApolloCacheDependentTests/SQLiteCacheTests.swift deleted file mode 100644 index c559a208d8..0000000000 --- a/Tests/ApolloCacheDependentTests/SQLiteCacheTests.swift +++ /dev/null @@ -1,52 +0,0 @@ -import Foundation -import ApolloTestSupport -import ApolloSQLiteTestSupport - -class SQLiteFetchQueryTests: FetchQueryTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteLoadQueryFromStoreTests: LoadQueryFromStoreTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteStarWarsServerCachingRoundtripTests: StarWarsServerCachingRoundtripTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteStarWarsServerAPQsGetMethodTests: StarWarsServerAPQsGetMethodTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteStarWarsServerAPQsTests: StarWarsServerAPQsTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteStarWarsServerTests: StarWarsServerTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteReadWriteFromStoreTests: ReadWriteFromStoreTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - -class SQLiteWatchQueryTests: WatchQueryTests { - override var cacheType: TestCacheProvider.Type { - SQLiteTestCacheProvider.self - } -} - diff --git a/Tests/ApolloCodegenTests/ApolloSchemaTests.swift b/Tests/ApolloCodegenTests/ApolloSchemaTests.swift index 433104762b..b51992950d 100644 --- a/Tests/ApolloCodegenTests/ApolloSchemaTests.swift +++ b/Tests/ApolloCodegenTests/ApolloSchemaTests.swift @@ -15,12 +15,12 @@ class ApolloSchemaTests: XCTestCase { func testCreatingIntrospectionOptionsWithDefaultParameters() throws { let sourceRoot = CodegenTestHelper.sourceRootURL() - let options = ApolloSchemaOptions(downloadMethod: .introspection(endpointURL: TestURL.starWarsServer.url), + let options = ApolloSchemaOptions(downloadMethod: .introspection(endpointURL: TestURL.mockPort8080.url), outputFolderURL: sourceRoot) let expectedOutputURL = sourceRoot.appendingPathComponent("schema.json") - XCTAssertEqual(options.downloadMethod, .introspection(endpointURL: TestURL.starWarsServer.url)) + XCTAssertEqual(options.downloadMethod, .introspection(endpointURL: TestURL.mockPort8080.url)) XCTAssertEqual(options.outputURL, expectedOutputURL) XCTAssertTrue(options.headers.isEmpty) @@ -92,7 +92,7 @@ class ApolloSchemaTests: XCTestCase { func testDownloadingSchemaAsJSON() throws { let testOutputFolderURL = CodegenTestHelper.outputFolderURL() - let options = ApolloSchemaOptions(downloadMethod: .introspection(endpointURL: TestURL.starWarsServer.url), + let options = ApolloSchemaOptions(downloadMethod: .introspection(endpointURL: TestURL.mockPort8080.url), outputFolderURL: testOutputFolderURL) // Delete anything existing at the output URL @@ -126,7 +126,7 @@ class ApolloSchemaTests: XCTestCase { let testOutputFolderURL = CodegenTestHelper.outputFolderURL() let options = ApolloSchemaOptions(schemaFileType: .schemaDefinitionLanguage, - downloadMethod: .introspection(endpointURL: TestURL.starWarsServer.url), + downloadMethod: .introspection(endpointURL: TestURL.mockPort8080.url), outputFolderURL: testOutputFolderURL) // Delete anything existing at the output URL diff --git a/Tests/ApolloSQLiteTests/Info.plist b/Tests/ApolloSQLiteTests/Info.plist deleted file mode 100644 index 6c6c23c43a..0000000000 --- a/Tests/ApolloSQLiteTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/Tests/ApolloCacheDependentTests/Info.plist b/Tests/ApolloServerIntegrationTests/Info.plist similarity index 87% rename from Tests/ApolloCacheDependentTests/Info.plist rename to Tests/ApolloServerIntegrationTests/Info.plist index 6c6c23c43a..64d65ca495 100644 --- a/Tests/ApolloCacheDependentTests/Info.plist +++ b/Tests/ApolloServerIntegrationTests/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - BNDL + $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString 1.0 CFBundleVersion diff --git a/Tests/ApolloServerIntegrationTests/LegacyInterceptorProviderIntegrationTests.swift b/Tests/ApolloServerIntegrationTests/LegacyInterceptorProviderIntegrationTests.swift new file mode 100644 index 0000000000..ce4124613d --- /dev/null +++ b/Tests/ApolloServerIntegrationTests/LegacyInterceptorProviderIntegrationTests.swift @@ -0,0 +1,77 @@ +import Apollo +import XCTest +import StarWarsAPI + +/// Tests that the `LegacyInterceptorProvider` configures an `ApolloClient` that successfully +/// communicates with an external Apollo Server. +/// +/// - Precondition: These tests will only pass if a local instance of the Star Wars server is +/// running on port 8080. +/// This server can be found at https://github.com/apollographql/starwars-server +class LegacyInterceptorProviderIntegrationTests: XCTestCase { + + var legacyClient: ApolloClient! + + override func setUp() { + let url = TestServerURL.starWarsServer.url + let store = ApolloStore() + let provider = LegacyInterceptorProvider(store: store) + let transport = RequestChainNetworkTransport(interceptorProvider: provider, + endpointURL: url) + + legacyClient = ApolloClient(networkTransport: transport, store: store) + } + + override func tearDown() { + legacyClient = nil + } + + func testLoading() { + let expectation = self.expectation(description: "loaded With legacy client") + legacyClient.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .server) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + + } + expectation.fulfill() + } + + self.wait(for: [expectation], timeout: 10) + } + + func testInitialLoadFromNetworkAndSecondaryLoadFromCache() { + let initialLoadExpectation = self.expectation(description: "loaded With legacy client") + legacyClient.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .server) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + + } + initialLoadExpectation.fulfill() + } + + self.wait(for: [initialLoadExpectation], timeout: 10) + + let secondLoadExpectation = self.expectation(description: "loaded With legacy client") + legacyClient.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .cache) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + + } + secondLoadExpectation.fulfill() + } + + self.wait(for: [secondLoadExpectation], timeout: 10) + } +} diff --git a/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift b/Tests/ApolloServerIntegrationTests/StarWarsServerCachingRoundtripTests.swift similarity index 94% rename from Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift rename to Tests/ApolloServerIntegrationTests/StarWarsServerCachingRoundtripTests.swift index 0b7b0c1f52..2096474735 100644 --- a/Tests/ApolloCacheDependentTests/StarWarsServerCachingRoundtripTests.swift +++ b/Tests/ApolloServerIntegrationTests/StarWarsServerCachingRoundtripTests.swift @@ -3,6 +3,12 @@ import XCTest import ApolloTestSupport import StarWarsAPI +class SQLiteStarWarsServerCachingRoundtripTests: StarWarsServerCachingRoundtripTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self + } +} + class StarWarsServerCachingRoundtripTests: XCTestCase, CacheDependentTesting { var cacheType: TestCacheProvider.Type { InMemoryTestCacheProvider.self @@ -21,7 +27,7 @@ class StarWarsServerCachingRoundtripTests: XCTestCase, CacheDependentTesting { store = ApolloStore(cache: cache) let provider = LegacyInterceptorProvider(store: store) let network = RequestChainNetworkTransport(interceptorProvider: provider, - endpointURL: TestURL.starWarsServer.url) + endpointURL: TestServerURL.starWarsServer.url) client = ApolloClient(networkTransport: network, store: store) } diff --git a/Tests/ApolloCacheDependentTests/StarWarsServerTests.swift b/Tests/ApolloServerIntegrationTests/StarWarsServerTests.swift similarity index 88% rename from Tests/ApolloCacheDependentTests/StarWarsServerTests.swift rename to Tests/ApolloServerIntegrationTests/StarWarsServerTests.swift index b2f766269e..10e36789b6 100644 --- a/Tests/ApolloCacheDependentTests/StarWarsServerTests.swift +++ b/Tests/ApolloServerIntegrationTests/StarWarsServerTests.swift @@ -3,69 +3,39 @@ import XCTest import ApolloTestSupport import StarWarsAPI - -protocol TestConfig { - func network(store: ApolloStore) -> NetworkTransport -} - -class DefaultConfig: TestConfig { - - func transport(with store: ApolloStore) -> NetworkTransport { - let provider = LegacyInterceptorProvider(store: store) - return RequestChainNetworkTransport(interceptorProvider: provider, - endpointURL: TestURL.starWarsServer.url) - } - - func network(store: ApolloStore) -> NetworkTransport { - return transport(with: store) +class StarWarsServerAPQsGetMethodTests: StarWarsServerTests { + override func setUp() { + super.setUp() + config = APQsWithGetMethodConfig() } } -class APQsConfig: TestConfig { - - func transport(with store: ApolloStore) -> NetworkTransport { - let provider = LegacyInterceptorProvider(store: store) - return RequestChainNetworkTransport(interceptorProvider: provider, - endpointURL: TestURL.starWarsServer.url, - autoPersistQueries: true) - } - - func network(store: ApolloStore) -> NetworkTransport { - return transport(with: store) +class StarWarsServerAPQsTests: StarWarsServerTests { + override func setUp() { + super.setUp() + config = APQsConfig() } } -class APQsWithGetMethodConfig: TestConfig { - - func transport(with store: ApolloStore) -> NetworkTransport { - let provider = LegacyInterceptorProvider(store: store) - return RequestChainNetworkTransport(interceptorProvider: provider, - endpointURL: TestURL.starWarsServer.url, - autoPersistQueries: true, - useGETForPersistedQueryRetry: true) - } - - func network(store: ApolloStore) -> NetworkTransport { - return transport(with: store) +class SQLiteStarWarsServerAPQsGetMethodTests: StarWarsServerAPQsGetMethodTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self } } -class StarWarsServerAPQsGetMethodTests: StarWarsServerTests { - override func setUp() { - super.setUp() - config = APQsWithGetMethodConfig() +class SQLiteStarWarsServerAPQsTests: StarWarsServerAPQsTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self } } -class StarWarsServerAPQsTests: StarWarsServerTests { - override func setUp() { - super.setUp() - config = APQsConfig() +class SQLiteStarWarsServerTests: StarWarsServerTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self } } class StarWarsServerTests: XCTestCase, CacheDependentTesting { - // MARK: Queries var config: TestConfig! var cacheType: TestCacheProvider.Type { @@ -94,6 +64,8 @@ class StarWarsServerTests: XCTestCase, CacheDependentTesting { try super.tearDownWithError() } + + // MARK: Queries func testHeroNameQuery() { fetch(query: HeroNameQuery()) { data in diff --git a/Tests/ApolloWebsocketTests/StarWarsSubscriptionTests.swift b/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift similarity index 99% rename from Tests/ApolloWebsocketTests/StarWarsSubscriptionTests.swift rename to Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift index e9e36183d1..c7656db1c3 100644 --- a/Tests/ApolloWebsocketTests/StarWarsSubscriptionTests.swift +++ b/Tests/ApolloServerIntegrationTests/StarWarsSubscriptionTests.swift @@ -21,7 +21,7 @@ class StarWarsSubscriptionTests: XCTestCase { self.connectionStartedExpectation = self.expectation(description: "Web socket connected") WebSocketTransport.provider = ApolloWebSocket.self - webSocketTransport = WebSocketTransport(request: URLRequest(url: TestURL.starWarsWebSocket.url)) + webSocketTransport = WebSocketTransport(request: URLRequest(url: TestServerURL.starWarsWebSocket.url)) webSocketTransport.delegate = self client = ApolloClient(networkTransport: webSocketTransport, store: ApolloStore()) @@ -392,7 +392,7 @@ class StarWarsSubscriptionTests: XCTestCase { func testConcurrentConnectAndCloseConnection() { WebSocketTransport.provider = MockWebSocket.self - let webSocketTransport = WebSocketTransport(request: URLRequest(url: TestURL.starWarsWebSocket.url)) + let webSocketTransport = WebSocketTransport(request: URLRequest(url: TestServerURL.starWarsWebSocket.url)) let expectation = self.expectation(description: "Connection closed") expectation.expectedFulfillmentCount = 2 @@ -419,7 +419,7 @@ class StarWarsSubscriptionTests: XCTestCase { let store = ApolloStore() let interceptorProvider = LegacyInterceptorProvider(store: store) let alternateTransport = RequestChainNetworkTransport(interceptorProvider: interceptorProvider, - endpointURL: TestURL.starWarsServer.url) + endpointURL: TestServerURL.starWarsServer.url) let alternateClient = ApolloClient(networkTransport: alternateTransport, store: store) func sendReview() { diff --git a/Tests/ApolloWebsocketTests/StarWarsWebSocketTests.swift b/Tests/ApolloServerIntegrationTests/StarWarsWebSocketTests.swift similarity index 99% rename from Tests/ApolloWebsocketTests/StarWarsWebSocketTests.swift rename to Tests/ApolloServerIntegrationTests/StarWarsWebSocketTests.swift index 2f9e84e1e8..a17959d1f5 100755 --- a/Tests/ApolloWebsocketTests/StarWarsWebSocketTests.swift +++ b/Tests/ApolloServerIntegrationTests/StarWarsWebSocketTests.swift @@ -21,7 +21,7 @@ class StarWarsWebSocketTests: XCTestCase, CacheDependentTesting { cache = try makeNormalizedCache() let store = ApolloStore(cache: cache) - let networkTransport = WebSocketTransport(request: URLRequest(url: TestURL.starWarsWebSocket.url)) + let networkTransport = WebSocketTransport(request: URLRequest(url: TestServerURL.starWarsWebSocket.url)) client = ApolloClient(networkTransport: networkTransport, store: store) } diff --git a/Tests/ApolloTests/HTTPBinAPI.swift b/Tests/ApolloServerIntegrationTests/TestHelpers/HTTPBinAPI.swift similarity index 100% rename from Tests/ApolloTests/HTTPBinAPI.swift rename to Tests/ApolloServerIntegrationTests/TestHelpers/HTTPBinAPI.swift diff --git a/Tests/ApolloServerIntegrationTests/TestHelpers/TestConfigs.swift b/Tests/ApolloServerIntegrationTests/TestHelpers/TestConfigs.swift new file mode 100644 index 0000000000..8b04e4dfe2 --- /dev/null +++ b/Tests/ApolloServerIntegrationTests/TestHelpers/TestConfigs.swift @@ -0,0 +1,47 @@ +@testable import Apollo + +protocol TestConfig { + func network(store: ApolloStore) -> NetworkTransport +} + +class DefaultConfig: TestConfig { + + func transport(with store: ApolloStore) -> NetworkTransport { + let provider = LegacyInterceptorProvider(store: store) + return RequestChainNetworkTransport(interceptorProvider: provider, + endpointURL: TestServerURL.starWarsServer.url) + } + + func network(store: ApolloStore) -> NetworkTransport { + return transport(with: store) + } +} + +class APQsConfig: TestConfig { + + func transport(with store: ApolloStore) -> NetworkTransport { + let provider = LegacyInterceptorProvider(store: store) + return RequestChainNetworkTransport(interceptorProvider: provider, + endpointURL: TestServerURL.starWarsServer.url, + autoPersistQueries: true) + } + + func network(store: ApolloStore) -> NetworkTransport { + return transport(with: store) + } +} + +class APQsWithGetMethodConfig: TestConfig { + + func transport(with store: ApolloStore) -> NetworkTransport { + let provider = LegacyInterceptorProvider(store: store) + return RequestChainNetworkTransport(interceptorProvider: provider, + endpointURL: TestServerURL.starWarsServer.url, + autoPersistQueries: true, + useGETForPersistedQueryRetry: true) + } + + func network(store: ApolloStore) -> NetworkTransport { + return transport(with: store) + } +} diff --git a/Tests/ApolloServerIntegrationTests/TestHelpers/TestServerURLs.swift b/Tests/ApolloServerIntegrationTests/TestHelpers/TestServerURLs.swift new file mode 100644 index 0000000000..4b76b04eff --- /dev/null +++ b/Tests/ApolloServerIntegrationTests/TestHelpers/TestServerURLs.swift @@ -0,0 +1,13 @@ +/// Local URLs for servers used in integration testing +import Foundation + +public enum TestServerURL: String { + case mockServer = "http://localhost/dummy_url" + case starWarsServer = "http://localhost:8080/graphql" + case starWarsWebSocket = "ws://localhost:8080/websocket" + case uploadServer = "http://localhost:4000" + + public var url: URL { + return URL(string: self.rawValue)! + } +} diff --git a/Tests/ApolloTests/URLSessionClientTests.swift b/Tests/ApolloServerIntegrationTests/URLSessionClientTests.swift similarity index 100% rename from Tests/ApolloTests/URLSessionClientTests.swift rename to Tests/ApolloServerIntegrationTests/URLSessionClientTests.swift diff --git a/Tests/ApolloTests/UploadTests.swift b/Tests/ApolloServerIntegrationTests/UploadTests.swift similarity index 59% rename from Tests/ApolloTests/UploadTests.swift rename to Tests/ApolloServerIntegrationTests/UploadTests.swift index 7bdb704a51..da2faabe3c 100644 --- a/Tests/ApolloTests/UploadTests.swift +++ b/Tests/ApolloServerIntegrationTests/UploadTests.swift @@ -5,9 +5,9 @@ import UploadAPI import StarWarsAPI class UploadTests: XCTestCase { - - let uploadClientURL = TestURL.uploadServer.url - + + let uploadClientURL = TestServerURL.uploadServer.url + lazy var client: ApolloClient = { let store = ApolloStore() let provider = LegacyInterceptorProvider(store: store) @@ -16,20 +16,20 @@ class UploadTests: XCTestCase { additionalHeaders: ["headerKey": "headerValue"]) transport.clientName = "test" transport.clientVersion = "test" - + return ApolloClient(networkTransport: transport, store: store) }() - + override static func tearDown() { // Recreate the uploads folder at the end of all tests in this suite to avoid having one billion files in there recreateUploadsFolder() super.tearDown() } - + private static func recreateUploadsFolder() { let uploadsFolderURL = TestFileHelper.uploadsFolder() try? FileManager.default.removeItem(at: uploadsFolderURL) - + try? FileManager.default.createDirectory(at: uploadsFolderURL, withIntermediateDirectories: false) } @@ -43,12 +43,12 @@ class UploadTests: XCTestCase { line: line) return } - + let sanitizedPath = String(path.dropFirst(2)) // Gets rid of the ./ returned by the server - + let uploadedFileURL = TestFileHelper.uploadServerFolder() .appendingPathComponent(sanitizedPath) - + do { let initialData = try Data(contentsOf: initialFileURL) let uploadedData = try Data(contentsOf: uploadedFileURL) @@ -71,22 +71,22 @@ class UploadTests: XCTestCase { line: line) } } - + func testUploadingASingleFile() throws { let fileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - + let file = try GraphQLFile(fieldName: "file", originalName: "a.txt", fileURL: fileURL) - + let upload = UploadOneFileMutation(file: "a.txt") - + let expectation = self.expectation(description: "File upload complete") self.client.upload(operation: upload, files: [file]) { result in defer { expectation.fulfill() } - + switch result { case .success(let graphQLResult): XCTAssertEqual(graphQLResult.data?.singleUpload.filename, "a.txt") @@ -95,40 +95,40 @@ class UploadTests: XCTestCase { XCTFail("Unexpected upload error: \(error)") } } - + self.wait(for: [expectation], timeout: 10) } - + func testUploadingMultipleFilesWithTheSameFieldName() throws { let firstFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - + let firstFile = try GraphQLFile(fieldName: "files", originalName: "a.txt", fileURL: firstFileURL) - + let secondFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") - + let secondFile = try GraphQLFile(fieldName: "files", originalName: "b.txt", fileURL: secondFileURL) - + let files = [firstFile, secondFile] - + let upload = UploadMultipleFilesToTheSameParameterMutation(files: files.map { $0.originalName }) - + let expectation = self.expectation(description: "File upload complete") self.client.upload(operation: upload, files: files) { result in defer { expectation.fulfill() } - + switch result { case .success(let graphQLResult): guard let uploads = graphQLResult.data?.multipleUpload else { XCTFail("NOPE") return } - + XCTAssertEqual(uploads.count, 2) let sortedUploads = uploads.sorted { $0.filename < $1.filename } XCTAssertEqual(sortedUploads[0].filename, "a.txt") @@ -139,50 +139,50 @@ class UploadTests: XCTestCase { XCTFail("Unexpected upload error: \(error)") } } - + self.wait(for: [expectation], timeout: 10) } - + func testUploadingMultipleFilesWithDifferentFieldNames() throws { let firstFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - + let firstFile = try GraphQLFile(fieldName: "singleFile", originalName: "a.txt", fileURL: firstFileURL) - + let secondFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") - + let secondFile = try GraphQLFile(fieldName: "multipleFiles", originalName: "b.txt", fileURL: secondFileURL) - + let thirdFileURL = TestFileHelper.fileURLForFile(named: "c", extension: "txt") - + let thirdFile = try GraphQLFile(fieldName: "multipleFiles", originalName: "c.txt", fileURL: thirdFileURL) - + // This is the array of Files for the `multipleFiles` parameter only let multipleFiles = [secondFile, thirdFile] let upload = UploadMultipleFilesToDifferentParametersMutation(singleFile: firstFile.originalName, multipleFiles: multipleFiles.map { $0.originalName }) - + let expectation = self.expectation(description: "File upload complete") - + // This is the array of Files for all parameters let allFiles = [firstFile, secondFile, thirdFile] self.client.upload(operation: upload, files: allFiles) { result in defer { expectation.fulfill() } - + switch result { case .success(let graphQLResult): guard let uploads = graphQLResult.data?.multipleParameterUpload else { XCTFail("NOPE") return } - + XCTAssertEqual(uploads.count, 3) let sortedUploads = uploads.sorted { $0.filename < $1.filename } XCTAssertEqual(sortedUploads[0].filename, "a.txt") @@ -195,84 +195,84 @@ class UploadTests: XCTestCase { XCTFail("Unexpected upload error: \(error)") } } - + self.wait(for: [expectation], timeout: 10) } - + func testUploadingASingleFileInAnArray() throws { let fileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - + let file = try GraphQLFile(fieldName: "files", originalName: "a.txt", fileURL: fileURL) - + let filesArray = [file] - + let uploadMutation = UploadMultipleFilesToTheSameParameterMutation(files: filesArray.map { $0.originalName }) - + let expectation = self.expectation(description: "File upload complete") self.client.upload(operation: uploadMutation, files: filesArray) { result in defer { expectation.fulfill() } - + switch result { case .success(let graphQLResult): guard let uploads = graphQLResult.data?.multipleUpload else { XCTFail("NOPE") return } - + XCTAssertEqual(uploads.count, 1) guard let uploadedFile = uploads.first else { XCTFail("Could not access uploaded file!") return } - + XCTAssertEqual(uploadedFile.filename, "a.txt") self.compareInitialFile(at: fileURL, toUploadedFileAt: uploadedFile.path) case .failure(let error): XCTFail("Unexpected upload error: \(error)") } } - + self.wait(for: [expectation], timeout: 10) } - + func testUploadingSingleFileInAnArrayWithAnotherFileForAnotherField() throws { let firstFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - + let firstFile = try GraphQLFile(fieldName: "singleFile", originalName: "a.txt", fileURL: firstFileURL) - + let secondFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") - + let secondFile = try GraphQLFile(fieldName: "multipleFiles", originalName: "b.txt", fileURL: secondFileURL) - + // This is the array of Files for the `multipleFiles` parameter only let multipleFiles = [secondFile] let upload = UploadMultipleFilesToDifferentParametersMutation(singleFile: firstFile.originalName, multipleFiles: multipleFiles.map { $0.originalName }) - + let expectation = self.expectation(description: "File upload complete") - + // This is the array of Files for all parameters let allFiles = [firstFile, secondFile] self.client.upload(operation: upload, files: allFiles) { result in defer { expectation.fulfill() } - + switch result { case .success(let graphQLResult): guard let uploads = graphQLResult.data?.multipleParameterUpload else { XCTFail("NOPE") return } - + XCTAssertEqual(uploads.count, 2) let sortedUploads = uploads.sorted { $0.filename < $1.filename } XCTAssertEqual(sortedUploads[0].filename, "a.txt") @@ -283,171 +283,8 @@ class UploadTests: XCTestCase { XCTFail("Unexpected upload error: \(error)") } } - - self.wait(for: [expectation], timeout: 10) - } - - // MARK: - UploadRequest - - - func testSingleFileWithUploadRequest() throws { - let alphaFileUrl = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - - let alphaFile = try GraphQLFile(fieldName: "file", - originalName: "a.txt", - mimeType: "text/plain", - fileURL: alphaFileUrl) - let operation = UploadOneFileMutation(file: alphaFile.originalName) - - let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) - - let httpRequest = transport.constructUploadRequest(for: operation, - with: [alphaFile], - manualBoundary: "TEST.BOUNDARY") - let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) - - let urlRequest = try uploadRequest.toURLRequest() - XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") - - let formData = try uploadRequest.requestMultipartFormData() - let stringToCompare = try formData.toTestString() - - let expectedString = """ ---TEST.BOUNDARY -Content-Disposition: form-data; name="operations" - -{"id":"c5d5919f77d9ba16a9689b6b0ad4b781cb05dc1dc4812623bf80f7c044c09533","operationName":"UploadOneFile","query":"mutation UploadOneFile($file: Upload!) {\\n singleUpload(file: $file) {\\n __typename\\n id\\n path\\n filename\\n mimetype\\n }\\n}","variables":{"file":null}} ---TEST.BOUNDARY -Content-Disposition: form-data; name="map" - -{"0":["variables.file"]} ---TEST.BOUNDARY -Content-Disposition: form-data; name="0"; filename="a.txt" -Content-Type: text/plain - -Alpha file content. - ---TEST.BOUNDARY-- -""" - - XCTAssertEqual(stringToCompare, expectedString) - } - func testMultipleFilesWithUploadRequest() throws { - let alphaFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - let alphaFile = try GraphQLFile(fieldName: "files", - originalName: "a.txt", - mimeType: "text/plain", - fileURL: alphaFileURL) - - let betaFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") - let betaFile = try GraphQLFile(fieldName: "files", - originalName: "b.txt", - mimeType: "text/plain", - fileURL: betaFileURL) - - let files = [alphaFile, betaFile] - let operation = UploadMultipleFilesToTheSameParameterMutation(files: files.map { $0.originalName }) - let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) - - let httpRequest = transport.constructUploadRequest(for: operation, - with: [alphaFile, betaFile], - manualBoundary: "TEST.BOUNDARY") - let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) - - let urlRequest = try uploadRequest.toURLRequest() - XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") - - let multipartData = try uploadRequest.requestMultipartFormData() - let stringToCompare = try multipartData.toTestString() - - let expectedString = """ ---TEST.BOUNDARY -Content-Disposition: form-data; name="operations" - -{"id":"88858c283bb72f18c0049dc85b140e72a4046f469fa16a8bf4bcf01c11d8a2b7","operationName":"UploadMultipleFilesToTheSameParameter","query":"mutation UploadMultipleFilesToTheSameParameter($files: [Upload!]!) {\\n multipleUpload(files: $files) {\\n __typename\\n id\\n path\\n filename\\n mimetype\\n }\\n}","variables":{"files":[null,null]}} ---TEST.BOUNDARY -Content-Disposition: form-data; name="map" - -{"0":["variables.files.0"],"1":["variables.files.1"]} ---TEST.BOUNDARY -Content-Disposition: form-data; name="0"; filename="a.txt" -Content-Type: text/plain - -Alpha file content. - ---TEST.BOUNDARY -Content-Disposition: form-data; name="1"; filename="b.txt" -Content-Type: text/plain - -Bravo file content. - ---TEST.BOUNDARY-- -""" - XCTAssertEqual(stringToCompare, expectedString) + self.wait(for: [expectation], timeout: 10) } - func testMultipleFilesWithMultipleFieldsWithUploadRequest() throws { - let alphaFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") - let alphaFile = try GraphQLFile(fieldName: "uploads", - originalName: "a.txt", - mimeType: "text/plain", - fileURL: alphaFileURL) - - let betaFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") - let betaFile = try GraphQLFile(fieldName: "uploads", - originalName: "b.txt", - mimeType: "text/plain", - fileURL: betaFileURL) - - let charlieFileUrl = TestFileHelper.fileURLForFile(named: "c", extension: "txt") - let charlieFile = try GraphQLFile(fieldName: "secondField", - originalName: "c.txt", - mimeType: "text/plain", - fileURL: charlieFileUrl) - - let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) - - let httpRequest = transport.constructUploadRequest(for: HeroNameQuery(), - with: [alphaFile, betaFile, charlieFile], - manualBoundary: "TEST.BOUNDARY") - let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) - - let urlRequest = try uploadRequest.toURLRequest() - XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") - - let multipartData = try uploadRequest.requestMultipartFormData() - let stringToCompare = try multipartData.toTestString() - - let expectedString = """ ---TEST.BOUNDARY -Content-Disposition: form-data; name="operations" - -{"id":"f6e76545cd03aa21368d9969cb39447f6e836a16717823281803778e7805d671","operationName":"HeroName","query":"query HeroName($episode: Episode) {\\n hero(episode: $episode) {\\n __typename\\n name\\n }\\n}","variables":{"episode":null,\"secondField\":null,\"uploads\":null}} ---TEST.BOUNDARY -Content-Disposition: form-data; name="map" - -{"0":["variables.secondField"],"1":["variables.uploads.0"],"2":["variables.uploads.1"]} ---TEST.BOUNDARY -Content-Disposition: form-data; name="0"; filename="c.txt" -Content-Type: text/plain - -Charlie file content. - ---TEST.BOUNDARY -Content-Disposition: form-data; name="1"; filename="a.txt" -Content-Type: text/plain - -Alpha file content. - ---TEST.BOUNDARY -Content-Disposition: form-data; name="2"; filename="b.txt" -Content-Type: text/plain - -Bravo file content. - ---TEST.BOUNDARY-- -""" - XCTAssertEqual(stringToCompare, expectedString) - } } diff --git a/Tests/ApolloTests/AutomaticPersistedQueriesTests.swift b/Tests/ApolloTests/AutomaticPersistedQueriesTests.swift index 041bff8caa..ad53c1fed3 100644 --- a/Tests/ApolloTests/AutomaticPersistedQueriesTests.swift +++ b/Tests/ApolloTests/AutomaticPersistedQueriesTests.swift @@ -5,7 +5,7 @@ import StarWarsAPI class AutomaticPersistedQueriesTests: XCTestCase { - private final let endpoint = TestURL.starWarsServer.url + private final let endpoint = TestURL.mockServer.url // MARK: - Helper Methods diff --git a/Tests/ApolloCacheDependentTests/CacheDependentInterceptorTests.swift b/Tests/ApolloTests/Cache/CacheDependentInterceptorTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/CacheDependentInterceptorTests.swift rename to Tests/ApolloTests/Cache/CacheDependentInterceptorTests.swift diff --git a/Tests/ApolloCacheDependentTests/FetchQueryTests.swift b/Tests/ApolloTests/Cache/FetchQueryTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/FetchQueryTests.swift rename to Tests/ApolloTests/Cache/FetchQueryTests.swift diff --git a/Tests/ApolloCacheDependentTests/LoadQueryFromStoreTests.swift b/Tests/ApolloTests/Cache/LoadQueryFromStoreTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/LoadQueryFromStoreTests.swift rename to Tests/ApolloTests/Cache/LoadQueryFromStoreTests.swift diff --git a/Tests/ApolloCacheDependentTests/ReadWriteFromStoreTests.swift b/Tests/ApolloTests/Cache/ReadWriteFromStoreTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/ReadWriteFromStoreTests.swift rename to Tests/ApolloTests/Cache/ReadWriteFromStoreTests.swift diff --git a/Tests/ApolloSQLiteTests/CachePersistenceTests.swift b/Tests/ApolloTests/Cache/SQLite/CachePersistenceTests.swift similarity index 99% rename from Tests/ApolloSQLiteTests/CachePersistenceTests.swift rename to Tests/ApolloTests/Cache/SQLite/CachePersistenceTests.swift index 1cfe28666d..3e9fbd688d 100644 --- a/Tests/ApolloSQLiteTests/CachePersistenceTests.swift +++ b/Tests/ApolloTests/Cache/SQLite/CachePersistenceTests.swift @@ -2,7 +2,6 @@ import XCTest @testable import Apollo @testable import ApolloSQLite import ApolloTestSupport -import ApolloSQLiteTestSupport import StarWarsAPI import SQLite diff --git a/Tests/ApolloTests/Cache/SQLite/SQLiteCacheTests.swift b/Tests/ApolloTests/Cache/SQLite/SQLiteCacheTests.swift new file mode 100644 index 0000000000..9d6eb81c43 --- /dev/null +++ b/Tests/ApolloTests/Cache/SQLite/SQLiteCacheTests.swift @@ -0,0 +1,29 @@ +import Foundation +import ApolloTestSupport + +// These test cases inherit all tests from their superclasses. + +class SQLiteFetchQueryTests: FetchQueryTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self + } +} + +class SQLiteLoadQueryFromStoreTests: LoadQueryFromStoreTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self + } +} + +class SQLiteReadWriteFromStoreTests: ReadWriteFromStoreTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self + } +} + +class SQLiteWatchQueryTests: WatchQueryTests { + override var cacheType: TestCacheProvider.Type { + SQLiteTestCacheProvider.self + } +} + diff --git a/Tests/ApolloCacheDependentTests/StoreConcurrencyTests.swift b/Tests/ApolloTests/Cache/StoreConcurrencyTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/StoreConcurrencyTests.swift rename to Tests/ApolloTests/Cache/StoreConcurrencyTests.swift diff --git a/Tests/ApolloCacheDependentTests/WatchQueryTests.swift b/Tests/ApolloTests/Cache/WatchQueryTests.swift similarity index 100% rename from Tests/ApolloCacheDependentTests/WatchQueryTests.swift rename to Tests/ApolloTests/Cache/WatchQueryTests.swift diff --git a/Tests/ApolloTests/GETTransformerTests.swift b/Tests/ApolloTests/GETTransformerTests.swift index c2f36fca30..b884bc2959 100644 --- a/Tests/ApolloTests/GETTransformerTests.swift +++ b/Tests/ApolloTests/GETTransformerTests.swift @@ -13,7 +13,7 @@ import StarWarsAPI class GETTransformerTests: XCTestCase { private let requestBodyCreator = ApolloRequestBodyCreator() - private lazy var url = TestURL.starWarsServer.url + private lazy var url = TestURL.mockPort8080.url func testEncodingQueryWithSingleParameter() { let operation = HeroNameQuery(episode: .empire) diff --git a/Tests/ApolloTests/GraphQLFileTests.swift b/Tests/ApolloTests/GraphQLFileTests.swift index 519d64b7af..eba49c8d5c 100644 --- a/Tests/ApolloTests/GraphQLFileTests.swift +++ b/Tests/ApolloTests/GraphQLFileTests.swift @@ -9,6 +9,7 @@ import XCTest @testable import Apollo +import ApolloTestSupport class GraphQLFileTests: XCTestCase { diff --git a/Tests/ApolloTests/LegacyInterceptorProviderTests.swift b/Tests/ApolloTests/LegacyInterceptorProviderTests.swift new file mode 100644 index 0000000000..11c2acb5d8 --- /dev/null +++ b/Tests/ApolloTests/LegacyInterceptorProviderTests.swift @@ -0,0 +1,83 @@ +import XCTest +import Apollo +import ApolloTestSupport +import StarWarsAPI + +class LegacyInterceptorProviderTests: XCTestCase { + + var client: ApolloClient! + var mockServer: MockGraphQLServer! + + static let mockData: JSONObject = [ + "data": [ + "hero": [ + "name": "R2-D2", + "__typename": "Droid" + ] + ] + ] + + override func setUp() { + mockServer = MockGraphQLServer() + let store = ApolloStore() + let networkTransport = MockNetworkTransport(server: mockServer, store: store) + client = ApolloClient(networkTransport: networkTransport, store: store) + } + + override func tearDown() { + client = nil + } + + func testLoading() { + let expectation = mockServer.expect(HeroNameQuery.self) { _ in + LegacyInterceptorProviderTests.mockData + } + + client.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .server) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + } + } + + self.wait(for: [expectation], timeout: 10) + } + + func testInitialLoadFromNetworkAndSecondaryLoadFromCache() { + let initialLoadExpectation = mockServer.expect(HeroNameQuery.self) { _ in + LegacyInterceptorProviderTests.mockData + } + initialLoadExpectation.assertForOverFulfill = false + + client.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .server) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + } + } + + self.wait(for: [initialLoadExpectation], timeout: 10) + + let secondLoadExpectation = self.expectation(description: "loaded With legacy client") + + client.fetch(query: HeroNameQuery()) { result in + switch result { + case .success(let graphQLResult): + XCTAssertEqual(graphQLResult.source, .cache) + XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") + case .failure(let error): + XCTFail("Unexpected error: \(error)") + + } + secondLoadExpectation.fulfill() + } + + self.wait(for: [secondLoadExpectation], timeout: 10) + } +} diff --git a/Tests/ApolloTests/MultipartFormDataTests.swift b/Tests/ApolloTests/MultipartFormDataTests.swift index b8dbc8c8f0..32ab2a2806 100644 --- a/Tests/ApolloTests/MultipartFormDataTests.swift +++ b/Tests/ApolloTests/MultipartFormDataTests.swift @@ -8,6 +8,7 @@ import XCTest import Apollo +import ApolloTestSupport class MultipartFormDataTests: XCTestCase { func testSingleFile() throws { diff --git a/Tests/ApolloTests/RequestChainTests.swift b/Tests/ApolloTests/RequestChainTests.swift index ddb007461c..3fbe59fb1c 100644 --- a/Tests/ApolloTests/RequestChainTests.swift +++ b/Tests/ApolloTests/RequestChainTests.swift @@ -12,66 +12,7 @@ import ApolloTestSupport import StarWarsAPI class RequestChainTests: XCTestCase { - - lazy var legacyClient: ApolloClient = { - let url = TestURL.starWarsServer.url - let store = ApolloStore() - let provider = LegacyInterceptorProvider(store: store) - let transport = RequestChainNetworkTransport(interceptorProvider: provider, - endpointURL: url) - - return ApolloClient(networkTransport: transport, store: store) - }() - - func testLoading() { - let expectation = self.expectation(description: "loaded With legacy client") - legacyClient.fetch(query: HeroNameQuery()) { result in - switch result { - case .success(let graphQLResult): - XCTAssertEqual(graphQLResult.source, .server) - XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") - case .failure(let error): - XCTFail("Unexpected error: \(error)") - - } - expectation.fulfill() - } - - self.wait(for: [expectation], timeout: 10) - } - - func testInitialLoadFromNetworkAndSecondaryLoadFromCache() { - let initialLoadExpectation = self.expectation(description: "loaded With legacy client") - legacyClient.fetch(query: HeroNameQuery()) { result in - switch result { - case .success(let graphQLResult): - XCTAssertEqual(graphQLResult.source, .server) - XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") - case .failure(let error): - XCTFail("Unexpected error: \(error)") - - } - initialLoadExpectation.fulfill() - } - - self.wait(for: [initialLoadExpectation], timeout: 10) - - let secondLoadExpectation = self.expectation(description: "loaded With legacy client") - legacyClient.fetch(query: HeroNameQuery()) { result in - switch result { - case .success(let graphQLResult): - XCTAssertEqual(graphQLResult.source, .cache) - XCTAssertEqual(graphQLResult.data?.hero?.name, "R2-D2") - case .failure(let error): - XCTFail("Unexpected error: \(error)") - - } - secondLoadExpectation.fulfill() - } - - self.wait(for: [secondLoadExpectation], timeout: 10) - } - + func testEmptyInterceptorArrayReturnsCorrectError() { class TestProvider: InterceptorProvider { func interceptors(for operation: Operation) -> [ApolloInterceptor] { diff --git a/Tests/ApolloTests/UploadRequestTests.swift b/Tests/ApolloTests/UploadRequestTests.swift new file mode 100644 index 0000000000..50347ca469 --- /dev/null +++ b/Tests/ApolloTests/UploadRequestTests.swift @@ -0,0 +1,181 @@ +import XCTest +@testable import Apollo +import ApolloTestSupport +import UploadAPI +import StarWarsAPI + +class UploadRequestTests: XCTestCase { + + lazy var client: ApolloClient = { + let store = ApolloStore() + let provider = LegacyInterceptorProvider(store: store) + let transport = RequestChainNetworkTransport(interceptorProvider: provider, + endpointURL: URL(string: "http://www.test.com")!, + additionalHeaders: ["headerKey": "headerValue"]) + transport.clientName = "test" + transport.clientVersion = "test" + + return ApolloClient(networkTransport: transport, store: store) + }() + + func testSingleFileWithUploadRequest() throws { + let alphaFileUrl = TestFileHelper.fileURLForFile(named: "a", extension: "txt") + + let alphaFile = try GraphQLFile(fieldName: "file", + originalName: "a.txt", + mimeType: "text/plain", + fileURL: alphaFileUrl) + let operation = UploadOneFileMutation(file: alphaFile.originalName) + + let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) + + let httpRequest = transport.constructUploadRequest(for: operation, + with: [alphaFile], + manualBoundary: "TEST.BOUNDARY") + let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) + + let urlRequest = try uploadRequest.toURLRequest() + XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") + + let formData = try uploadRequest.requestMultipartFormData() + let stringToCompare = try formData.toTestString() + + let expectedString = """ +--TEST.BOUNDARY +Content-Disposition: form-data; name="operations" + +{"id":"c5d5919f77d9ba16a9689b6b0ad4b781cb05dc1dc4812623bf80f7c044c09533","operationName":"UploadOneFile","query":"mutation UploadOneFile($file: Upload!) {\\n singleUpload(file: $file) {\\n __typename\\n id\\n path\\n filename\\n mimetype\\n }\\n}","variables":{"file":null}} +--TEST.BOUNDARY +Content-Disposition: form-data; name="map" + +{"0":["variables.file"]} +--TEST.BOUNDARY +Content-Disposition: form-data; name="0"; filename="a.txt" +Content-Type: text/plain + +Alpha file content. + +--TEST.BOUNDARY-- +""" + + XCTAssertEqual(stringToCompare, expectedString) + } + + func testMultipleFilesWithUploadRequest() throws { + let alphaFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") + let alphaFile = try GraphQLFile(fieldName: "files", + originalName: "a.txt", + mimeType: "text/plain", + fileURL: alphaFileURL) + + let betaFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") + let betaFile = try GraphQLFile(fieldName: "files", + originalName: "b.txt", + mimeType: "text/plain", + fileURL: betaFileURL) + + let files = [alphaFile, betaFile] + let operation = UploadMultipleFilesToTheSameParameterMutation(files: files.map { $0.originalName }) + let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) + + let httpRequest = transport.constructUploadRequest(for: operation, + with: [alphaFile, betaFile], + manualBoundary: "TEST.BOUNDARY") + let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) + + let urlRequest = try uploadRequest.toURLRequest() + XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") + + let multipartData = try uploadRequest.requestMultipartFormData() + let stringToCompare = try multipartData.toTestString() + + let expectedString = """ +--TEST.BOUNDARY +Content-Disposition: form-data; name="operations" + +{"id":"88858c283bb72f18c0049dc85b140e72a4046f469fa16a8bf4bcf01c11d8a2b7","operationName":"UploadMultipleFilesToTheSameParameter","query":"mutation UploadMultipleFilesToTheSameParameter($files: [Upload!]!) {\\n multipleUpload(files: $files) {\\n __typename\\n id\\n path\\n filename\\n mimetype\\n }\\n}","variables":{"files":[null,null]}} +--TEST.BOUNDARY +Content-Disposition: form-data; name="map" + +{"0":["variables.files.0"],"1":["variables.files.1"]} +--TEST.BOUNDARY +Content-Disposition: form-data; name="0"; filename="a.txt" +Content-Type: text/plain + +Alpha file content. + +--TEST.BOUNDARY +Content-Disposition: form-data; name="1"; filename="b.txt" +Content-Type: text/plain + +Bravo file content. + +--TEST.BOUNDARY-- +""" + XCTAssertEqual(stringToCompare, expectedString) + } + + func testMultipleFilesWithMultipleFieldsWithUploadRequest() throws { + let alphaFileURL = TestFileHelper.fileURLForFile(named: "a", extension: "txt") + let alphaFile = try GraphQLFile(fieldName: "uploads", + originalName: "a.txt", + mimeType: "text/plain", + fileURL: alphaFileURL) + + let betaFileURL = TestFileHelper.fileURLForFile(named: "b", extension: "txt") + let betaFile = try GraphQLFile(fieldName: "uploads", + originalName: "b.txt", + mimeType: "text/plain", + fileURL: betaFileURL) + + let charlieFileUrl = TestFileHelper.fileURLForFile(named: "c", extension: "txt") + let charlieFile = try GraphQLFile(fieldName: "secondField", + originalName: "c.txt", + mimeType: "text/plain", + fileURL: charlieFileUrl) + + let transport = try XCTUnwrap(self.client.networkTransport as? RequestChainNetworkTransport) + + let httpRequest = transport.constructUploadRequest(for: HeroNameQuery(), + with: [alphaFile, betaFile, charlieFile], + manualBoundary: "TEST.BOUNDARY") + let uploadRequest = try XCTUnwrap(httpRequest as? UploadRequest) + + let urlRequest = try uploadRequest.toURLRequest() + XCTAssertEqual(urlRequest.allHTTPHeaderFields?["headerKey"], "headerValue") + + let multipartData = try uploadRequest.requestMultipartFormData() + let stringToCompare = try multipartData.toTestString() + + let expectedString = """ +--TEST.BOUNDARY +Content-Disposition: form-data; name="operations" + +{"id":"f6e76545cd03aa21368d9969cb39447f6e836a16717823281803778e7805d671","operationName":"HeroName","query":"query HeroName($episode: Episode) {\\n hero(episode: $episode) {\\n __typename\\n name\\n }\\n}","variables":{"episode":null,\"secondField\":null,\"uploads\":null}} +--TEST.BOUNDARY +Content-Disposition: form-data; name="map" + +{"0":["variables.secondField"],"1":["variables.uploads.0"],"2":["variables.uploads.1"]} +--TEST.BOUNDARY +Content-Disposition: form-data; name="0"; filename="c.txt" +Content-Type: text/plain + +Charlie file content. + +--TEST.BOUNDARY +Content-Disposition: form-data; name="1"; filename="a.txt" +Content-Type: text/plain + +Alpha file content. + +--TEST.BOUNDARY +Content-Disposition: form-data; name="2"; filename="b.txt" +Content-Type: text/plain + +Bravo file content. + +--TEST.BOUNDARY-- +""" + XCTAssertEqual(stringToCompare, expectedString) + } +} diff --git a/Tests/ApolloWebsocketTests/SplitNetworkTransportTests.swift b/Tests/ApolloTests/WebSocket/SplitNetworkTransportTests.swift similarity index 97% rename from Tests/ApolloWebsocketTests/SplitNetworkTransportTests.swift rename to Tests/ApolloTests/WebSocket/SplitNetworkTransportTests.swift index e94d852bb8..350c3f5b36 100644 --- a/Tests/ApolloWebsocketTests/SplitNetworkTransportTests.swift +++ b/Tests/ApolloTests/WebSocket/SplitNetworkTransportTests.swift @@ -28,7 +28,7 @@ class SplitNetworkTransportTests: XCTestCase { }() private lazy var webSocketTransport: WebSocketTransport = { - let request = URLRequest(url: TestURL.starWarsWebSocket.url) + let request = URLRequest(url: TestURL.mockServer.url) return WebSocketTransport(request: request, clientName: self.webSocketName, clientVersion: self.webSocketVersion) diff --git a/Tests/ApolloWebsocketTests/MockWebSocketTests.swift b/Tests/ApolloTests/WebSocket/WebSocketTests.swift similarity index 98% rename from Tests/ApolloWebsocketTests/MockWebSocketTests.swift rename to Tests/ApolloTests/WebSocket/WebSocketTests.swift index c9f3c9e9af..57e5b24418 100644 --- a/Tests/ApolloWebsocketTests/MockWebSocketTests.swift +++ b/Tests/ApolloTests/WebSocket/WebSocketTests.swift @@ -13,7 +13,7 @@ extension WebSocketTransport { } } -class MockWebSocketTests: XCTestCase { +class WebSocketTests: XCTestCase { var networkTransport: WebSocketTransport! var client: ApolloClient! diff --git a/Tests/ApolloWebsocketTests/WebSocketTransportTests.swift b/Tests/ApolloTests/WebSocket/WebSocketTransportTests.swift similarity index 100% rename from Tests/ApolloWebsocketTests/WebSocketTransportTests.swift rename to Tests/ApolloTests/WebSocket/WebSocketTransportTests.swift diff --git a/Tests/ApolloWebsocketTests/Info.plist b/Tests/ApolloWebsocketTests/Info.plist deleted file mode 100644 index 28165a5b96..0000000000 --- a/Tests/ApolloWebsocketTests/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ApolloWebSocket - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - $(CURRENT_PROJECT_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Tests/TestPlans/Apollo-CITestPlan.xctestplan b/Tests/TestPlans/Apollo-CITestPlan.xctestplan new file mode 100644 index 0000000000..bfcc172ab6 --- /dev/null +++ b/Tests/TestPlans/Apollo-CITestPlan.xctestplan @@ -0,0 +1,38 @@ +{ + "configurations" : [ + { + "id" : "8B27E3A2-3A52-417E-9598-1FF14D3F8C84", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "9FC7504D1D2A532D00458D91", + "name" : "ApolloTests" + } + }, + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "9F54C8B3255D760B0065AFD6", + "name" : "ApolloPerformanceTests" + } + }, + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "DE6B15AB26152BE10068D642", + "name" : "ApolloServerIntegrationTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/TestPlans/Apollo-CodegenTestPlan.xctestplan b/Tests/TestPlans/Apollo-CodegenTestPlan.xctestplan new file mode 100644 index 0000000000..2a117aa0f2 --- /dev/null +++ b/Tests/TestPlans/Apollo-CodegenTestPlan.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "7BBE4BEB-2608-4818-AB40-1149E12C6785", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "9BAEEBFB234BB8FD00808306", + "name" : "ApolloCodegenTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/TestPlans/Apollo-IntegrationTestPlan.xctestplan b/Tests/TestPlans/Apollo-IntegrationTestPlan.xctestplan new file mode 100644 index 0000000000..0d288226bb --- /dev/null +++ b/Tests/TestPlans/Apollo-IntegrationTestPlan.xctestplan @@ -0,0 +1,26 @@ +{ + "configurations" : [ + { + "id" : "8F157DCD-D977-4EAA-80AD-D947EF785D9D", + "name" : "Configuration 1", + "options" : { + "environmentVariableEntries" : [ + + ] + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "DE6B15AB26152BE10068D642", + "name" : "ApolloServerIntegrationTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/TestPlans/Apollo-PerformanceTestPlan.xctestplan b/Tests/TestPlans/Apollo-PerformanceTestPlan.xctestplan new file mode 100644 index 0000000000..f2b1b7a04e --- /dev/null +++ b/Tests/TestPlans/Apollo-PerformanceTestPlan.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "72DF6CB1-DEC6-49C8-91E1-2EE002E10612", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "9F54C8B3255D760B0065AFD6", + "name" : "ApolloPerformanceTests" + } + } + ], + "version" : 1 +} diff --git a/Tests/TestPlans/Apollo-UnitTestPlan.xctestplan b/Tests/TestPlans/Apollo-UnitTestPlan.xctestplan new file mode 100644 index 0000000000..2314709c07 --- /dev/null +++ b/Tests/TestPlans/Apollo-UnitTestPlan.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "36C7A583-06D6-4733-AF67-CC38D6FB14FF", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:Apollo.xcodeproj", + "identifier" : "9FC7504D1D2A532D00458D91", + "name" : "ApolloTests" + } + } + ], + "version" : 1 +}