brokenhandsio / vapor-oauth

OAuth2 Provider Library for Vapor
MIT License
130 stars 16 forks source link

Test failure #11

Open Brett-Best opened 1 year ago

Brett-Best commented 1 year ago

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 1 year ago

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

Brett-Best commented 1 year ago

@0xTim I had a bit of a go here.... https://github.com/Brett-Best/vapor-oauth/actions/runs/4311606352/jobs/7521180354

What am I doing wrong?

Brett-Best commented 1 year ago

https://github.com/Brett-Best/vapor-oauth/commit/de1db21df84db5f9957813651c379e4cd240c1d8 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 1 year ago

@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 1 year ago

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

Brett-Best commented 1 year ago

Created https://github.com/brokenhandsio/vapor-oauth/pull/12, it fails currently cause of the test mentioned.

0xTim commented 1 year ago

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

mynona commented 9 months ago

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
mynona commented 9 months ago

Bildschirmfoto 2023-12-09 um 15 59 47

mynona commented 9 months ago

Bildschirmfoto 2023-12-09 um 16 00 55