diff --git a/integrations/c.Dockerfile b/integrations/c.Dockerfile index 6aaac1c52..83f900f9f 100644 --- a/integrations/c.Dockerfile +++ b/integrations/c.Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem @@ -19,4 +19,3 @@ ADD package.json /src/ RUN npm install ADD . /src - diff --git a/integrations/csharp.Dockerfile b/integrations/csharp.Dockerfile index c81b9ced0..249350187 100644 --- a/integrations/csharp.Dockerfile +++ b/integrations/csharp.Dockerfile @@ -1,5 +1,5 @@ -FROM node:20-alpine3.18 AS node -FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine3.18 +FROM node:22-alpine AS node +FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem @@ -14,8 +14,9 @@ RUN apk --no-cache add ca-certificates && \ # https://github.com/pyodide/pyodide/blob/1691d347d15a2c211cd49aebe6f15d42dfdf2369/Dockerfile#L105 COPY --from=node /usr/local/bin/node /usr/local/bin/ COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules -RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ - && ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx +RUN apk add --no-cache libstdc++ && \ + ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \ + ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx WORKDIR /src @@ -23,7 +24,7 @@ WORKDIR /src # folder with our test fixtures to run them # - install RestSharp into that project # - make a folder with the appropriate structure to hold the test fixtures -RUN dotnet new console -o IntTestCsharp -f net7.0 && \ +RUN dotnet new console -o IntTestCsharp -f net8.0 && \ cd IntTestCsharp && \ dotnet add package RestSharp && \ mkdir -p /src/IntTestCsharp/src/fixtures/files diff --git a/integrations/go.Dockerfile b/integrations/go.Dockerfile index 721852b9f..fc26e6f1c 100644 --- a/integrations/go.Dockerfile +++ b/integrations/go.Dockerfile @@ -1,4 +1,5 @@ -FROM golang:1.20.5-alpine3.18 +FROM node:22-alpine AS node +FROM golang:1.24-alpine3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem @@ -8,13 +9,20 @@ RUN apk --no-cache add ca-certificates && \ cp /root/integration-test.pem /usr/local/share/ca-certificates/ && \ update-ca-certificates -# XXX: do we eventually need to care about getting an exact version of node -# here? If so, see the csharp container for how to do that -RUN apk update && \ - apk add nodejs npm +COPY --from=node /usr/local/bin/node /usr/local/bin/ +COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules +RUN apk add --no-cache libstdc++ && \ + ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \ + ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx WORKDIR /src +# Pre-warm the Go build cache so the first integration test doesn't cold-compile +# the entire stdlib (net/http, io, strings, time, etc.) and hit vitest's 5s timeout. +RUN printf 'package main\nimport ("fmt";"io";"net/http";"strings";"time")\nfunc main(){_=fmt.Sprint;_=io.Discard;_=http.DefaultClient;_=strings.NewReader;_=time.Second}\n' > /tmp/warmup.go && \ + go run /tmp/warmup.go && \ + rm /tmp/warmup.go + # add pacakge.json first so we don't have to `npm install` unless it changes ADD package.json /src/ RUN npm install diff --git a/integrations/node.Dockerfile b/integrations/node.Dockerfile index f599f3082..db599478b 100755 --- a/integrations/node.Dockerfile +++ b/integrations/node.Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:22-alpine COPY integrations/https-cert/rootCA.pem /root/integration-test.pem diff --git a/integrations/php.Dockerfile b/integrations/php.Dockerfile index 1a90f0605..e876152de 100644 --- a/integrations/php.Dockerfile +++ b/integrations/php.Dockerfile @@ -4,7 +4,7 @@ WORKDIR /composer/ # https://packagist.org/packages/guzzlehttp/guzzle RUN composer require guzzlehttp/guzzle -FROM alpine:3.18 +FROM alpine:3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem COPY --from=builder /composer/vendor /src/vendor @@ -16,7 +16,8 @@ RUN apk --no-cache add ca-certificates && \ update-ca-certificates RUN apk update && \ - apk add nodejs npm php81 php81-fpm php81-opcache php81-curl + apk add nodejs npm php83 php83-fpm php83-opcache php83-curl && \ + ln -sf /usr/bin/php83 /usr/bin/php WORKDIR /src diff --git a/integrations/python.Dockerfile b/integrations/python.Dockerfile index 864965702..33e12a779 100644 --- a/integrations/python.Dockerfile +++ b/integrations/python.Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem @@ -9,8 +9,7 @@ RUN apk --no-cache add ca-certificates && \ update-ca-certificates RUN apk update && \ - apk add nodejs npm python3 py3-pip && \ - pip install requests + apk add nodejs npm python3 py3-requests WORKDIR /src @@ -20,4 +19,3 @@ ADD package.json /src/ RUN npm install ADD . /src - diff --git a/integrations/shell.Dockerfile b/integrations/shell.Dockerfile index 0d6297b96..91e34e59b 100644 --- a/integrations/shell.Dockerfile +++ b/integrations/shell.Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.18 +FROM alpine:3.22 COPY integrations/https-cert/rootCA.pem /root/integration-test.pem diff --git a/src/fixtures/requests/cookies.cjs b/src/fixtures/requests/cookies.cjs index 231a46784..be5858bb7 100644 --- a/src/fixtures/requests/cookies.cjs +++ b/src/fixtures/requests/cookies.cjs @@ -35,8 +35,10 @@ module.exports = { size: -1, mimeType: 'application/json', text: JSON.stringify({ - bar: 'baz', - foo: 'bar', + cookies: { + bar: 'baz', + foo: 'bar', + }, }), }, headersSize: -1,