Closed johakoch closed 1 year ago
With go1.20.1 there are some failing tests:
$ go test -short -race -count 1 -timeout 300s ./... ok github.com/avenga/couper 1.107s ok github.com/avenga/couper/accesscontrol 9.768s ok github.com/avenga/couper/accesscontrol/jwk 0.095s ? github.com/avenga/couper/accesscontrol/jwt [no test files] ? github.com/avenga/couper/assets [no test files] ? github.com/avenga/couper/assets/generate [no test files] ? github.com/avenga/couper/backend [no test files] ok github.com/avenga/couper/cache 2.048s ok github.com/avenga/couper/command 5.557s ok github.com/avenga/couper/config 0.024s ok github.com/avenga/couper/config/body 0.025s ok github.com/avenga/couper/config/configload 0.356s ? github.com/avenga/couper/config/configload/collect [no test files] ? github.com/avenga/couper/config/configload/file [no test files] ? github.com/avenga/couper/config/env [no test files] ? github.com/avenga/couper/config/meta [no test files] ? github.com/avenga/couper/config/parser [no test files] ok github.com/avenga/couper/config/reader 0.019s ? github.com/avenga/couper/config/request [no test files] ok github.com/avenga/couper/config/runtime 0.114s ok github.com/avenga/couper/config/runtime/server 0.022s ok github.com/avenga/couper/config/sequence 0.022s ok github.com/avenga/couper/definitions 5.149s ok github.com/avenga/couper/errors 0.036s ? github.com/avenga/couper/errors/generate [no test files] ok github.com/avenga/couper/eval 0.061s ok github.com/avenga/couper/eval/lib 0.432s ? github.com/avenga/couper/fuzz/server [no test files] --- FAIL: TestEndpoint_RoundTripContext_Variables_json_body (0.09s) --- FAIL: TestEndpoint_RoundTripContext_Variables_json_body/HEAD_method_/w_body (0.00s) endpoint_test.go:245: want: "" for key "x-test", got: [] FAIL FAIL github.com/avenga/couper/handler 5.332s ok github.com/avenga/couper/handler/ascii 0.018s ok github.com/avenga/couper/handler/middleware 0.039s ok github.com/avenga/couper/handler/producer 0.126s ok github.com/avenga/couper/handler/ratelimit 0.023s ok github.com/avenga/couper/handler/transport 8.470s ok github.com/avenga/couper/handler/validation 0.669s ok github.com/avenga/couper/internal/seetie 0.023s ? github.com/avenga/couper/internal/test [no test files] ? github.com/avenga/couper/internal/tls [no test files] ? github.com/avenga/couper/internal/tls/cli [no test files] ok github.com/avenga/couper/json 11.243s ok github.com/avenga/couper/logging 0.039s ? github.com/avenga/couper/logging/hooks [no test files] ? github.com/avenga/couper/oauth2 [no test files] ok github.com/avenga/couper/oauth2/oidc 0.646s INTEGRATION: create test backend... time="2023-02-15T09:49:39+01:00" level=info backend=anonymous_9_11 custom="map[]" method=GET request="map[headers:map[user-agent:Go-http-client/1.1] host:127.0.0.1 method:GET name:default origin:127.0.0.1:38745 path:/pdf port:38745 proto:http]" response="map[bytes:4911 headers:map[content-type:application/pdf] status:200]" status=200 timings="map[tcp:0.185 total:6.478 ttfb:0.548]" type=couper_backend uid=cfm9p8reg9sfe2kfp2mg url="http://127.0.0.1:38745/pdf" (0x0,0x0) time="2023-02-15T09:49:39+01:00" level=info backend=anonymous_5_19 custom="map[]" method=GET request="map[headers:map[] host:127.0.0.1 method:GET name:pdf origin:127.0.0.1:38745 path:/pdf port:38745 proto:http]" response="map[bytes:4911 headers:map[content-type:application/pdf] status:200]" status=200 timings="map[tcp:1.926 total:6.601 ttfb:0.43]" type=couper_backend uid=cfm9p8reg9sfe2kfp2mg url="http://127.0.0.1:38745/pdf" (0x0,0x0) time="2023-02-15T09:49:39+01:00" level=info client_ip=127.0.0.1 endpoint=/pdf handler=endpoint method=GET port=8080 request="map[headers:map[user-agent:Go-http-client/1.1] host:example.com method:GET origin:example.com:8080 path:/pdf proto:http status:200 tls:false]" response="map[bytes:4911 headers:map[content-type:text/plain]]" server=api status=200 timings="map[total:24.388]" type=couper_access uid=cfm9p8reg9sfe2kfp2mg url="http://example.com:8080/pdf" (0x0,0x0) --- FAIL: TestEndpoints_BerespBody (1.04s) http_endpoints_test.go:277: Get "http://example.com:8080/pdf": net/http: HTTP/1.x transport connection broken: malformed MIME header line: X-Body: %PDF-1.6 % 24 0 obj <</Filter/FlateDecode/First 4/Length 216/N 1/Type/ObjStm>>stream h<QK0}[ޤ$:i2Ž%Kn56&?VsVz{OSOCC3LNHus4]E\`KGG}Y7~"#JlP2iQ,ƆϢ+qW0L0d31lh:rAV8Y`i^\T\{=|@@z-|P endstream endobj 25 0 obj <</Filter/FlateDecode/First 4/Length 49/N 1/Type/ObjStm>>stream hP0Pw/+Q0L)64 T$ endstream endobj 26 0 obj <</Filter/FlateDecode/First 9/Length 42/N 2/Type/ObjStm>>stream h2S0P0W0P+-q b".vv7 endstream endobj 27 0 obj <</Filter/FlateDecode/First 5/Length 120/N 1/Type/ObjStm>>stream h24R0Pw+I+)V02 ;8WDfF F)E@ `}AEɩ@3SK\CR+JbKKRC*RzSؠ' endstream endobj 2 0 obj <</Length 3525/Subtype/XML/Type/Metadata>>stream <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.4-c005 78.147326, 2012/08/23-13:03:03 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <pdf:Producer>Acrobat Distiller 6.0 (Windows)</pdf:Producer> <xmp:CreateDate>2006-03-06T15:06:33-05:00</xmp:CreateDate> <xmp:CreatorTool>AdobePS5.dll Version 5.2.2</xmp:CreatorTool> <xmp:ModifyDate>2016-07-15T10:12:21+08:00</xmp:ModifyDate> <xmp:MetadataDate>2016-07-15T10:12:21+08:00</xmp:MetadataDate> <xmpMM:DocumentID>uuid:ff3dcfd1-23fa-476f-839a-3e5cae2da2eb</xmpMM:DocumentID> <xmpMM:InstanceID>uuid:359350b3-af40-4d8a-9d6c-03186b4ffb36</xmpMM:InstanceID> <dc:format>application/pdf</dc:format> <dc:title> <rdf:Alt> <rdf:li xml:lang="x-default">Blank PDF Document</rdf:li> </rdf:Alt> </dc:title> <dc:creator> <rdf:Seq> <rdf:li>Department of Justice (Executive Office of Immigration Review)</rdf:li> </rdf:Seq> </dc:creator> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="w"?> endstream endobj 11 0 obj <</Metadata 2 0 R/PageLabels 6 0 R/Pages 8 0 R/Type/Catalog>> endobj 23 0 obj <</Filter/FlateDecode/Length 10>>stream H0 endstream endobj 28 0 obj <</DecodeParms<</Columns 4/Predictor 12>>/Filter/FlateDecode/ID[<DB7775CCE227F6B30C440DF4221DC390><BFCCCF3F57F6134ABD3C04A9E4CA106E>]/Info 9 0 R/Length 80/Root 11 0 R/Size 29/Type/XRef/W[1 2 1]>>stream hbb&0ly(L01HY@P3xQp"H0@v `ndstream endobj startxref 4576 %%EOF http_integration_test.go:148: time="2023-02-15T09:49:39+01:00" level=info backend=anonymous_9_11 custom="map[]" method=GET request="map[headers:map[user-agent:Go-http-client/1.1] host:127.0.0.1 method:GET name:default origin:127.0.0.1:38745 path:/pdf port:38745 proto:http]" response="map[bytes:4911 headers:map[content-type:application/pdf] status:200]" status=200 timings="map[tcp:0.185 total:6.478 ttfb:0.548]" type=couper_backend uid=cfm9p8reg9sfe2kfp2mg url="http://127.0.0.1:38745/pdf" http_integration_test.go:148: time="2023-02-15T09:49:39+01:00" level=info backend=anonymous_5_19 custom="map[]" method=GET request="map[headers:map[] host:127.0.0.1 method:GET name:pdf origin:127.0.0.1:38745 path:/pdf port:38745 proto:http]" response="map[bytes:4911 headers:map[content-type:application/pdf] status:200]" status=200 timings="map[tcp:1.926 total:6.601 ttfb:0.43]" type=couper_backend uid=cfm9p8reg9sfe2kfp2mg url="http://127.0.0.1:38745/pdf" http_integration_test.go:148: time="2023-02-15T09:49:39+01:00" level=info client_ip=127.0.0.1 endpoint=/pdf handler=endpoint method=GET port=8080 request="map[headers:map[user-agent:Go-http-client/1.1] host:example.com method:GET origin:example.com:8080 path:/pdf proto:http status:200 tls:false]" response="map[bytes:4911 headers:map[content-type:text/plain]]" server=api status=200 timings="map[total:24.388]" type=couper_access uid=cfm9p8reg9sfe2kfp2mg url="http://example.com:8080/pdf" Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate --- FAIL: TestHTTPSServer_TLS_SelfSigned (1.02s) http_mtls_test.go:35: Want unknown authority error, got: Get "https://localhost:4443/": tls: failed to verify certificate: x509: certificate signed by unknown authority http_integration_test.go:148: time="2023-02-15T09:50:14+01:00" level=error msg="http: TLS handshake error from 127.0.0.1:35834: remote error: tls: bad certificate" Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate Invalid x5c: x509: malformed certificate FAIL INTEGRATION: close test backend... FAIL github.com/avenga/couper/server 107.260s ok github.com/avenga/couper/server/writer 4.550s ? github.com/avenga/couper/telemetry [no test files] ? github.com/avenga/couper/telemetry/handler [no test files] ? github.com/avenga/couper/telemetry/instrumentation [no test files] ? github.com/avenga/couper/telemetry/provider [no test files] ok github.com/avenga/couper/utils 0.021s FAIL
TestEndpoint_RoundTripContext_Variables_json_body already fails with go1.19.6.
With go1.20.1 there are some failing tests: