Skip to content

Commit

Permalink
Fix unit tests for Mac and AppleTV
Browse files Browse the repository at this point in the history
* Fixed test22c_SetCookieInHeader to always run with SSL (on Mac, it runs on non SSL previously).

* Added NSAppTransportSecurity to Apple TV Test’s info.plist to be able to run P2P tests and Replicator with SSL tests.
  • Loading branch information
pasin committed Oct 6, 2017
1 parent 51503bc commit 3b701b3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Test-tvOS/tvosDemo-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,20 @@
<array>
<string>arm64</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>local</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
</dict>
</plist>
5 changes: 4 additions & 1 deletion Unit-Tests/Replication_Tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -1542,10 +1542,13 @@ - (void) test22b_SyncGatewaySessionCookie {

- (void) test22c_SetCookieInHeader {
// https://github.com/couchbase/couchbase-lite-ios/issues/1757
NSURL* remoteURL = [self remoteTestDBURL: @"cbl_auth_test"];
NSURL* remoteURL = [self remoteSSLTestDBURL: @"cbl_auth_test"];
if (!remoteURL)
return;

NSArray* serverCerts = [self remoteTestDBAnchorCerts];
[CBLReplication setAnchorCerts: serverCerts onlyThese: NO];

for (NSInteger i = 0; i < 2; i ++) {
NSDictionary* cookie =
[self generateSyncGatewayCookieForURL: remoteURL ttl: @(5)];
Expand Down

0 comments on commit 3b701b3

Please sign in to comment.