chore: bump testcontainers to latest released version (#23858)
* chore: bump testcontainers to v0.15.0 * chore: run go mod tidy * chore: update test to latest version of testcontainers * chore: update package * fix: use collectors.NewGoCollector instead SA1019 detected by staticcheckpull/23959/head
parent
ef098ac65f
commit
26daa86648
|
@ -77,6 +77,7 @@ import (
|
||||||
telegrafservice "github.com/influxdata/influxdb/v2/telegraf/service"
|
telegrafservice "github.com/influxdata/influxdb/v2/telegraf/service"
|
||||||
"github.com/influxdata/influxdb/v2/telemetry"
|
"github.com/influxdata/influxdb/v2/telemetry"
|
||||||
"github.com/influxdata/influxdb/v2/tenant"
|
"github.com/influxdata/influxdb/v2/tenant"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/collectors"
|
||||||
|
|
||||||
// needed for tsm1
|
// needed for tsm1
|
||||||
_ "github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
_ "github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||||
|
@ -90,7 +91,6 @@ import (
|
||||||
"github.com/influxdata/influxdb/v2/vault"
|
"github.com/influxdata/influxdb/v2/vault"
|
||||||
pzap "github.com/influxdata/influxdb/v2/zap"
|
pzap "github.com/influxdata/influxdb/v2/zap"
|
||||||
"github.com/opentracing/opentracing-go"
|
"github.com/opentracing/opentracing-go"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
jaegerconfig "github.com/uber/jaeger-client-go/config"
|
jaegerconfig "github.com/uber/jaeger-client-go/config"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
@ -249,7 +249,7 @@ func (m *Launcher) run(ctx context.Context, opts *InfluxdOpts) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
m.reg = prom.NewRegistry(m.log.With(zap.String("service", "prom_registry")))
|
m.reg = prom.NewRegistry(m.log.With(zap.String("service", "prom_registry")))
|
||||||
m.reg.MustRegister(prometheus.NewGoCollector())
|
m.reg.MustRegister(collectors.NewGoCollector())
|
||||||
|
|
||||||
// Open KV and SQL stores.
|
// Open KV and SQL stores.
|
||||||
procID, err := m.openMetaStores(ctx, opts)
|
procID, err := m.openMetaStores(ctx, opts)
|
||||||
|
|
82
go.mod
82
go.mod
|
@ -22,10 +22,10 @@ require (
|
||||||
github.com/go-stack/stack v1.8.0
|
github.com/go-stack/stack v1.8.0
|
||||||
github.com/golang-jwt/jwt v3.2.1+incompatible
|
github.com/golang-jwt/jwt v3.2.1+incompatible
|
||||||
github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021
|
github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021
|
||||||
github.com/golang/mock v1.5.0
|
github.com/golang/mock v1.6.0
|
||||||
github.com/golang/snappy v0.0.4
|
github.com/golang/snappy v0.0.4
|
||||||
github.com/google/btree v1.0.1
|
github.com/google/btree v1.0.1
|
||||||
github.com/google/go-cmp v0.5.7
|
github.com/google/go-cmp v0.5.9
|
||||||
github.com/google/go-jsonnet v0.17.0
|
github.com/google/go-jsonnet v0.17.0
|
||||||
github.com/hashicorp/vault/api v1.0.2
|
github.com/hashicorp/vault/api v1.0.2
|
||||||
github.com/influxdata/cron v0.0.0-20201006132531-4bb0a200dcbe
|
github.com/influxdata/cron v0.0.0-20201006132531-4bb0a200dcbe
|
||||||
|
@ -41,21 +41,21 @@ require (
|
||||||
github.com/kevinburke/go-bindata v3.22.0+incompatible
|
github.com/kevinburke/go-bindata v3.22.0+incompatible
|
||||||
github.com/mattn/go-isatty v0.0.14
|
github.com/mattn/go-isatty v0.0.14
|
||||||
github.com/mattn/go-sqlite3 v1.14.7
|
github.com/mattn/go-sqlite3 v1.14.7
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.1
|
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369
|
||||||
github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5
|
github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5
|
||||||
github.com/mna/pigeon v1.0.1-0.20180808201053-bb0192cfc2ae
|
github.com/mna/pigeon v1.0.1-0.20180808201053-bb0192cfc2ae
|
||||||
github.com/opentracing/opentracing-go v1.2.0
|
github.com/opentracing/opentracing-go v1.2.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/prometheus/client_golang v1.5.1
|
github.com/prometheus/client_golang v1.11.1
|
||||||
github.com/prometheus/client_model v0.2.0
|
github.com/prometheus/client_model v0.2.0
|
||||||
github.com/prometheus/common v0.9.1
|
github.com/prometheus/common v0.30.0
|
||||||
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52
|
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52
|
||||||
github.com/spf13/cast v1.3.0
|
github.com/spf13/cast v1.3.0
|
||||||
github.com/spf13/cobra v1.0.0
|
github.com/spf13/cobra v1.0.0
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
github.com/spf13/viper v1.6.1
|
github.com/spf13/viper v1.6.1
|
||||||
github.com/stretchr/testify v1.8.0
|
github.com/stretchr/testify v1.8.0
|
||||||
github.com/testcontainers/testcontainers-go v0.0.0-20190108154635-47c0da630f72
|
github.com/testcontainers/testcontainers-go v0.15.0
|
||||||
github.com/tinylib/msgp v1.1.0
|
github.com/tinylib/msgp v1.1.0
|
||||||
github.com/uber/jaeger-client-go v2.28.0+incompatible
|
github.com/uber/jaeger-client-go v2.28.0+incompatible
|
||||||
github.com/xlab/treeprint v1.0.0
|
github.com/xlab/treeprint v1.0.0
|
||||||
|
@ -64,13 +64,13 @@ require (
|
||||||
go.uber.org/multierr v1.6.0
|
go.uber.org/multierr v1.6.0
|
||||||
go.uber.org/zap v1.16.0
|
go.uber.org/zap v1.16.0
|
||||||
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29
|
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29
|
||||||
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
|
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
|
||||||
golang.org/x/text v0.3.7
|
golang.org/x/text v0.3.7
|
||||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
|
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
|
||||||
golang.org/x/tools v0.1.11-0.20220316014157-77aa08bb151a
|
golang.org/x/tools v0.1.11
|
||||||
google.golang.org/protobuf v1.28.1
|
google.golang.org/protobuf v1.28.1
|
||||||
gopkg.in/yaml.v2 v2.3.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
honnef.co/go/tools v0.3.0
|
honnef.co/go/tools v0.3.0
|
||||||
)
|
)
|
||||||
|
@ -82,6 +82,7 @@ require (
|
||||||
github.com/AlecAivazis/survey/v2 v2.3.4 // indirect
|
github.com/AlecAivazis/survey/v2 v2.3.4 // indirect
|
||||||
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
|
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
|
||||||
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
|
github.com/Azure/azure-storage-blob-go v0.14.0 // indirect
|
||||||
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||||
github.com/Azure/go-autorest/autorest v0.11.9 // indirect
|
github.com/Azure/go-autorest/autorest v0.11.9 // indirect
|
||||||
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
|
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
|
||||||
|
@ -93,7 +94,8 @@ require (
|
||||||
github.com/DATA-DOG/go-sqlmock v1.4.1 // indirect
|
github.com/DATA-DOG/go-sqlmock v1.4.1 // indirect
|
||||||
github.com/Masterminds/semver v1.4.2 // indirect
|
github.com/Masterminds/semver v1.4.2 // indirect
|
||||||
github.com/Masterminds/sprig v2.16.0+incompatible // indirect
|
github.com/Masterminds/sprig v2.16.0+incompatible // indirect
|
||||||
github.com/Microsoft/go-winio v0.4.11 // indirect
|
github.com/Microsoft/go-winio v0.5.2 // indirect
|
||||||
|
github.com/Microsoft/hcsshim v0.9.4 // indirect
|
||||||
github.com/SAP/go-hdb v0.14.1 // indirect
|
github.com/SAP/go-hdb v0.14.1 // indirect
|
||||||
github.com/aokoli/goutils v1.0.1 // indirect
|
github.com/aokoli/goutils v1.0.1 // indirect
|
||||||
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
|
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40 // indirect
|
||||||
|
@ -112,43 +114,46 @@ require (
|
||||||
github.com/benbjohnson/immutable v0.3.0 // indirect
|
github.com/benbjohnson/immutable v0.3.0 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0 // indirect
|
github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||||
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
|
github.com/containerd/cgroups v1.0.4 // indirect
|
||||||
|
github.com/containerd/containerd v1.6.8 // indirect
|
||||||
github.com/deepmap/oapi-codegen v1.6.0 // indirect
|
github.com/deepmap/oapi-codegen v1.6.0 // indirect
|
||||||
github.com/denisenkom/go-mssqldb v0.10.0 // indirect
|
github.com/denisenkom/go-mssqldb v0.10.0 // indirect
|
||||||
github.com/dimchansky/utfbom v1.1.0 // indirect
|
github.com/dimchansky/utfbom v1.1.0 // indirect
|
||||||
github.com/docker/distribution v2.7.0+incompatible // indirect
|
github.com/docker/distribution v2.8.1+incompatible // indirect
|
||||||
github.com/docker/docker v1.13.1 // indirect
|
github.com/docker/docker v20.10.17+incompatible // indirect
|
||||||
github.com/docker/go-connections v0.4.0 // indirect
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
github.com/docker/go-units v0.3.3 // indirect
|
github.com/docker/go-units v0.5.0 // indirect
|
||||||
github.com/eclipse/paho.mqtt.golang v1.2.0 // indirect
|
github.com/eclipse/paho.mqtt.golang v1.2.0 // indirect
|
||||||
github.com/editorconfig/editorconfig-core-go/v2 v2.1.1 // indirect
|
github.com/editorconfig/editorconfig-core-go/v2 v2.1.1 // indirect
|
||||||
github.com/fatih/color v1.13.0 // indirect
|
github.com/fatih/color v1.13.0 // indirect
|
||||||
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
|
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
|
||||||
github.com/fsnotify/fsnotify v1.4.7 // indirect
|
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||||
github.com/gabriel-vasile/mimetype v1.4.0 // indirect
|
github.com/gabriel-vasile/mimetype v1.4.0 // indirect
|
||||||
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
|
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
|
||||||
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 // indirect
|
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 // indirect
|
||||||
github.com/go-sql-driver/mysql v1.5.0 // indirect
|
github.com/go-sql-driver/mysql v1.6.0 // indirect
|
||||||
github.com/goccy/go-json v0.9.6 // indirect
|
github.com/goccy/go-json v0.9.6 // indirect
|
||||||
github.com/gofrs/uuid v3.3.0+incompatible // indirect
|
github.com/gofrs/uuid v3.3.0+incompatible // indirect
|
||||||
github.com/gogo/protobuf v1.3.2 // indirect
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
|
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
|
||||||
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec // indirect
|
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec // indirect
|
||||||
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.2 // indirect
|
||||||
github.com/google/flatbuffers v22.9.30-0.20221019131441-5792623df42e+incompatible // indirect
|
github.com/google/flatbuffers v22.9.30-0.20221019131441-5792623df42e+incompatible // indirect
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
|
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
|
||||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
|
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
|
||||||
github.com/hashicorp/go-multierror v1.0.0 // indirect
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/hashicorp/go-retryablehttp v0.6.4 // indirect
|
github.com/hashicorp/go-retryablehttp v0.6.4 // indirect
|
||||||
github.com/hashicorp/go-rootcerts v1.0.0 // indirect
|
github.com/hashicorp/go-rootcerts v1.0.0 // indirect
|
||||||
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
|
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
|
||||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
github.com/hashicorp/vault/sdk v0.1.8 // indirect
|
github.com/hashicorp/vault/sdk v0.1.8 // indirect
|
||||||
github.com/huandu/xstrings v1.0.0 // indirect
|
github.com/huandu/xstrings v1.0.0 // indirect
|
||||||
github.com/imdario/mergo v0.3.9 // indirect
|
github.com/imdario/mergo v0.3.12 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||||
github.com/influxdata/gosnowflake v1.6.9 // indirect
|
github.com/influxdata/gosnowflake v1.6.9 // indirect
|
||||||
github.com/influxdata/influxdb-client-go/v2 v2.3.1-0.20210518120617-5d1fff431040 // indirect
|
github.com/influxdata/influxdb-client-go/v2 v2.3.1-0.20210518120617-5d1fff431040 // indirect
|
||||||
|
@ -162,29 +167,32 @@ require (
|
||||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
||||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
||||||
github.com/lib/pq v1.2.0 // indirect
|
github.com/lib/pq v1.2.0 // indirect
|
||||||
github.com/magiconair/properties v1.8.1 // indirect
|
github.com/magiconair/properties v1.8.6 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.12 // indirect
|
github.com/mattn/go-colorable v0.1.12 // indirect
|
||||||
github.com/mattn/go-ieproxy v0.0.1 // indirect
|
github.com/mattn/go-ieproxy v0.0.1 // indirect
|
||||||
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
|
||||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||||
github.com/mitchellh/mapstructure v1.1.2 // indirect
|
github.com/mitchellh/mapstructure v1.1.2 // indirect
|
||||||
|
github.com/moby/sys/mount v0.3.3 // indirect
|
||||||
|
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||||
|
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
|
||||||
|
github.com/morikuni/aec v1.0.0 // indirect
|
||||||
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
|
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
|
||||||
github.com/onsi/ginkgo v1.11.0 // indirect
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
github.com/onsi/gomega v1.8.1 // indirect
|
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
|
||||||
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
|
github.com/opencontainers/runc v1.1.3 // indirect
|
||||||
github.com/pelletier/go-toml v1.2.0 // indirect
|
github.com/pelletier/go-toml v1.9.3 // indirect
|
||||||
github.com/philhofer/fwd v1.0.0 // indirect
|
github.com/philhofer/fwd v1.0.0 // indirect
|
||||||
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
|
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
|
||||||
github.com/pierrec/lz4/v4 v4.1.12 // indirect
|
github.com/pierrec/lz4/v4 v4.1.12 // indirect
|
||||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/procfs v0.0.11 // indirect
|
github.com/prometheus/procfs v0.7.3 // indirect
|
||||||
github.com/ryanuber/go-glob v1.0.0 // indirect
|
github.com/ryanuber/go-glob v1.0.0 // indirect
|
||||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
|
|
||||||
github.com/segmentio/kafka-go v0.2.0 // indirect
|
github.com/segmentio/kafka-go v0.2.0 // indirect
|
||||||
github.com/sergi/go-diff v1.1.0 // indirect
|
github.com/sergi/go-diff v1.1.0 // indirect
|
||||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||||
github.com/spf13/afero v1.1.2 // indirect
|
github.com/spf13/afero v1.2.2 // indirect
|
||||||
github.com/spf13/jwalterweatherman v1.0.0 // indirect
|
github.com/spf13/jwalterweatherman v1.0.0 // indirect
|
||||||
github.com/stretchr/objx v0.4.0 // indirect
|
github.com/stretchr/objx v0.4.0 // indirect
|
||||||
github.com/subosito/gotenv v1.2.0 // indirect
|
github.com/subosito/gotenv v1.2.0 // indirect
|
||||||
|
@ -192,7 +200,7 @@ require (
|
||||||
github.com/uber/athenadriver v1.1.4 // indirect
|
github.com/uber/athenadriver v1.1.4 // indirect
|
||||||
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
|
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
|
||||||
github.com/vertica/vertica-sql-go v1.1.1 // indirect
|
github.com/vertica/vertica-sql-go v1.1.1 // indirect
|
||||||
github.com/willf/bitset v1.1.9 // indirect
|
github.com/willf/bitset v1.1.11 // indirect
|
||||||
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
|
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
|
||||||
github.com/yudai/pp v2.0.1+incompatible // indirect
|
github.com/yudai/pp v2.0.1+incompatible // indirect
|
||||||
go.opencensus.io v0.23.0 // indirect
|
go.opencensus.io v0.23.0 // indirect
|
||||||
|
@ -200,18 +208,18 @@ require (
|
||||||
golang.org/x/exp v0.0.0-20211216164055-b2b84827b756 // indirect
|
golang.org/x/exp v0.0.0-20211216164055-b2b84827b756 // indirect
|
||||||
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
|
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
|
||||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
|
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||||
golang.org/x/net v0.0.0-20220401154927-543a649e0bdd // indirect
|
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9 // indirect
|
||||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c // indirect
|
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
|
||||||
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
|
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
|
||||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
||||||
gonum.org/v1/gonum v0.11.0 // indirect
|
gonum.org/v1/gonum v0.11.0 // indirect
|
||||||
google.golang.org/api v0.47.0 // indirect
|
google.golang.org/api v0.47.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 // indirect
|
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad // indirect
|
||||||
google.golang.org/grpc v1.44.0 // indirect
|
google.golang.org/grpc v1.47.0 // indirect
|
||||||
gopkg.in/ini.v1 v1.51.0 // indirect
|
gopkg.in/ini.v1 v1.51.0 // indirect
|
||||||
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
|
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/nats-io/nats-streaming-server v0.11.2 => github.com/influxdata/nats-streaming-server v0.11.3-0.20201112040610-c277f7560803
|
replace github.com/nats-io/nats-streaming-server v0.11.2 => github.com/influxdata/nats-streaming-server v0.11.3-0.20201112040610-c277f7560803
|
||||||
|
|
|
@ -10,24 +10,34 @@ import (
|
||||||
"github.com/influxdata/influxdb/v2"
|
"github.com/influxdata/influxdb/v2"
|
||||||
influxdbtesting "github.com/influxdata/influxdb/v2/testing"
|
influxdbtesting "github.com/influxdata/influxdb/v2/testing"
|
||||||
"github.com/influxdata/influxdb/v2/vault"
|
"github.com/influxdata/influxdb/v2/vault"
|
||||||
testcontainer "github.com/testcontainers/testcontainers-go"
|
testcontainers "github.com/testcontainers/testcontainers-go"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initSecretService(f influxdbtesting.SecretServiceFields, t *testing.T) (influxdb.SecretService, func()) {
|
func initSecretService(f influxdbtesting.SecretServiceFields, t *testing.T) (influxdb.SecretService, func()) {
|
||||||
token := "test"
|
token := "test"
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
vaultC, err := testcontainer.RunContainer(ctx, "vault", testcontainer.RequestContainer{
|
vaultC, err := GenericContainer(ctx, testcontainers.GenericContainerRequest{
|
||||||
ExportedPort: []string{
|
ContainerRequest: testcontainers.ContainerRequest{
|
||||||
"8200/tcp",
|
Image: "docker.io/vault:latest",
|
||||||
|
ExposedPorts: []string{
|
||||||
|
"8200/tcp",
|
||||||
|
},
|
||||||
|
Cmd: fmt.Sprintf(`vault server -dev -dev-listen-address 0.0.0.0:8200 -dev-root-token-id=%s`, token),
|
||||||
},
|
},
|
||||||
Cmd: fmt.Sprintf(`vault server -dev -dev-listen-address 0.0.0.0:8200 -dev-root-token-id=%s`, token),
|
Started: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("failed to initialize vault testcontiner: %v", err)
|
t.Fatalf("failed to initialize vault container: %v", err)
|
||||||
}
|
}
|
||||||
ip, port, err := vaultC.GetHostEndpoint(ctx, "8200/tcp")
|
|
||||||
|
host, err := vaultC.Host(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatalf("failed to get host from vault container: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
port, err := vaultC.MappedPort(ctx, "8200/tcp")
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("failed to get exposed 8200 port from vault container: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
s, err := vault.NewSecretService()
|
s, err := vault.NewSecretService()
|
||||||
|
@ -35,7 +45,7 @@ func initSecretService(f influxdbtesting.SecretServiceFields, t *testing.T) (inf
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
s.Client.SetToken(token)
|
s.Client.SetToken(token)
|
||||||
s.Client.SetAddress(fmt.Sprintf("http://%v:%v", ip, port))
|
s.Client.SetAddress(fmt.Sprintf("http://%v:%v", host, port.Int()))
|
||||||
|
|
||||||
for _, sec := range f.Secrets {
|
for _, sec := range f.Secrets {
|
||||||
for k, v := range sec.Env {
|
for k, v := range sec.Env {
|
||||||
|
|
Loading…
Reference in New Issue