brokenhandsio/vapor-oauth

Test failure

Brett-Best opened this issue · 10 comments

I’m seeing TokenRefreshTests.testErrorWhenRequestingScopeWithNoScopesOriginallyRequestedOnRefreshToken() fail when I run locally, I wasn’t able to exactly figure out why it was happening though.

It looks like at one point travis was used for CI here.

0xTim commented

Yeah we definitely seem to be missing CI here! Would you be up for a PR to add it using GH actions?

Brett-Best@de1db21
This fixes the compilation at least, leaving the one failing test.

I’m not sure if the replacement is as good as the previous, might be a better method to call?
I note using UInt8 instead of Int8 because the hex extension was limited to UInt8.

0xTim commented

@Brett-Best yeah that looks like a leftover from having no CI so as is the code doesn't compile on Linux. And your fix is the right one

0xTim commented

CI file looks good so feel free to submit that in a PR!

Created #12, it fails currently cause of the test mentioned.

0xTim commented

@marius-se could you take a look when you get a chance?

Still fails:

Test Suite 'Selected tests' started at 2023-12-09 15:51:36.975.
Test Suite 'VaporOAuthTests.xctest' started at 2023-12-09 15:51:36.975.
Test Suite 'TokenRefreshTests' started at 2023-12-09 15:51:36.975.
Test Case '-[VaporOAuthTests.TokenRefreshTests testErrorWhenRequestingScopeWithNoScopesOriginallyRequestedOnRefreshToken]' started.
2023-12-09T15:51:36+0100 info codes.vapor.request : request-id=50A454E1-AC5F-4652-ADD3-6247500FA98B [Vapor] POST /oauth/token/
/Users/kaeru/Library/Developer/Xcode/DerivedData/vapor-oauth-1.0.0-beta-ggpiumsqobyrmhfxbjcudwdlrdvz/SourcePackages/checkouts/swift-nio/Sources/NIOFoundationCompat/Codable+ByteBuffer.swift:34: error: -[VaporOAuthTests.TokenRefreshTests testErrorWhenRequestingScopeWithNoScopesOriginallyRequestedOnRefreshToken] : failed: caught error: "keyNotFound(CodingKeys(stringValue: "error", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"error\", intValue: nil) (\"error\").", underlyingError: nil))"
Test Case '-[VaporOAuthTests.TokenRefreshTests testErrorWhenRequestingScopeWithNoScopesOriginallyRequestedOnRefreshToken]' failed (0.356 seconds).
Test Suite 'TokenRefreshTests' failed at 2023-12-09 15:51:37.331.
	 Executed 1 test, with 1 failure (1 unexpected) in 0.356 (0.356) seconds
Test Suite 'VaporOAuthTests.xctest' failed at 2023-12-09 15:51:37.331.
	 Executed 1 test, with 1 failure (1 unexpected) in 0.356 (0.356) seconds
Test Suite 'Selected tests' failed at 2023-12-09 15:51:37.332.
	 Executed 1 test, with 1 failure (1 unexpected) in 0.356 (0.357) seconds
Program ended with exit code: 1