Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions integrations/c.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.22

COPY integrations/https-cert/rootCA.pem /root/integration-test.pem

Expand All @@ -19,4 +19,3 @@ ADD package.json /src/
RUN npm install

ADD . /src

11 changes: 6 additions & 5 deletions integrations/csharp.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -14,16 +14,17 @@ 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

# - create a "hello world" project. We will later overwrite Program.cs in that
# 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
Expand Down
18 changes: 13 additions & 5 deletions integrations/go.Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion integrations/node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:22-alpine

COPY integrations/https-cert/rootCA.pem /root/integration-test.pem

Expand Down
5 changes: 3 additions & 2 deletions integrations/php.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
6 changes: 2 additions & 4 deletions integrations/python.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.22

COPY integrations/https-cert/rootCA.pem /root/integration-test.pem

Expand All @@ -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

Expand All @@ -20,4 +19,3 @@ ADD package.json /src/
RUN npm install

ADD . /src

2 changes: 1 addition & 1 deletion integrations/shell.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.18
FROM alpine:3.22

COPY integrations/https-cert/rootCA.pem /root/integration-test.pem

Expand Down
6 changes: 4 additions & 2 deletions src/fixtures/requests/cookies.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down