Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit cd472b7

Browse files
authored
fix tests on ubuntu (#352)
* fix tests on ubuntu * fix ci docker flag
1 parent 2762cb2 commit cd472b7

File tree

4 files changed

+6
-201
lines changed

4 files changed

+6
-201
lines changed

Sources/HTTP/Responder/HTTPClient.swift

-195
This file was deleted.

Tests/HTTPKitTests/HTTPTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class HTTPTests: HTTPKitTestCase {
153153

154154
struct CookieError: Error { }
155155

156-
#if os(Linux)
156+
#if DOCKER
157157
let proxyHostname = "tinyproxy"
158158
#else
159159
let proxyHostname = "127.0.0.1"

Tests/HTTPKitTests/WebSocketTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class WebSocketTests: HTTPKitTestCase {
7777
let server = HTTPServer(
7878
config: .init(
7979
hostname: "127.0.0.1",
80-
port: 8888
80+
port: 8001
8181
),
8282
on: self.eventLoopGroup
8383
)
@@ -98,14 +98,14 @@ class WebSocketTests: HTTPKitTestCase {
9898
let server = HTTPServer(
9999
config: .init(
100100
hostname: "127.0.0.1",
101-
port: 8888,
101+
port: 8002,
102102
supportVersions: [.one]
103103
),
104104
on: self.eventLoopGroup
105105
)
106106
try server.start(delegate: delegate).wait()
107107
let client = HTTPClient(on: self.eventLoopGroup)
108-
var req = HTTPRequest(url: "ws://127.0.0.1:8888/")
108+
var req = HTTPRequest(url: "ws://127.0.0.1:8002/")
109109
req.webSocketUpgrade { ws in
110110
ws.send(raw: Array("Hello, ".utf8), opcode: .text, fin: false)
111111
ws.send(raw: Array("world".utf8), opcode: .continuation, fin: false)

circle.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
name: tinyproxy
99
steps:
1010
- checkout
11-
- run: swift build
12-
- run: swift test
11+
- run: swift build -Xswiftc -DDOCKER
12+
- run: swift test -Xswiftc -DDOCKER
1313

1414
workflows:
1515
version: 2

0 commit comments

Comments
 (0)