Skip to content

Commit

Permalink
Fixes for 1.0.0 rc (#6)
Browse files Browse the repository at this point in the history
* Fixes for RC1 release

* Use main branch of hummingbird

* Use codecov@v3 action

* Use hummingbird v1.0.0-rc
  • Loading branch information
adam-fowler authored Jan 17, 2023
1 parent e80773c commit 2fc2b79
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
-ignore-filename-regex="\/Tests\/" \
-instr-profile=.build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: info.lcov
linux:
Expand All @@ -57,6 +57,6 @@ jobs:
-ignore-filename-regex="\/Tests\/" \
-instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: info.lcov
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
.library(name: "HummingbirdCompression", targets: ["HummingbirdCompression"]),
],
dependencies: [
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "1.0.0-alpha"),
.package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "1.0.0-rc"),
.package(url: "https://github.com/adam-fowler/compress-nio.git", from: "0.4.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.1"),
],
Expand Down
14 changes: 7 additions & 7 deletions Tests/HummingbirdCompressionTests/CompressionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class HummingBirdCompressionTests: XCTestCase {
defer { app.XCTStop() }

let testBuffer = self.randomBuffer(size: Int.random(in: 64000...261_335))
app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in
var body = response.body
let uncompressed = try body?.decompress(with: .gzip)
XCTAssertEqual(uncompressed, testBuffer)
Expand All @@ -57,7 +57,7 @@ class HummingBirdCompressionTests: XCTestCase {
defer { app.XCTStop() }

let testBuffer = self.randomBuffer(size: 261_335)
app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["accept-encoding": "gzip"], body: testBuffer) { response in
var body = response.body
let uncompressed = try body?.decompress(with: .gzip)
XCTAssertEqual(uncompressed, testBuffer)
Expand Down Expand Up @@ -132,7 +132,7 @@ class HummingBirdCompressionTests: XCTestCase {
let testBuffer = self.randomBuffer(size: 261_335)
var testBufferCopy = testBuffer
let compressedBuffer = try testBufferCopy.compress(with: .gzip)
app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
XCTAssertEqual(response.body, testBuffer)
}
}
Expand All @@ -150,7 +150,7 @@ class HummingBirdCompressionTests: XCTestCase {
let testBuffer = self.randomBuffer(size: 261_335)
var testBufferCopy = testBuffer
let compressedBuffer = try testBufferCopy.compress(with: .gzip)
app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
XCTAssertEqual(response.body, testBuffer)
}
}
Expand Down Expand Up @@ -254,7 +254,7 @@ class HummingBirdCompressionTests: XCTestCase {
defer { app.XCTStop() }

let testBuffer = self.randomBuffer(size: 261_335)
app.XCTExecute(uri: "/echo", method: .GET, body: testBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, body: testBuffer) { response in
XCTAssertEqual(response.body, testBuffer)
}
}
Expand All @@ -272,7 +272,7 @@ class HummingBirdCompressionTests: XCTestCase {
let testBuffer = self.randomBuffer(size: 150_000)
var testBufferCopy = testBuffer
let compressedBuffer = try testBufferCopy.compress(with: .gzip)
app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
XCTAssertEqual(response.status, .payloadTooLarge)
}
}
Expand All @@ -294,7 +294,7 @@ class HummingBirdCompressionTests: XCTestCase {
}
var testBufferCopy = testBuffer
let compressedBuffer = try testBufferCopy.compress(with: .gzip)
app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
try app.XCTExecute(uri: "/echo", method: .GET, headers: ["content-encoding": "gzip"], body: compressedBuffer) { response in
XCTAssertEqual(response.status, .payloadTooLarge)
}
}
Expand Down

0 comments on commit 2fc2b79

Please sign in to comment.