Skip to content

Commit 59c4948

Browse files
authored
Update dependencies, and test dbs (#72)
1 parent 6dd93fd commit 59c4948

File tree

7 files changed

+82
-54
lines changed

7 files changed

+82
-54
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212

13-
- name: Set up Go 1.16
13+
- name: Set up Go 1.17
1414
uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.16
16+
go-version: 1.17
1717
id: go
1818

1919
- name: Check out code into the Go module directory

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212

13-
- name: Set up Go 1.16
13+
- name: Set up Go 1.17
1414
uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.16
16+
go-version: 1.17
1717
id: go
1818

1919
- name: Check out code into the Go module directory

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
CGO_ENABLED := $(or ${CGO_ENABLED},0)
33
GO := go
44
GO111MODULE := on
5-
PG_VERSION := $(or ${PG_VERSION},13-alpine)
6-
COCKROACH_VERSION := $(or ${COCKROACH_VERSION},v21.1.5)
5+
PG_VERSION := $(or ${PG_VERSION},14-alpine)
6+
COCKROACH_VERSION := $(or ${COCKROACH_VERSION},v21.2.2)
77

88
.EXPORT_ALL_VARIABLES:
99

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ go 1.16
44

55
require (
66
github.com/avast/retry-go/v3 v3.1.1
7-
github.com/go-redis/redis/v8 v8.11.1
7+
github.com/go-redis/redis/v8 v8.11.4
88
github.com/jmoiron/sqlx v1.3.4
9-
github.com/lib/pq v1.10.2
9+
github.com/lib/pq v1.10.4
1010
github.com/stretchr/testify v1.7.0
11-
github.com/testcontainers/testcontainers-go v0.11.1
12-
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 // indirect
11+
github.com/testcontainers/testcontainers-go v0.12.0
1312
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
14-
inet.af/netaddr v0.0.0-20210721214506-ce7a8ad02cc1
13+
inet.af/netaddr v0.0.0-20211027220019-c74959edd3b6
1514
)

go.sum

Lines changed: 63 additions & 33 deletions
Large diffs are not rendered by default.

integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ipam
22

33
import (
4-
"io/ioutil"
4+
"os"
55
"strings"
66
"testing"
77

@@ -13,7 +13,7 @@ func TestIntegration(t *testing.T) {
1313
_, storage, err := startPostgres()
1414
require.NoError(t, err)
1515
defer storage.db.Close()
16-
dump, err := ioutil.ReadFile("testdata/ipamt.dump.sql")
16+
dump, err := os.ReadFile("testdata/ipamt.dump.sql")
1717
require.NoError(t, err)
1818
require.NotNil(t, dump)
1919
storage.db.MustExec(string(dump))
@@ -140,7 +140,7 @@ func TestIntegrationP(t *testing.T) {
140140
_, storage, err := startPostgres()
141141
require.NoError(t, err)
142142
defer storage.db.Close()
143-
dump, err := ioutil.ReadFile("testdata/ipamp.dump.sql")
143+
dump, err := os.ReadFile("testdata/ipamp.dump.sql")
144144
require.NoError(t, err)
145145
require.NotNil(t, dump)
146146
storage.db.MustExec(string(dump))

testing_test.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ package ipam
33
import (
44
"context"
55
"fmt"
6-
"io/ioutil"
7-
"log"
6+
"io"
87
"os"
98
"sync"
109
"testing"
@@ -33,19 +32,19 @@ func TestMain(m *testing.M) {
3332
// call flag.Parse() here if TestMain uses flags
3433
pgVersion = os.Getenv("PG_VERSION")
3534
if pgVersion == "" {
36-
pgVersion = "13"
35+
pgVersion = "14"
3736
}
3837
cockroachVersion = os.Getenv("COCKROACH_VERSION")
3938
if cockroachVersion == "" {
40-
cockroachVersion = "v21.1.5"
39+
cockroachVersion = "v21.2.2"
4140
}
4241
redisVersion = os.Getenv("REDIS_VERSION")
4342
if redisVersion == "" {
44-
redisVersion = "6-alpine"
43+
redisVersion = "6.2-alpine"
4544
}
4645
keyDBVersion = os.Getenv("KEYDB_VERSION")
4746
if keyDBVersion == "" {
48-
keyDBVersion = "alpine_x86_64_v6.0.18"
47+
keyDBVersion = "alpine_x86_64_v6.2.1"
4948
}
5049
backend = os.Getenv("BACKEND")
5150
if backend == "" {
@@ -54,7 +53,7 @@ func TestMain(m *testing.M) {
5453
fmt.Printf("only test %s\n", backend)
5554
}
5655
// prevent testcontainer logging mangle test and benchmark output
57-
log.SetOutput(ioutil.Discard)
56+
testcontainers.Logger.SetOutput(io.Discard)
5857
os.Exit(m.Run())
5958
}
6059

0 commit comments

Comments
 (0)