Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
Fix DataPath unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Sep 2, 2018
1 parent 201da9b commit 57b7457
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 8 additions & 2 deletions TunnelKitTests/DataPathEncryptionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 8 additions & 1 deletion TunnelKitTests/DataPathPerformanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 57b7457

Please sign in to comment.