Skip to content

Comments

Fix version paths#3152

Merged
fisx merged 3 commits intodevelopfrom
fix-version-paths
Mar 28, 2023
Merged

Fix version paths#3152
fisx merged 3 commits intodevelopfrom
fix-version-paths

Conversation

@fisx
Copy link
Contributor

@fisx fisx commented Mar 15, 2023

https://wearezeta.atlassian.net/browse/SQPIT-1654

separate commits for (failing) test cases, for fix, and house keeping.

Before the fix:

$ make ci package=brig TASTY_PATTERN=/swagger/
[...]
Brig API Integration
  version
    GET /api/swagger.json:    OK (0.13s)
    GET /api/swagger-ui:      OK (0.03s)
    GET /v2/api/swagger.json: FAIL
      Exception: HttpExceptionRequest Request {
        host                 = "127.0.0.1"
        port                 = 8082
        secure               = False
        requestHeaders       = []
        path                 = "/v2/api/swagger.json"
        queryString          = ""
        method               = "GET"
        proxy                = Nothing
        rawBody              = False
        redirectCount        = 10
        responseTimeout      = ResponseTimeoutDefault
        requestVersion       = HTTP/1.1
      }
       (StatusCodeException (Response {responseStatus = Status {statusCode = 400, statusMessage = "Bad Request"}, responseVersion = HTTP/1.1, responseHeaders = [("Transfer-Encoding","chunked"),("Date","Mon, 27 Mar 2023 12:56:13 GMT"),("Server","Warp/3.3.23"),("Vary","Accept-Encoding")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) "Error parsing header X-Wire-API-Version failed: Unknown version: 2")
      Use -p '/swagger/&&/GET \/v2\/api\/swagger.json/' to rerun this test only.
    GET /v2/api/swagger-ui:   FAIL
      Exception: HttpExceptionRequest Request {
        host                 = "127.0.0.1"
        port                 = 8082
        secure               = False
        requestHeaders       = []
        path                 = "/v2/api/swagger-ui"
        queryString          = ""
        method               = "GET"
        proxy                = Nothing
        rawBody              = False
        redirectCount        = 10
        responseTimeout      = ResponseTimeoutDefault
        requestVersion       = HTTP/1.1
      }
       (StatusCodeException (Response {responseStatus = Status {statusCode = 400, statusMessage = "Bad Request"}, responseVersion = HTTP/1.1, responseHeaders = [("Transfer-Encoding","chunked"),("Date","Mon, 27 Mar 2023 12:56:13 GMT"),("Server","Warp/3.3.23"),("Vary","Accept-Encoding")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose}) "Error parsing header X-Wire-API-Version failed: Unknown version: 2")
      Use -p '/swagger/&&/GET \/v2\/api\/swagger-ui/' to rerun this test only.

2 out of 4 tests failed (0.13s)
[...]

After the fix:

$ make ci package=brig TASTY_PATTERN=/swagger/
[...]
Brig API Integration
  version
    GET /api/swagger.json:    OK (0.18s)
    GET /api/swagger-ui:      OK (0.01s)
    GET /v2/api/swagger.json: OK (0.15s)
    GET /v2/api/swagger-ui:   OK (0.01s)

All 4 tests passed (0.18s)
[...]

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Mar 15, 2023
@fisx fisx force-pushed the fix-version-paths branch from baa62cf to 0d7db69 Compare March 27, 2023 13:21
@fisx fisx marked this pull request as ready for review March 27, 2023 13:27
@fisx fisx requested a review from battermann March 28, 2023 09:49
import Util

tests :: Manager -> Opts -> Brig -> TestTree
tests p _opts brigNoImplicitVersion =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove _opts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants