Fix test related to DNS domain options

This commit is contained in:
Davide De Rosa 2020-12-18 19:09:50 +01:00
parent 4992532e9d
commit 113aa1f200
1 changed files with 5 additions and 3 deletions

View File

@ -53,8 +53,10 @@ class ConfigurationParserTests: XCTestCase {
let lines = [
"dhcp-option DNS 8.8.8.8",
"dhcp-option DNS6 ffff::1",
"dhcp-option DOMAIN one.com",
"dhcp-option DOMAIN two.net",
"dhcp-option DOMAIN fake-main.net",
"dhcp-option DOMAIN-SEARCH one.com",
"dhcp-option DOMAIN-SEARCH two.com",
"dhcp-option DOMAIN main.net",
"dhcp-option PROXY_HTTP 1.2.3.4 8081",
"dhcp-option PROXY_HTTPS 7.8.9.10 8082",
"dhcp-option PROXY_AUTO_CONFIG_URL https://pac/",
@ -64,7 +66,7 @@ class ConfigurationParserTests: XCTestCase {
let parsed = try! OpenVPN.ConfigurationParser.parsed(fromLines: lines).configuration
XCTAssertEqual(parsed.dnsServers, ["8.8.8.8", "ffff::1"])
XCTAssertEqual(parsed.searchDomains, ["one.com", "two.net"])
XCTAssertEqual(parsed.searchDomains, ["main.net", "one.com", "two.com"])
XCTAssertEqual(parsed.httpProxy?.address, "1.2.3.4")
XCTAssertEqual(parsed.httpProxy?.port, 8081)
XCTAssertEqual(parsed.httpsProxy?.address, "7.8.9.10")