Skip to content

Commit

Permalink
chore(test): upgrade graphql tests to use go 1.19 (#8662)
Browse files Browse the repository at this point in the history
GraphQL tests are failing while building images. An example CI run is here
https://github.com/dgraph-io/dgraph/actions/runs/4140817871/jobs/7196716657.

```
Step 5/9 : RUN go get github.com/graph-gophers/graphql-go
 ---> Running in 5a79b91313d5
# github.com/graph-gophers/graphql-go/internal/exec/resolvable
Error: src/github.com/graph-gophers/graphql-go/internal/exec/resolvable/resolvable.go:96:20: undefined: reflect.Pointer
Error: src/github.com/graph-gophers/graphql-go/internal/exec/resolvable/resolvable.go:105:9: undefined: reflect.Pointer
While running command: "docker-compose --compatibility -f ../graphql/e2e/custom_logic/docker-compose.yml -p test-652-25 up --force-recreate --build --remove-orphans --detach" Error: exit status 1
```
  • Loading branch information
mangalaman93 authored Feb 13, 2023
1 parent 6a10eb9 commit 2138d6d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion contrib/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function restartCluster {
-v dgraph_gocache:/root/.cache/go-build \
-v `pwd`/..:/app \
-w /app/dgraph \
golang:1.14 \
golang:1.19.5 \
go build -o /app/osx-docker-gopath/bin/dgraph
fi

Expand Down
17 changes: 7 additions & 10 deletions graphql/e2e/custom_logic/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM golang:1.19.5-alpine3.17

FROM golang:1.14.2-alpine3.11
COPY . /go/src/cmd/

COPY . .
WORKDIR /go/src/cmd

RUN apk update && apk add git && apk add nodejs && apk add npm
RUN go mod tidy

RUN go get gopkg.in/yaml.v2
RUN go build -o main main.go

RUN go get github.com/graph-gophers/graphql-go
RUN apk update && apk add git && apk add nodejs && apk add npm

RUN npm install

RUN go build -o main main.go

WORKDIR .

CMD ./main
CMD ./main
8 changes: 8 additions & 0 deletions graphql/e2e/custom_logic/cmd/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/dgraph-io/dgraph/graphql/e2e/custom_logic/cmd

go 1.19

require (
github.com/graph-gophers/graphql-go v1.5.0
gopkg.in/yaml.v2 v2.4.0
)
20 changes: 20 additions & 0 deletions graphql/e2e/custom_logic/cmd/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/graph-gophers/graphql-go v1.5.0 h1:fDqblo50TEpD0LY7RXk/LFVYEVqo3+tXMNMPSVXA1yc=
github.com/graph-gophers/graphql-go v1.5.0/go.mod h1:YtmJZDLbF1YYNrlNAuiO5zAStUWc3XZT07iGsVqe1Os=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.opentelemetry.io/otel v1.6.3/go.mod h1:7BgNga5fNlF/iZjG06hM3yofffp0ofKCDwSXx1GC4dI=
go.opentelemetry.io/otel/trace v1.6.3/go.mod h1:GNJQusJlUgZl9/TQBPKU/Y/ty+0iVB5fjhKeJGZPGFs=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 2138d6d

Please sign in to comment.