From 57b7457ad1ac0a7d735cb29969f78c45666709f0 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Sun, 2 Sep 2018 01:11:31 +0200 Subject: [PATCH] Fix DataPath unit tests --- TunnelKitTests/DataPathEncryptionTests.swift | 10 ++++++++-- TunnelKitTests/DataPathPerformanceTests.swift | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/TunnelKitTests/DataPathEncryptionTests.swift b/TunnelKitTests/DataPathEncryptionTests.swift index 5293650..193ddea 100644 --- a/TunnelKitTests/DataPathEncryptionTests.swift +++ b/TunnelKitTests/DataPathEncryptionTests.swift @@ -87,8 +87,14 @@ class DataPathEncryptionTests: XCTestCase { } func privateTestDataPathHigh(peerId: UInt32?) { - let path = DataPath(encrypter: enc, decrypter: dec, maxPackets: 1000, usesReplayProtection: false) - path.setCompressionFraming(.disabled) + let path = DataPath( + encrypter: enc, + decrypter: dec, + peerId: peerId ?? PacketPeerIdDisabled, + compressionFraming: .disabled, + maxPackets: 1000, + usesReplayProtection: false + ) if let peerId = peerId { enc.setPeerId(peerId) diff --git a/TunnelKitTests/DataPathPerformanceTests.swift b/TunnelKitTests/DataPathPerformanceTests.swift index 7ec9ccd..9da9b32 100644 --- a/TunnelKitTests/DataPathPerformanceTests.swift +++ b/TunnelKitTests/DataPathPerformanceTests.swift @@ -54,7 +54,14 @@ class DataPathPerformanceTests: XCTestCase { encrypter = crypto.encrypter() decrypter = crypto.decrypter() - dataPath = DataPath(encrypter: encrypter, decrypter: decrypter, maxPackets: 200, usesReplayProtection: false) + dataPath = DataPath( + encrypter: encrypter, + decrypter: decrypter, + peerId: PacketPeerIdDisabled, + compressionFraming: .disabled, + maxPackets: 200, + usesReplayProtection: false + ) } override func tearDown() {