Skip to content

Integration tests failing locally on macOS #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thiagosalles opened this issue Mar 19, 2025 · 4 comments · May be fixed by #754
Open

Integration tests failing locally on macOS #753

thiagosalles opened this issue Mar 19, 2025 · 4 comments · May be fixed by #754

Comments

@thiagosalles
Copy link

thiagosalles commented Mar 19, 2025

Describe the bug
When running the integration tests for the Lura project, the tests fail due to an unexpected value in the X-Forwarded-For header. The tests expect this header to be an empty string ([""]), but it is set to ["127.0.0.1"], causing the tests to fail.

To Reproduce
Steps to reproduce the behavior:

  1. Configuration used
    • Environment: macOS
    • macOS version: Sonoma 14.0
    • Go version: 1.23
    • Branch: main
    • Configuration under /etc/hosts: 127.0.0.1 localhost
    • No modifications were made on the project; it was cloned directly from the repository.
  2. Steps to run the software
    • Clone the Lura project: git clone https://github.com/luraproject/lura.git
    • Navigate to the project directory: cd lura
    • Execute the same steps as found in automated tests
      • go build -v ./...: Success!
      • go test -cover -race ./...: Success!
      • go test -tags integration ./test: Here is where it fails!

Note that in all the tests that failed, the expected behavior was for the X-Forwarded-For header to be empty ([""]), but it was populated with ["127.0.0.1"].

Expected behavior
The integration tests should pass successfully

Logs

--- FAIL: TestKrakenD_ginRouter (1.02s)
    --- FAIL: TestKrakenD_ginRouter/multipost_parallel (0.00s)
        integration_test.go:448: /multipost/parallel/foo: unexpected body: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/foo"}}
            	/multipost/parallel/foo was expecting: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/foo"}}
    --- FAIL: TestKrakenD_ginRouter/multipost_sequential (0.00s)
        integration_test.go:448: /multipost/sequential/foo: unexpected body: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/42"}}
            	/multipost/sequential/foo was expecting: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9079"]},"method":"POST","url":"/recipient/42"}}
--- FAIL: TestKrakenD_gorillaRouter (0.42s)
    --- FAIL: TestKrakenD_gorillaRouter/multipost_parallel (0.00s)
        integration_test.go:448: /multipost/parallel/foo: unexpected body: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/foo"}}
            	/multipost/parallel/foo was expecting: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/foo"}}
    --- FAIL: TestKrakenD_gorillaRouter/multipost_sequential (0.00s)
        integration_test.go:448: /multipost/sequential/foo: unexpected body: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/42"}}
            	/multipost/sequential/foo was expecting: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9997"]},"method":"POST","url":"/recipient/42"}}
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 645.666µs | localhost:8540 | GET /static
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 544.583µs | localhost:8540 | POST /param_forwarding/foo/constant/bar
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 250.459µs | localhost:8540 | POST /param_forwarding/foo/constant/foobar
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 86.282708ms | localhost:8540 | GET /timeout
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 1.069625ms | localhost:8540 | GET /partial/static
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 608.042µs | localhost:8540 | GET /partial
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 574.417µs | localhost:8540 | GET /combination
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 497.125µs | localhost:8540 | GET /detail_error
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 428.833µs | localhost:8540 | GET /querystring-params-test/no-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 211.333µs | localhost:8540 | GET /querystring-params-test/query-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 363.625µs | localhost:8540 | GET /querystring-params-test/url-params/some
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 179.875µs | localhost:8540 | GET /querystring-params-test/all-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 154.667µs | localhost:8540 | GET /header-params-test/no-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 1.670917ms | localhost:8540 | GET /header-params-test/filter-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 142.458µs | localhost:8540 | GET /header-params-test/all-params
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 596.125µs | localhost:8540 | GET /sequential/ok/foo
[negroni] 2025-03-19T18:32:43-03:00 | 500 | 	 127.791µs | localhost:8540 | GET /sequential/ko/first/foo
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 372.375µs | localhost:8540 | GET /sequential/ko/last/foo
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 349.125µs | localhost:8540 | GET /redirect
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 345.25µs | localhost:8540 | GET /found
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 101.625µs | localhost:8540 | GET /flatmap/delete
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 126.292µs | localhost:8540 | GET /flatmap/rename
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 288.625µs | localhost:8540 | GET /x-forwarded-for
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 202.5µs | localhost:8540 | PUT /sequence-accept
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 87.5µs | localhost:8540 | GET /error-status-code/1
[negroni] 2025-03-19T18:32:43-03:00 | 429 | 	 275.291µs | localhost:8540 | GET /error-status-code/2
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 162.625µs | localhost:8540 | GET /error-status-code/3
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 490.375µs | localhost:8540 | POST /multipost/parallel/foo
[negroni] 2025-03-19T18:32:43-03:00 | 200 | 	 445.834µs | localhost:8540 | POST /multipost/sequential/foo
--- FAIL: TestKrakenD_negroniRouter (0.42s)
    --- FAIL: TestKrakenD_negroniRouter/multipost_parallel (0.00s)
        integration_test.go:448: /multipost/parallel/foo: unexpected body: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/foo"}}
            	/multipost/parallel/foo was expecting: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/foo"}}
    --- FAIL: TestKrakenD_negroniRouter/multipost_sequential (0.00s)
        integration_test.go:448: /multipost/sequential/foo: unexpected body: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/42"}}
            	/multipost/sequential/foo was expecting: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8540"]},"method":"POST","url":"/recipient/42"}}
--- FAIL: TestKrakenD_httptreemuxRouter (0.42s)
    --- FAIL: TestKrakenD_httptreemuxRouter/multipost_parallel (0.00s)
        integration_test.go:448: /multipost/parallel/foo: unexpected body: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/foo"}}
            	/multipost/parallel/foo was expecting: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/foo"}}
    --- FAIL: TestKrakenD_httptreemuxRouter/multipost_sequential (0.00s)
        integration_test.go:448: /multipost/sequential/foo: unexpected body: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/42"}}
            	/multipost/sequential/foo was expecting: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:9899"]},"method":"POST","url":"/recipient/42"}}
2025/03/19 18:32:44 "GET http://localhost:8924/static HTTP/1.1" from 127.0.0.1:54435 - 200 25B in 815.333µs
2025/03/19 18:32:44 "POST http://localhost:8924/param_forwarding/foo/constant/bar HTTP/1.1" from 127.0.0.1:54435 - 200 19B in 836.459µs
2025/03/19 18:32:44 "POST http://localhost:8924/param_forwarding/foo/constant/foobar HTTP/1.1" from 127.0.0.1:54435 - 200 22B in 220.458µs
2025/03/19 18:32:44 "GET http://localhost:8924/timeout HTTP/1.1" from 127.0.0.1:54435 - 200 37B in 85.609333ms
2025/03/19 18:32:44 "GET http://localhost:8924/partial/static HTTP/1.1" from 127.0.0.1:54435 - 200 61B in 590.291µs
2025/03/19 18:32:44 "GET http://localhost:8924/partial HTTP/1.1" from 127.0.0.1:54435 - 200 37B in 344.709µs
2025/03/19 18:32:44 "GET http://localhost:8924/combination HTTP/1.1" from 127.0.0.1:54435 - 200 148B in 346.875µs
2025/03/19 18:32:44 "GET http://localhost:8924/detail_error HTTP/1.1" from 127.0.0.1:54435 - 200 155B in 332.292µs
2025/03/19 18:32:44 "GET http://localhost:8924/querystring-params-test/no-params?a=1&b=2&c=3 HTTP/1.1" from 127.0.0.1:54435 - 200 152B in 273.417µs
2025/03/19 18:32:44 "GET http://localhost:8924/querystring-params-test/query-params?a=1&b=2&c=3 HTTP/1.1" from 127.0.0.1:54435 - 200 174B in 146.5µs
2025/03/19 18:32:44 "GET http://localhost:8924/querystring-params-test/url-params/some?a=1&b=2&c=3 HTTP/1.1" from 127.0.0.1:54435 - 200 165B in 152.375µs
2025/03/19 18:32:44 "GET http://localhost:8924/querystring-params-test/all-params?a=1&b=2&c=3 HTTP/1.1" from 127.0.0.1:54435 - 200 182B in 135.416µs
2025/03/19 18:32:44 "GET http://localhost:8924/header-params-test/no-params HTTP/1.1" from 127.0.0.1:54435 - 200 152B in 127.792µs
2025/03/19 18:32:44 "GET http://localhost:8924/header-params-test/filter-params HTTP/1.1" from 127.0.0.1:54435 - 200 176B in 135.583µs
2025/03/19 18:32:44 "GET http://localhost:8924/header-params-test/all-params HTTP/1.1" from 127.0.0.1:54435 - 200 228B in 143.917µs
2025/03/19 18:32:44 "GET http://localhost:8924/sequential/ok/foo HTTP/1.1" from 127.0.0.1:54435 - 200 92B in 502.208µs
2025/03/19 18:32:44 "GET http://localhost:8924/sequential/ko/first/foo HTTP/1.1" from 127.0.0.1:54435 - 500 20B in 148.75µs
2025/03/19 18:32:44 "GET http://localhost:8924/sequential/ko/last/foo HTTP/1.1" from 127.0.0.1:54446 - 200 13B in 590.125µs
2025/03/19 18:32:44 "GET http://localhost:8924/redirect HTTP/1.1" from 127.0.0.1:54446 - 200 24B in 531.667µs
2025/03/19 18:32:44 "GET http://localhost:8924/found HTTP/1.1" from 127.0.0.1:54446 - 200 24B in 532.083µs
2025/03/19 18:32:44 "GET http://localhost:8924/flatmap/delete HTTP/1.1" from 127.0.0.1:54446 - 200 70B in 185.916µs
2025/03/19 18:32:44 "GET http://localhost:8924/flatmap/rename HTTP/1.1" from 127.0.0.1:54446 - 200 120B in 166.917µs
2025/03/19 18:32:44 "GET http://localhost:8924/x-forwarded-for HTTP/1.1" from 127.0.0.1:54446 - 200 156B in 369.084µs
2025/03/19 18:32:44 "PUT http://localhost:8924/sequence-accept HTTP/1.1" from 127.0.0.1:54446 - 200 37B in 267.542µs
2025/03/19 18:32:44 "GET http://localhost:8924/error-status-code/1 HTTP/1.1" from 127.0.0.1:54451 - 200 37B in 149.875µs
2025/03/19 18:32:44 "GET http://localhost:8924/error-status-code/2 HTTP/1.1" from 127.0.0.1:54452 - 429 11B in 329.459µs
2025/03/19 18:32:44 "GET http://localhost:8924/error-status-code/3 HTTP/1.1" from 127.0.0.1:54454 - 200 37B in 290.584µs
2025/03/19 18:32:44 "POST http://localhost:8924/multipost/parallel/foo HTTP/1.1" from 127.0.0.1:54455 - 200 457B in 582.625µs
2025/03/19 18:32:44 "POST http://localhost:8924/multipost/sequential/foo HTTP/1.1" from 127.0.0.1:54455 - 200 501B in 628.125µs
--- FAIL: TestKrakenD_chiRouter (0.42s)
    --- FAIL: TestKrakenD_chiRouter/multipost_parallel (0.00s)
        integration_test.go:448: /multipost/parallel/foo: unexpected body: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/foo"}}
            	/multipost/parallel/foo was expecting: {"first":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/provider/foo"},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/foo"}}
    --- FAIL: TestKrakenD_chiRouter/multipost_sequential (0.00s)
        integration_test.go:448: /multipost/sequential/foo: unexpected body: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":["127.0.0.1"],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/42"}}
            	/multipost/sequential/foo was expecting: {"first":{"path":"/provider/foo","random":42},"second":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/42"},"third":{"body":"{\"foo\":\"bar\"}","headers":{"Accept-Encoding":["gzip"],"User-Agent":["KrakenD Version undefined"],"X-Forwarded-For":[""],"X-Forwarded-Host":["localhost:8924"]},"method":"POST","url":"/recipient/42"}}
FAIL
FAIL	github.com/luraproject/lura/v2/test	3.260s
FAIL
@thiagosalles thiagosalles linked a pull request Mar 19, 2025 that will close this issue
@taik0
Copy link
Contributor

taik0 commented Mar 24, 2025

Hi @thiagosalles

I just installed my new laptop with a new go installation (everything by default) and the test works without problems. Can you check if you have some specific configuration that we should be aware to replicate this behaviour?

@thiagosalles
Copy link
Author

Hi @thiagosalles

I just installed my new laptop with a new go installation (everything by default) and the test works without problems. Can you check if you have some specific configuration that we should be aware to replicate this behaviour?

Hello, @taik0
Thanks for your reply!

Is your new laptop running macOS?

I tried running the tests again on another laptop (my wife's), which is not used for development. Here’s what I did:

  • installed Homebrew: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Installed golang: brew install golang
  • Installed gvm: bash < <(curl -sSL https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
  • installed Go 1.23: gvm install go1.23.0
  • Activated it: gvm use go1.23.0

After this setup, I ran the tests, and they passed successfully.

The only major difference between my laptop and hers is that mine has an Apple A1 chip, while hers has an Intel Core i9.
I'll try to get another laptop with an Apple A1 to test and will share the results.

In the meantime, I'm trying to figure out if there's another configuration causing this issue, maybe something related to IPv6.

As soon as I have any updates, I'll share them here.

Thanks for the help!

@thiagosalles
Copy link
Author

@taik0

Looking at the PR code, do you have any suggestions on what the issue might be?

Simply specifying the hostname to match on both the server and the client solved the problem for me, although I still don't understand why :/

@taik0
Copy link
Contributor

taik0 commented Mar 25, 2025

My old laptop is a first-generation M1 (it works there), and the new one is a M4.
This problem's not a big deal, but I would like to find the root cause, if possible, to be aware of possible derivated problems (not on the PR itself but the difference in behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants