Skip to content

Commit 4aee007

Browse files
chore(tests): Update test files to work with Docker Compose v2 (#82)
* Bump up testcontainers and migrate docker commands to v2 * Bump up go version * Update testcontainers docker compose method * Update linter versions * Remove deprecated io/ioutil method * Bump dependencies in plugin * Fix dump experiments test * Update go mod files
1 parent 6ef47af commit 4aee007

File tree

21 files changed

+1713
-2694
lines changed

21 files changed

+1713
-2694
lines changed

.github/workflows/plugins.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ on:
2424
workflow_dispatch:
2525

2626
env:
27-
GO_VERSION: 1.18
28-
GO_LINT_VERSION: v1.51.2
27+
GO_VERSION: 1.21
28+
GO_LINT_VERSION: v1.56.2
2929

3030
jobs:
3131
lint-go:

.github/workflows/xp.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ on:
2525

2626
env:
2727
ARTIFACT_RETENTION_DAYS: 7
28-
GO_VERSION: 1.18
29-
GO_LINT_VERSION: v1.51.2
28+
GO_VERSION: 1.21
29+
GO_LINT_VERSION: v1.56.2
3030

3131
jobs:
3232
lint-python:

Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ generate-api:
5959
# ==================================
6060

6161
local-authz-server:
62-
@docker-compose up -d postgres-auth && docker-compose run keto-server migrate sql -e
63-
@docker-compose up -d keto-server
64-
@docker-compose run keto-server-bootstrap-policies engines acp ory policies import glob /policies/example_policy.json
62+
@docker compose up -d postgres-auth && docker compose run keto-server migrate sql -e
63+
@docker compose up -d keto-server
64+
@docker compose run keto-server-bootstrap-policies engines acp ory policies import glob /policies/example_policy.json
6565

6666
local-db:
67-
@docker-compose up -d postgres
67+
@docker compose up -d postgres
6868

6969
local-pubsub:
70-
@docker-compose up -d pubsub
70+
@docker compose up -d pubsub
7171

7272
.PHONY: mgmt-svc
7373
mgmt-svc: local-authz-server local-db local-pubsub
@@ -79,7 +79,7 @@ treatment-svc: local-pubsub
7979
cd treatment-service && go run main.go serve
8080

8181
swagger-ui:
82-
@docker-compose up -d swagger-ui
82+
@docker compose up -d swagger-ui
8383
@xdg-open 2>/dev/null http://localhost:8081 || open http://localhost:8081
8484

8585
$(protoc_dir):
@@ -100,7 +100,7 @@ compile-protos: | $(protoc_dir)
100100
.PHONY: setup
101101
setup:
102102
@echo "> Initializing dependencies ..."
103-
@test -x ${GOPATH}/bin/golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2
103+
@test -x ${GOPATH}/bin/golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
104104

105105
@echo "Setting up dev tools..."
106106
@test -x "$(which pre-commit)" || pip install pre-commit
@@ -186,8 +186,8 @@ install-python-ci-dependencies:
186186
pip install -r tests/requirements.txt
187187

188188
e2e: build
189-
docker-compose down
190-
docker-compose up -d postgres pubsub
189+
docker compose down
190+
docker compose up -d postgres pubsub
191191
cd tests/e2e; python -m pytest -s -v
192192

193193
e2e-ci:

clients/go.mod

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
module github.com/caraml-dev/xp/clients
22

3-
go 1.18
3+
go 1.21
4+
5+
toolchain go1.22.3
46

57
require (
68
github.com/caraml-dev/xp/common v0.0.0
79
github.com/deepmap/oapi-codegen v1.11.0
810
github.com/pkg/errors v0.9.1
9-
github.com/stretchr/testify v1.8.0
11+
github.com/stretchr/testify v1.9.0
1012
)
1113

1214
require (
@@ -15,11 +17,11 @@ require (
1517
github.com/ghodss/yaml v1.0.0 // indirect
1618
github.com/go-openapi/jsonpointer v0.19.5 // indirect
1719
github.com/go-openapi/swag v0.21.1 // indirect
18-
github.com/google/uuid v1.3.0 // indirect
20+
github.com/google/uuid v1.6.0 // indirect
1921
github.com/josharian/intern v1.0.0 // indirect
2022
github.com/mailru/easyjson v0.7.7 // indirect
2123
github.com/pmezard/go-difflib v1.0.0 // indirect
22-
github.com/stretchr/objx v0.4.0 // indirect
24+
github.com/stretchr/objx v0.5.2 // indirect
2325
gopkg.in/yaml.v2 v2.4.0 // indirect
2426
gopkg.in/yaml.v3 v3.0.1 // indirect
2527
)

clients/go.sum

+3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
3737
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
3838
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
3939
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
40+
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
4041
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
4142
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
4243
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
@@ -88,6 +89,7 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po
8889
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
8990
github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
9091
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
92+
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
9193
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
9294
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
9395
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
@@ -96,6 +98,7 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
9698
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
9799
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
98100
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
101+
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
99102
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
100103
github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
101104
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=

0 commit comments

Comments
 (0)