From eff294829ff75c508aeca8c83c46f6a7979d6af2 Mon Sep 17 00:00:00 2001 From: Baptiste Mayelle Date: Thu, 4 Jan 2024 14:58:05 +0100 Subject: [PATCH 1/3] Add missing TCP IPAllowList middleware constructor Co-authored-by: Romain --- .../tcp/{ip-whitelist.toml => ip-allowlist.toml} | 8 ++++---- integration/tcp_test.go | 4 ++-- pkg/server/middleware/tcp/middlewares.go | 10 ++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) rename integration/fixtures/tcp/{ip-whitelist.toml => ip-allowlist.toml} (83%) diff --git a/integration/fixtures/tcp/ip-whitelist.toml b/integration/fixtures/tcp/ip-allowlist.toml similarity index 83% rename from integration/fixtures/tcp/ip-whitelist.toml rename to integration/fixtures/tcp/ip-allowlist.toml index 2718f0544..947a7b714 100644 --- a/integration/fixtures/tcp/ip-whitelist.toml +++ b/integration/fixtures/tcp/ip-allowlist.toml @@ -23,7 +23,7 @@ entryPoints = ["tcp"] rule = "HostSNI(`whoami-a.test`)" service = "whoami-a" - middlewares = ["blocking-ipwhitelist"] + middlewares = ["blocking-allowlist"] [tcp.routers.to-whoami-a.tls] passthrough = true @@ -31,7 +31,7 @@ entryPoints = ["tcp"] rule = "HostSNI(`whoami-b.test`)" service = "whoami-b" - middlewares = ["allowing-ipwhitelist"] + middlewares = ["allowing-allowlist"] [tcp.routers.to-whoami-b.tls] passthrough = true @@ -45,7 +45,7 @@ address = "{{ .WhoamiB }}" [tcp.middlewares] - [tcp.middlewares.allowing-ipwhitelist.ipWhiteList] + [tcp.middlewares.allowing-allowlist.ipAllowList] sourceRange = ["127.0.0.1/32"] - [tcp.middlewares.blocking-ipwhitelist.ipWhiteList] + [tcp.middlewares.blocking-allowlist.ipAllowList] sourceRange = ["127.127.127.127/32"] diff --git a/integration/tcp_test.go b/integration/tcp_test.go index 0a60ae5b4..707dc1c79 100644 --- a/integration/tcp_test.go +++ b/integration/tcp_test.go @@ -249,8 +249,8 @@ func (s *TCPSuite) TestCatchAllNoTLSWithHTTPS(c *check.C) { c.Assert(err, checker.IsNil) } -func (s *TCPSuite) TestMiddlewareWhiteList(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/ip-whitelist.toml", struct { +func (s *TCPSuite) TestMiddlewareAllowList(c *check.C) { + file := s.adaptFile(c, "fixtures/tcp/ip-allowlist.toml", struct { WhoamiA string WhoamiB string }{ diff --git a/pkg/server/middleware/tcp/middlewares.go b/pkg/server/middleware/tcp/middlewares.go index 7e1ad1e17..5599a956c 100644 --- a/pkg/server/middleware/tcp/middlewares.go +++ b/pkg/server/middleware/tcp/middlewares.go @@ -6,7 +6,9 @@ import ( "strings" "github.com/traefik/traefik/v2/pkg/config/runtime" + "github.com/traefik/traefik/v2/pkg/log" inflightconn "github.com/traefik/traefik/v2/pkg/middlewares/tcp/inflightconn" + "github.com/traefik/traefik/v2/pkg/middlewares/tcp/ipallowlist" ipwhitelist "github.com/traefik/traefik/v2/pkg/middlewares/tcp/ipwhitelist" "github.com/traefik/traefik/v2/pkg/server/provider" "github.com/traefik/traefik/v2/pkg/tcp" @@ -94,8 +96,16 @@ func (b *Builder) buildConstructor(ctx context.Context, middlewareName string) ( } } + // IPAllowList + if config.IPAllowList != nil { + middleware = func(next tcp.Handler) (tcp.Handler, error) { + return ipallowlist.New(ctx, next, *config.IPAllowList, middlewareName) + } + } + // IPWhiteList if config.IPWhiteList != nil { + log.FromContext(ctx).Warn("IPWhiteList is deprecated, please use IPAllowList instead.") middleware = func(next tcp.Handler) (tcp.Handler, error) { return ipwhitelist.New(ctx, next, *config.IPWhiteList, middlewareName) } From cd8d5b8f107ae89ed8cea59c56cb2ace011f8761 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Fri, 5 Jan 2024 15:10:05 +0100 Subject: [PATCH 2/3] chore: update github.com/docker/docker to v24.0.7 --- .golangci.yml | 1 + go.mod | 141 +++-- go.sum | 976 ++++++++--------------------- integration/docker_compose_test.go | 6 +- integration/docker_test.go | 6 +- integration/integration_test.go | 167 ++++- 6 files changed, 494 insertions(+), 803 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 246fea4fa..86b761fa8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -151,6 +151,7 @@ linters-settings: - github.com/mailgun/minheap - github.com/mailgun/multibuf - github.com/jaguilar/vt100 + - github.com/cucumber/godog testifylint: enable: - bool-compare diff --git a/go.mod b/go.mod index 96545f462..6b04cccc6 100644 --- a/go.mod +++ b/go.mod @@ -9,13 +9,12 @@ require ( github.com/abbot/go-http-auth v0.0.0-00010101000000-000000000000 github.com/aws/aws-sdk-go v1.44.327 github.com/cenkalti/backoff/v4 v4.2.1 - github.com/compose-spec/compose-go v1.0.3 github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/docker/cli v20.10.11+incompatible - github.com/docker/compose/v2 v2.0.1 - github.com/docker/docker v20.10.21+incompatible + github.com/docker/cli v24.0.7+incompatible + github.com/docker/compose/v2 v2.19.0 + github.com/docker/docker v24.0.7+incompatible github.com/docker/go-connections v0.4.0 github.com/fatih/structs v1.1.0 github.com/fsnotify/fsnotify v1.7.0 @@ -35,7 +34,7 @@ require ( github.com/influxdata/influxdb-client-go/v2 v2.7.0 github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d github.com/instana/go-sensor v1.38.3 - github.com/klauspost/compress v1.17.1 + github.com/klauspost/compress v1.17.2 github.com/kvtools/consul v1.0.2 github.com/kvtools/etcdv3 v1.0.2 github.com/kvtools/redis v1.1.0 @@ -59,6 +58,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.8.4 github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 + github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a github.com/traefik/paerser v0.2.0 github.com/traefik/yaegi v0.15.1 github.com/uber/jaeger-client-go v2.30.0+incompatible @@ -75,7 +75,7 @@ require ( golang.org/x/text v0.13.0 golang.org/x/time v0.3.0 golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 - google.golang.org/grpc v1.58.3 + google.golang.org/grpc v1.59.0 gopkg.in/DataDog/dd-trace-go.v1 v1.56.1 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.26.3 @@ -90,8 +90,9 @@ require ( require ( cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 // indirect - github.com/AlecAivazis/survey/v2 v2.2.3 // indirect + github.com/AlecAivazis/survey/v2 v2.3.7 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect @@ -118,17 +119,15 @@ require ( github.com/DataDog/sketches-go v1.4.2 // indirect github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.8.25 // indirect github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect github.com/VividCortex/gohistogram v1.0.0 // indirect - github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 // indirect github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755 // indirect github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/armon/go-radix v1.0.0 // indirect + github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c // indirect github.com/aws/aws-sdk-go-v2 v1.20.3 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.28 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.27 // indirect @@ -145,30 +144,30 @@ require ( github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect - github.com/buger/goterm v1.0.0 // indirect + github.com/buger/goterm v1.0.4 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/civo/civogo v0.3.11 // indirect github.com/cloudflare/cloudflare-go v0.70.0 // indirect - github.com/compose-spec/godotenv v1.0.0 // indirect - github.com/containerd/cgroups v1.0.3 // indirect + github.com/compose-spec/compose-go v1.15.0 // indirect github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.5.17 // indirect - github.com/containerd/continuity v0.3.0 // indirect - github.com/containerd/typeurl v1.0.2 // indirect + github.com/containerd/containerd v1.7.2 // indirect + github.com/containerd/continuity v0.4.1 // indirect + github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpu/goacmedns v0.1.1 // indirect + github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/deepmap/oapi-codegen v1.9.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e // indirect + github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493 // indirect github.com/dnsimple/dnsimple-go v1.2.0 // indirect - github.com/docker/buildx v0.5.2-0.20210422185057-908a856079fc // indirect + github.com/docker/buildx v0.11.2 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.6.4-0.20210125172408-38bea2ce277a // indirect + github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect github.com/docker/go-metrics v0.0.1 // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/ebitengine/purego v0.5.0-alpha.1 // indirect @@ -179,26 +178,29 @@ require ( github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/exoscale/egoscale v0.100.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/fvbommel/sortorder v1.0.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsevents v0.1.1 // indirect + github.com/fvbommel/sortorder v1.0.2 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.14 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect - github.com/gofrs/flock v0.8.0 // indirect - github.com/gogo/googleapis v1.4.0 // indirect + github.com/gofrs/flock v0.8.1 // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect @@ -211,7 +213,7 @@ require ( github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae // indirect github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/cronexpr v1.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -222,15 +224,15 @@ require ( github.com/hashicorp/serf v0.10.1 // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/in-toto/in-toto-golang v0.9.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/infobloxopen/infoblox-go-client v1.1.1 // indirect - github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea // indirect github.com/jcchavezs/porto v0.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect - github.com/jonboulle/clockwork v0.2.2 // indirect + github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect @@ -250,18 +252,23 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-shellwords v1.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/miekg/pkcs11 v1.0.3 // indirect + github.com/miekg/pkcs11 v1.1.1 // indirect github.com/mimuret/golang-iij-dpf v0.9.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.1 // indirect - github.com/moby/buildkit v0.8.2-0.20210401015549-df49b648c8bf // indirect + github.com/moby/buildkit v0.12.3 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/sys/mount v0.2.0 // indirect - github.com/moby/sys/mountinfo v0.5.0 // indirect - github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/sys/mountinfo v0.6.2 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/signal v0.7.0 // indirect + github.com/moby/sys/symlink v0.2.0 // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -279,80 +286,97 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/ginkgo/v2 v2.9.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.2 // indirect - github.com/opencontainers/runc v1.1.5 // indirect + github.com/opencontainers/image-spec v1.1.0-rc3 // indirect + github.com/opencontainers/runc v1.1.7 // indirect github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect github.com/oracle/oci-go-sdk v24.3.0+incompatible // indirect github.com/outcaste-io/ristretto v0.2.3 // indirect github.com/ovh/go-ovh v1.4.1 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pquerna/otp v1.4.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect github.com/redis/go-redis/v9 v9.2.1 // indirect + github.com/rivo/uniseg v0.4.4 // indirect github.com/sacloud/api-client-go v0.2.8 // indirect github.com/sacloud/go-http v0.1.6 // indirect github.com/sacloud/iaas-api-go v1.11.1 // indirect github.com/sacloud/packages-go v0.0.9 // indirect - github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b // indirect github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/fasthash v1.0.3 // indirect + github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 // indirect + github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04 // indirect github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect github.com/softlayer/softlayer-go v1.1.2 // indirect github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect - github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.6.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.1 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490 // indirect - github.com/theupdateframework/notary v0.6.1 // indirect + github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect github.com/tinylib/msgp v1.1.8 // indirect - github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 // indirect + github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect + github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect github.com/transip/gotransip/v6 v6.20.0 // indirect github.com/ultradns/ultradns-go-sdk v1.5.0-20230427130837-23c9b0c // indirect github.com/vinyldns/go-vinyldns v0.9.16 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect + github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f // indirect github.com/yandex-cloud/go-sdk v0.0.0-20220805164847-cf028e604997 // indirect + github.com/zmap/zlint/v3 v3.1.0 // indirect go.elastic.co/apm/module/apmhttp v1.13.1 // indirect go.elastic.co/fastjson v1.1.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect - go.etcd.io/etcd/client/v3 v3.5.5 // indirect + go.etcd.io/etcd/api/v3 v3.5.6 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect + go.etcd.io/etcd/client/v3 v3.5.6 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect + go.opentelemetry.io/otel v1.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect + go.opentelemetry.io/otel/metric v1.20.0 // indirect + go.opentelemetry.io/otel/sdk v1.20.0 // indirect + go.opentelemetry.io/otel/trace v1.20.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/mock v0.3.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/multierr v1.8.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect - go.uber.org/zap v1.19.0 // indirect + go.uber.org/zap v1.21.0 // indirect go4.org/intern v0.0.0-20230525184215-6c62f75575cb // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 // indirect golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.128.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -360,7 +384,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a // indirect - k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect @@ -381,3 +405,6 @@ replace github.com/jaguilar/vt100 => github.com/tonistiigi/vt100 v0.0.0-20190402 // ambiguous import: found package github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http in multiple modules // tencentcloud uses monorepo with multimodule but the go.mod files are incomplete. exclude github.com/tencentcloud/tencentcloud-sdk-go v3.0.83+incompatible + +// https://github.com/docker/compose/blob/v2.19.0/go.mod#L12 +replace github.com/cucumber/godog => github.com/cucumber/godog v0.13.0 diff --git a/go.sum b/go.sum index 23db178eb..bce395c47 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,6 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c/go.mod h1:hSVuE3qU7grINVSwrmzHfpg9k87ALBk+XaualNyUzI4= -cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= @@ -46,12 +41,14 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 h1:Dy3M9aegiI7d7PF1LUdjbVigJReo+QOceYsMyFh9qoE= github.com/AdamSLevy/jsonrpc2/v14 v14.1.0/go.mod h1:ZakZtbCXxCz82NJvq7MoREtiQesnDfrtF6RFUGzQfLo= -github.com/AlecAivazis/survey/v2 v2.2.3 h1:utJR2X4Ibp2fBxdjalQUiMFf3zfQNjA15YE8+ftlKEs= -github.com/AlecAivazis/survey/v2 v2.2.3/go.mod h1:9FJRdMdDm8rnT+zHVbvQT2RTSTLq0Ttd6q3Vl2fahjk= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v19.1.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= +github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= @@ -71,19 +68,12 @@ github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1. github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.24 h1:1fIGgHKqVm54KIPT+q8Zmd1QlVsmHqeUGso5qm2BqqE= github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ= @@ -92,21 +82,15 @@ github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 h1:wkAZRgT/pn8HhFyzfe9U github.com/Azure/go-autorest/autorest/azure/auth v0.5.12/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 h1:0W/yGmFdTIT77fvdlGZ0LMISoLHFJ7Tx4U0yeB+uFs4= github.com/Azure/go-autorest/autorest/azure/cli v0.4.5/go.mod h1:ADQAXrkgm7acgWVUNamOgh8YNrv4p27l3Wc55oVfpzg= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY= @@ -134,53 +118,31 @@ github.com/DataDog/sketches-go v1.4.2 h1:gppNudE9d19cQ98RYABOetxIhpTCl4m7CnbRZjv github.com/DataDog/sketches-go v1.4.2/go.mod h1:xJIXldczJyyjnbDop7ZZcLxJdV3+7Kra7H1KMgpgkLk= github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61 h1:1NIUJ+MAMpqDr4LWIfNsoJR+G7zg/8GZVwuRkmJxtTc= github.com/ExpediaDotCom/haystack-client-go v0.0.0-20190315171017-e7edbdf53a61/go.mod h1:62qWSDaEI0BLykU+zQza5CAKgW0lOy9oBSz3/DvYz4w= -github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= -github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.18/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.8.25 h1:fRMwXiwk3qDwc0P05eHnh+y2v07JdtsfQ1fuAc69m9g= -github.com/Microsoft/hcsshim v0.8.25/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= +github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8 h1:xzYJEypr/85nBpB11F9br+3HUrpgb+fcm5iADzXXYEw= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= -github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= +github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 h1:xPMsUicZ3iosVPSIP7bW5EcGUzjiiMl1OYTe14y/R24= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -190,46 +152,38 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 h1:w1UutsfOrms1J05zt7ISrnJIXKzwaspym5BTKGx93EI= -github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/ahmetb/gen-crd-api-reference-docs v0.3.0/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 h1:F1j7z+/DKEsYqZNoxC6wvfmaiDneLsQOFQmuq9NADSY= github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2/go.mod h1:QlXr/TrICfQ/ANa76sLeQyhAJyNR9sEcfNuZBkY9jgY= -github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755 h1:J45/QHgrzUdqe/Vco/Vxk0wRvdS2nKUxmf/zLgvfass= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= +github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= +github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c h1:651/eoCRnQ7YtSjAnSzRucrJz+3iGEFt+ysraELS81M= +github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.15.90/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.9/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.44.327 h1:ZS8oO4+7MOBLhkdwIhgtVeDzCeWOlTfKJS7EgggbIEY= github.com/aws/aws-sdk-go v1.44.327/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= @@ -268,34 +222,26 @@ github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= +github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM= -github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/bugsnag-go v1.4.1/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY= +github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE= +github.com/bugsnag/bugsnag-go v1.0.5/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/bugsnag-go v1.5.0 h1:tP8hiPv1pGGW3LA6LKy5lW6WG+y9J2xWUdPd3WC452k= github.com/bugsnag/bugsnag-go v1.5.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= @@ -305,48 +251,28 @@ github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywR github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/civo/civogo v0.3.11 h1:mON/fyrV946Sbk6paRtOSGsN+asCgCmHCgArf5xmGxM= github.com/civo/civogo v0.3.11/go.mod h1:7+GeeFwc4AYTULaEshpT2vIcl3Qq8HPoxA17viX3l6g= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= -github.com/cloudflare/cfssl v0.0.0-20181213083726-b94e044bb51e/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= -github.com/cloudflare/cfssl v1.4.1 h1:vScfU2DrIUI9VPHBVeeAQ0q5A+9yshO1Gz+3QoUQiKw= -github.com/cloudflare/cfssl v1.4.1/go.mod h1:KManx/OJPb5QY+y0+o/898AMcM128sF0bURvoVUSjTo= +github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cloudflare/cfssl v1.6.4 h1:NMOvfrEjFfC63K3SGXgAnFdsgkmiq4kATme5BfcqrO8= +github.com/cloudflare/cfssl v1.6.4/go.mod h1:8b3CQMxfWPAeom3zBnGJ6sd+G1NkL5TXqmDXacb+1J0= github.com/cloudflare/cloudflare-go v0.70.0 h1:4opGbUygM8DjirUuaz23jn3akuAcnOCEx+0nQtQEcFo= github.com/cloudflare/cloudflare-go v0.70.0/go.mod h1:VW6GuazkaZ4xEDkFt24lkXQUsE8q7BiGqDniC2s8WEM= -github.com/cloudflare/go-metrics v0.0.0-20151117154305-6a9aea36fb41/go.mod h1:eaZPlJWD+G9wseg1BuRXlHnjntPMrywMsyxf+LTOdP4= -github.com/cloudflare/redoctober v0.0.0-20171127175943-746a508df14c/go.mod h1:6Se34jNoqrd8bTxrmJB2Bg2aoZ2CdSXonils9NsiNgo= -github.com/cnabio/cnab-go v0.10.0-beta1/go.mod h1:5c4uOP6ZppR4nUGtCMAElscRiYEUi44vNQwtSAvISXk= -github.com/cnabio/cnab-to-oci v0.3.1-beta1/go.mod h1:8BomA5Vye+3V/Kd2NSFblCBmp1rJV5NfXBYKbIGT5Rw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -355,118 +281,34 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/compose-spec/compose-go v1.0.2/go.mod h1:gCIA3No0j5nNszz2X0yd/mkigTIWcOgHiPa9guWvoec= -github.com/compose-spec/compose-go v1.0.3 h1:yvut1x9H4TUMptNA4mZ63VGVtDNX1OKy2TZCi6yFw8Q= -github.com/compose-spec/compose-go v1.0.3/go.mod h1:gCIA3No0j5nNszz2X0yd/mkigTIWcOgHiPa9guWvoec= -github.com/compose-spec/godotenv v1.0.0 h1:TV24JYhh5GCC1G14npQVhCtxeoiwd0NcT0VdwcCQyXU= -github.com/compose-spec/godotenv v1.0.0/go.mod h1:zF/3BOa18Z24tts5qnO/E9YURQanJTBUf7nlcCTNsyc= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= +github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4= +github.com/compose-spec/compose-go v1.15.0 h1:rv3TTgbS3U4Y8sRTngrcxDmpbz+fq26wTqHculSCi6s= +github.com/compose-spec/compose-go v1.15.0/go.mod h1:3yngGBGfls6FHGQsg4B1z6gz8ej9SOvmAJtxCwgbcnc= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.2.7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.0.0.20210122062454-5a66c2ae5cec/go.mod h1:p9z+oqCID32tZ7LKgej316N9pJf1iIkQ/7nK1VvEFZE= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.5/go.mod h1:oSTh0QpT1w6jYcGmbiSbxv9OSQYaa88mPyWIuU79zyo= -github.com/containerd/containerd v1.5.17 h1:NLDEI//zhMZpR3DS/AP0qiN+dzYKNAwJaNXCnCmYcgY= -github.com/containerd/containerd v1.5.17/go.mod h1:7IN9MtIzTZH4WPEmD1gNH8bbTQXVX68yd3ZXxSHYCis= -github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= -github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fuse-overlayfs-snapshotter v1.0.2/go.mod h1:nRZceC8a7dRm3Ao6cJAwuJWPFiBPaibHiFntRUnzhwU= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter v0.4.1/go.mod h1:H59SY9Rw+vkIfWtuuyjeLeAc7uuALmuvUdAS6w+xmEw= -github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0 h1:GbtyLRxb0gOLR0TYQWt3O6B0NvT8tMdorEHqIQo/lWI= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= +github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= +github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= +github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= +github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= +github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= +github.com/containerd/nydus-snapshotter v0.8.2 h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E= +github.com/containerd/nydus-snapshotter v0.8.2/go.mod h1:UJILTN5LVBRY+dt8BGJbp72Xy729hUZsOugObEI3/O8= +github.com/containerd/stargz-snapshotter v0.14.3 h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U= +github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= +github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= +github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= +github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= +github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= +github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd h1:0n+lFLh5zU0l6KSk3KpnDwfbPGAR44aRLgTbCnhRBHU= github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd/go.mod h1:BbQgeDS5i0tNvypwEoF1oNjOJw8knRAE1DnVvjDstcQ= github.com/containous/check v0.0.0-20170915194414-ca0bf163426a h1:8esAQaPKjfntQR1bag/mAOvWJd5HqSX5nsa+0KT63zo= @@ -478,46 +320,34 @@ github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595/go.mod h1:+lHFb github.com/containous/mux v0.0.0-20220627093034-b2dd784e613f h1:1uEtynq2C0ljy3630jt7EAxg8jZY2gy6YHdGwdqEpWw= github.com/containous/mux v0.0.0-20220627093034-b2dd784e613f/go.mod h1:z8WW7n06n8/1xF9Jl9WmuDeZuHAhfL+bwarNjsciwwg= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpu/goacmedns v0.1.1 h1:DM3H2NiN2oam7QljgGY5ygy4yDXhK5Z4JUnqaugs2C4= github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -527,10 +357,7 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go. github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/deepmap/oapi-codegen v1.9.1 h1:yHmEnA7jSTUMQgV+uN02WpZtwHnz2CBW3mZRIxr1vtI= github.com/deepmap/oapi-codegen v1.9.1/go.mod h1:PLqNAhdedP8ttRpBBkzLKU3bp+Fpy+tTgeAMlztR2cw= -github.com/denisenkom/go-mssqldb v0.0.0-20190315220205-a8ed825ac853/go.mod h1:xN/JuLBIz4bjkxNmByTiV1IbhfnYb6oo99phBn4Eqhc= -github.com/denisenkom/go-mssqldb v0.0.0-20190515213511-eb9f6a1743f3/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -539,67 +366,38 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e h1:n81KvOMrLZa+VWHwST7dun9f0G98X3zREHS1ztYzZKU= -github.com/distribution/distribution/v3 v3.0.0-20210316161203-a01c71e2477e/go.mod h1:xpWTC2KnJMiDLkoawhsPQcXjvwATEBcbq0xevG2YR9M= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493 h1:fm5DpBD+A7o0+x9Nf+o9/4/qPGbfxLpr9qIPVuV8vQc= +github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dnsimple/dnsimple-go v1.2.0 h1:ddTGyLVKly5HKb5L65AkLqFqwZlWo3WnR0BlFZlIddM= github.com/dnsimple/dnsimple-go v1.2.0/go.mod h1:z/cs26v/eiRvUyXsHQBLd8lWF8+cD6GbmkPH84plM4U= -github.com/docker/buildx v0.5.2-0.20210422185057-908a856079fc h1:oqPGOy23wxFCyOMSfdZTk02F7qvPi7kUEEeKrExKtfw= -github.com/docker/buildx v0.5.2-0.20210422185057-908a856079fc/go.mod h1:T5sa7xGu8G7dLXwaLLj6dRbJ5mxugPFDfELGnO2B5lQ= -github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli v20.10.11+incompatible h1:tXU1ezXcruZQRrMP8RN2z9N91h+6egZTS1gsPsKantc= -github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/cli-docs-tool v0.1.1/go.mod h1:oMzPNt1wC3TcxuY22GMnOODNOxkwGH51gV3AhqAjFQ4= -github.com/docker/compose-on-kubernetes v0.4.19-0.20190128150448-356b2919c496/go.mod h1:iT2pYfi580XlpaV4KmK0T6+4/9+XoKmk/fhoDod1emE= -github.com/docker/compose-switch v1.0.2/go.mod h1:uyPj8S3oH1O9rSZ5QVozw28OIjdNIflSSYElC2P0plQ= -github.com/docker/compose/v2 v2.0.1 h1:7LGiEWWFSTxTq2iN8hKHgFWi+iTBmHYNW/0Xo9JXffw= -github.com/docker/compose/v2 v2.0.1/go.mod h1:urQiI7sPYgS5RqIqZeDLAwumdEMjNFE2ziofshucFrM= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/buildx v0.11.2 h1:R3p9F0gnI4FwvQ0p40UwdX1T4ugap4UWxY3TFHoP4Ws= +github.com/docker/buildx v0.11.2/go.mod h1:CWAABt10iIuGpleypA3103mplDfcGu0A2AvT03xfpTc= +github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= +github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/compose/v2 v2.19.0 h1:88LLRdyeVdkuIlc9wJ6SPUs2x5IoF4O9DtCgPS/d9lA= +github.com/docker/compose/v2 v2.19.0/go.mod h1:08yDbnLQKUqBpL862sUo4RBSKXt0n0XLtIbaUSMW1O8= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.0.0-20200511152416-a93e9eb0e95c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20181229214054-f76d6a078d88/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v17.12.0-ce-rc1.0.20200730172259-9f28837c1d93+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= -github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/docker-credential-helpers v0.6.4-0.20210125172408-38bea2ce277a h1:1DndKi+f9qs3AexOfI6di7RkWcWlNHzdqHu1cX19/ac= -github.com/docker/docker-credential-helpers v0.6.4-0.20210125172408-38bea2ce277a/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= -github.com/docker/go v1.5.1-1/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= +github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= +github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= +github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libnetwork v0.8.0-dev.2.0.20201215162534-fa125a3512ee h1:VQGPaek8TO9sRNRVNXmjzrya1SmleN0cMf/vvyjjJHo= -github.com/docker/libnetwork v0.8.0-dev.2.0.20201215162534-fa125a3512ee/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/libtrust v0.0.0-20150526203908-9cbd2a1374f4/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e h1:rMOGp6HPeMHbdLrZkX2nD+94uqDunc27tXVuS+ey4mQ= github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= @@ -607,6 +405,7 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= @@ -627,10 +426,9 @@ github.com/elastic/go-sysinfo v1.1.1 h1:ZVlaLDyhVkDfjwPGU55CQRCRolNpc7P0BbyhhQZQ github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= -github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= @@ -645,9 +443,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= @@ -662,33 +461,32 @@ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsevents v0.1.1 h1:/125uxJvvoSDDBPen6yUZbil8J9ydKZnnl3TWWmvnkw= +github.com/fsnotify/fsevents v0.1.1/go.mod h1:+d+hS27T6k5J8CRaPLKFgwKYcpS7GwW3Ule9+SC2ZRc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/fvbommel/sortorder v1.0.1 h1:dSnXLt4mJYH25uDDGa3biZNQsozaUWDSWeKJ0qqFfzE= -github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= +github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 h1:df6OFl8WNXk82xxP3R9ZPZ5seOA8XZkwLdbEzZF1/xI= github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2/go.mod h1:GLyXJD41gBO/NPKVPGQbhyyC06eugGy15QEZyUkE2/s= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.87.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.0.0-20180121060056-563b81fc02b7/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-acme/lego/v4 v4.14.0 h1:/skZoRHgVh0d2RK7l1g3Ch8HqeqP9LB8ZEjLdGEpcDE= github.com/go-acme/lego/v4 v4.14.0/go.mod h1:zjmvNCDLGz7GrC1OqdVpVmZFKSRabEDtWbdzmcpBsGo= github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= @@ -698,7 +496,6 @@ github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -706,7 +503,6 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea h1:CnEQOUv4ilElSwFB9g/lVmz206oLE4aNZDYngIY1Gvg= github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -716,24 +512,23 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= @@ -747,9 +542,7 @@ github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= -github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -758,38 +551,24 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b h1:/vQ+oYKu+JoyaMPDsv5FzwuL2wwWBgBbtj/YLCi4LuA= github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVruqWQJBtW6+bTBDTniY8yZum5rF3b5jw= github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/goccy/go-json v0.7.8/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.3.0/go.mod h1:d+q1s/xVJxZGKWwC/6UfPIF33J+G1Tq4GYv9Y+Tg/EU= -github.com/gogo/googleapis v1.4.0 h1:zgVt4UpGxcqVOw97aRGxT4svlcmdK35fynLNctY32zI= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A= @@ -799,8 +578,11 @@ github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -818,8 +600,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -843,14 +623,13 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= -github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.4 h1:hCyXHDbtqlr/lMXU0D4WgbalXL0Zk4dSWWMbPV8VrqY= +github.com/google/certificate-transparency-go v1.1.4/go.mod h1:D6lvbfwckhNrbM9WVl1EVeMOyzC19mpIjMOI4nxBHtQ= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -867,17 +646,14 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.0.0-20191015185424-71da34e4d9b3/go.mod h1:ZXFeSndFcK4vB1NR4voH1Zm38K7ViUNiYtfIBDxrwf0= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -907,7 +683,6 @@ github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3 github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -917,13 +692,9 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/googleapis/gnostic v0.0.0-20170426233943-68f4ded48ba9/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gophercloud/gophercloud v0.15.1-0.20210202035223-633d73521055/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4= github.com/gophercloud/gophercloud v1.0.0 h1:9nTGx0jizmHxDobe4mck89FyQHVyA3CaXLIUSGJjP9k= github.com/gophercloud/gophercloud v1.0.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= @@ -931,35 +702,27 @@ github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae h1:Hi3IgB9RQDE15 github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae/go.mod h1:wx8HMD8oQD0Ryhz6+6ykq75PJ79iPyEqYHfwZ4l7OsA= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf h1:C1GPyPJrOlJlIrcaBBiBpDsqZena2Ks8spa5xZqr1XQ= github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf/go.mod h1:zXqxTI6jXDdKnlf8s+nT+3c8LrwUEy3yNpO4XJL90lA= -github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= -github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= -github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= -github.com/hanwen/go-fuse/v2 v2.0.4-0.20201208195215-4a458845028b/go.mod h1:0EQM6aH2ctVpvZ6a+onrQ/vaykxh2GH7hy3e13vzTUY= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.26.1 h1:5oSXOO5fboPZeW5SN+TdGFP/BILDgBm19OrPZ/pICIM= @@ -970,7 +733,6 @@ github.com/hashicorp/consul/sdk v0.15.0 h1:2qK9nDrr4tiJKRoxPGhm6B7xJjLVIQqkjiab2 github.com/hashicorp/consul/sdk v0.15.0/go.mod h1:r/OmRRPbHOe0yxNahLw7G9x5WG17E1BIECMtCjcPSNo= github.com/hashicorp/cronexpr v1.1.1 h1:NJZDd87hGXjoZBdvyCF9mX4DCq5Wy7+A/w+A7q0wn6c= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -978,7 +740,6 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= @@ -988,7 +749,6 @@ github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -1008,22 +768,18 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= -github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= @@ -1035,9 +791,8 @@ github.com/hashicorp/nomad/api v0.0.0-20220506174431-b5665129cd1f/go.mod h1:b/Ao github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= -github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ= -github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= +github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= +github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= @@ -1048,14 +803,15 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df h1:MZf03xP9WdakyXhOWuAD5uPK3wHh96wCsqe3hCMKh8E= github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df/go.mod h1:QMZY7/J/KSQEhKWFeDesPjMj+wCHReeknARU3wqlyN4= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/in-toto/in-toto-golang v0.9.0 h1:tHny7ac4KgtsfrG6ybU8gVOZux2H8jN05AXJ9EBM1XU= +github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3lUTQd+eF9HdeMo= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb-client-go/v2 v2.7.0 h1:QgP5mlBE9sGnzplpnf96pr+p7uqlIlL4W2GAP3n+XZg= github.com/influxdata/influxdb-client-go/v2 v2.7.0/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= @@ -1068,8 +824,6 @@ github.com/instana/go-sensor v1.38.3 h1:/PdHEDveLmUCvK+O6REvSv8kKljX8vaj9JMjMeCH github.com/instana/go-sensor v1.38.3/go.mod h1:E42MelHWFz11qqaLwvgt0j98v2s2O/bq22UDkGaG0Gg= github.com/instana/testify v1.6.2-0.20200721153833-94b1851f4d65 h1:T25FL3WEzgmKB0m6XCJNZ65nw09/QIp3T1yXr487D+A= github.com/instana/testify v1.6.2-0.20200721153833-94b1851f4d65/go.mod h1:nYhEREG/B7HUY7P+LKOrqy53TpIqmJ9JyUShcaEKtGw= -github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jarcoal/httpmock v1.0.8/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jarcoal/httpmock v1.3.0 h1:2RJ8GP0IIaWwcC9Fp2BmVi8Kog3v2Hn7VXM3fTd+nuc= github.com/jarcoal/httpmock v1.3.0/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg= @@ -1086,35 +840,29 @@ github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jinzhu/gorm v1.9.2/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= -github.com/jinzhu/gorm v1.9.11/go.mod h1:bu/pK8szGZ2puuErfU0RwyeNdsf3e6nCX/noXaVxkfw= +github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= -github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.0/go.mod h1:oHTiXerJ20+SfYcrdlBO7rzZRJWGwSTQ0iUY2jI6Gfc= -github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= -github.com/jmoiron/sqlx v0.0.0-20180124204410-05cef0741ade/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= +github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= +github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -1127,43 +875,35 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= -github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= -github.com/kisom/goutils v1.1.0/go.mod h1:+UBTfd78habUYWFbNWTJNG+jNG/i/lGURakr4A/yNRw= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.17.1 h1:NE3C767s2ak2bweCZo3+rdP4U/HoyVXLv/X9f2gPS5g= -github.com/klauspost/compress v1.17.1/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/pty v1.1.8 h1:AkaSdXYQOWeaO3neb8EM634ahkXXe3jYbVh/F9lq+GI= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -1177,8 +917,6 @@ github.com/kvtools/valkeyrie v1.0.0 h1:LAITop2wPoYCMitR24GZZsW0b57hmI+ePD18VRTtO github.com/kvtools/valkeyrie v1.0.0/go.mod h1:bDi/OdhJCSbGPMsCgUQl881yuEweKCSItAtTBI+ZjpU= github.com/kvtools/zookeeper v1.0.2 h1:uK0CzQa+mtKGxDDH+DeqXo2HC1Kx4hWXZ7pX/zS4aTo= github.com/kvtools/zookeeper v1.0.2/go.mod h1:6TfxUwJ7IuBk5srgnoe528W0ftanNECHgOiShx/t0Aw= -github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/labbsr0x/bindman-dns-webhook v1.0.2 h1:I7ITbmQPAVwrDdhd6dHKi+MYJTJqPCK0jE6YNBAevnk= @@ -1198,10 +936,7 @@ github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++ github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= github.com/lestrrat-go/jwx v1.2.7/go.mod h1:bw24IXWbavc0R2RsOtpXL7RtMyP589yZ1+L7kd09ZGA= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/lib/pq v0.0.0-20180201184707-88edab080323/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.17.2 h1:b32dj4662PGG5P9qVa6nBezccWdqgukndlMIuPGq1CQ= @@ -1217,25 +952,24 @@ github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20= github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailgun/multibuf v0.1.2 h1:QE9kE27lK6LFZB4aYNVtUPlWVHVCT0zpgUr2uoq/+jk= github.com/mailgun/multibuf v0.1.2/go.mod h1:E+sUhIy69qgT6EM57kCPdUTlHnjTuxQBO/yf6af9Hes= github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 h1:Kg/NPZLLC3aAFr1YToMs98dbCdhootQ1hZIvZU28hAQ= github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51/go.mod h1:RYmqHbhWwIz3z9eVmQ2rx82rulEMG0t+Q1bzfc9DYN4= github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f h1:ZZYhg16XocqSKPGNQAe0aeweNtFxuedbwwb4fSlg7h4= github.com/mailgun/ttlmap v0.0.0-20170619185759-c1c17f74874f/go.mod h1:8heskWJ5c0v5J9WH89ADhyal1DOZcayll8fSbhB+/9A= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1262,11 +996,11 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -1282,11 +1016,11 @@ github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJys github.com/miekg/dns v1.1.47/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= -github.com/miekg/pkcs11 v1.0.3 h1:iMwmD7I5225wv84WxIG/bmxz9AXjWvTWIbM/TYHvWtw= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= +github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimuret/golang-iij-dpf v0.9.1 h1:Gj6EhHJkOhr+q2RnvRPJsPMcjuVnWPSccEHyoEehU34= github.com/mimuret/golang-iij-dpf v0.9.1/go.mod h1:sl9KyOkESib9+KRD3HaGpgi1xk7eoN2+d96LCLsME2M= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= @@ -1297,46 +1031,42 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/buildkit v0.8.2-0.20210401015549-df49b648c8bf h1:dHwWBX8OhYb69qVcT27rFSwzKsn4CRbg0HInQyVh33c= -github.com/moby/buildkit v0.8.2-0.20210401015549-df49b648c8bf/go.mod h1:GJcrUlTGFAPlEmPQtbrTsJYn+cy+Jwl7vTZS7jYAoow= +github.com/moby/buildkit v0.12.3 h1:cFaPVnyC0PwAP5xHHfzdU5v9rgQrCi6HnGSg3WuFKp4= +github.com/moby/buildkit v0.12.3/go.mod h1:adB4y0SxxX8trnrY+oEulb48ODLqPO6pKMF0ppGcCoI= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= -github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM= -github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= -github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= -github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= +github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= +github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= +github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= +github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= @@ -1344,8 +1074,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= -github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1362,9 +1090,7 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nrdcg/auroradns v1.1.0 h1:KekGh8kmf2MNwqZVVYo/fw/ZONt8QMEmbMFOeljteWo= github.com/nrdcg/auroradns v1.1.0/go.mod h1:O7tViUZbAcnykVnrGkXzIJTHoQCHcgalgAe6X1mzHfk= github.com/nrdcg/desec v0.7.0 h1:iuGhi4pstF3+vJWwt292Oqe2+AsSPKDynQna/eu1fDs= @@ -1390,13 +1116,9 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -1408,15 +1130,12 @@ github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3 github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3RonqW57k= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= @@ -1424,43 +1143,19 @@ github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9 github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.1/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= -github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= +github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= +github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= +github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8= +github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1487,8 +1182,11 @@ github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTK github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= +github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -1500,20 +1198,16 @@ github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pires/go-proxyproto v0.6.1 h1:EBupykFmo22SDjv4fQVQd2J9NOoLPmyZA/15ldOGkPw= github.com/pires/go-proxyproto v0.6.1/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY= -github.com/pivotal/image-relocation v0.0.0-20191111101224-e94aff6df06c/go.mod h1:/JNbQwGylYm3AQh8q+MBF8e/h0W1Jy20JGTvozuXYTE= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -1522,7 +1216,7 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -1533,7 +1227,6 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1555,28 +1248,22 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/qri-io/jsonpointer v0.1.0/go.mod h1:DnJPaYgiKu56EuDp8TU5wFLdZIcAnb/uH9v37ZaMV64= -github.com/qri-io/jsonschema v0.1.1/go.mod h1:QpzJ6gBQ0GYgGmh7mDQ1YsvvhSgE4rYj0k8t5MBOmUY= github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo= github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A= github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= @@ -1592,16 +1279,16 @@ github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6Qml github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052 h1:Qp27Idfgi6ACvFQat5+VJvlYToylpM/hcyLBI3WaKPA= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052/go.mod h1:uvX/8buq8uVeiZiFht+0lqSLBHF+uGV8BrTv8W/SIwk= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -1613,36 +1300,29 @@ github.com/sacloud/iaas-api-go v1.11.1 h1:2MsFZ4H1uRdRVx2nVXuERWQ3swoFc3XreIV5hJ github.com/sacloud/iaas-api-go v1.11.1/go.mod h1:uBDSa06F/V0OnoR66jGdbH0PVnCJw+NeE9RVbVgMfss= github.com/sacloud/packages-go v0.0.9 h1:GbinkBLC/eirFhHpLjoDW6JV7+95Rnd2d8RWj7Afeks= github.com/sacloud/packages-go v0.0.9/go.mod h1:k+EEUMF2LlncjbNIJNOqLyZ9wjTESPIWIk1OA7x9j2Q= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b h1:jUK33OXuZP/l6babJtnLo1qsGvq6G9so9KMflGAm4YA= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b/go.mod h1:8458kAagoME2+LN5//WxE71ysZ3B7r22fdgb7qVmXSY= github.com/santhosh-tekuri/jsonschema v1.2.4 h1:hNhW8e7t+H1vgY+1QeEQpveR6D4+OwKPXCfD2aieJis= github.com/santhosh-tekuri/jsonschema v1.2.4/go.mod h1:TEAUOeZSmIxTTuHatJzrvARHiuO9LYd+cIxzgEHCQI4= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAjPbcMsODrTQUpJ02eNLUoxBg= github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 h1:ka9QPuQg2u4LGipiZGsgkg3rJCo4iIUCy75FddM0GRQ= github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= +github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= +github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04 h1:ZTzdx88+AcnjqUfJwnz89UBrMSBQ1NEysg9u5d+dU9c= github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04/go.mod h1:5KS21fpch8TIMyAUv/qQqTa3GZfBDYgjaZbd2KXKYfg= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -1654,7 +1334,6 @@ github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHei github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 h1:hp2CYQUINdZMHdvTdXtPOY2ainKl4IoMcpAXEf2xj3Q= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.4 h1:tpTjnuH7MLlqhoD21vRoMZbMIi5GmBsAJDFyF67GhZA= github.com/smartystreets/gunit v1.0.4/go.mod h1:EH5qMBab2UclzXUcpR8b93eHsIlp9u+pDQIRp5DZNzQ= @@ -1667,45 +1346,45 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE= +github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= -github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1713,9 +1392,6 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1731,28 +1407,27 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 h1:XGopsea1Dw7ecQ8JscCNQXDGYAKDiWjDeXnpN/+BY9g= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 h1:mmz27tVi2r70JYnm5y0Zk8w0Qzsx+vfUw3oqSyrEfP8= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490 h1:g9SWTaTy/rEuhMErC2jWq9Qt5ci+jBYSvXnJsLq4adg= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490/go.mod h1:l9q4vc1QiawUB1m3RU+87yLvrrxe54jc0w/kEl4DbSQ= -github.com/theupdateframework/notary v0.6.1 h1:7wshjstgS9x9F5LuB1L5mBI2xNMObWqjz+cjWoom6l0= -github.com/theupdateframework/notary v0.6.1/go.mod h1:MOfgIfmox8s7/7fduvB2xyPPMJCrjRLRizA8OFwpnKY= +github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a h1:tlJ7tGUHvcvL1v3yR6NcCc9nOqh2L+CG6HWrYQtwzQ0= +github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a/go.mod h1:Y94A6rPp2OwNfP/7vmf8O2xx2IykP8pPXQ1DLouGnEw= +github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA= +github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375/go.mod h1:xRroudyp5iVtxKqZCrA6n2TLFRBf8bmnjr1UD4x+z7g= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85 h1:014iQD8i8EabPWK2XgUuOTxg5s2nhfDmq6GupskfUO8= -github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= +github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg= +github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= -github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305 h1:y/1cL5AL2oRcfzz8CAHHhR6kDDfIOT0WEyH5k40sccM= -github.com/tonistiigi/vt100 v0.0.0-20190402012908-ad4c4a574305/go.mod h1:gXOLibKqQTRAVuVZ9gX7G9Ykky8ll8yb4slxsEMoY0c= +github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= +github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/traefik/paerser v0.2.0 h1:zqCLGSXoNlcBd+mzqSCLjon/I6phqIjeJL2xFB2ysgQ= github.com/traefik/paerser v0.2.0/go.mod h1:afzaVcgF8A+MpTnPG4wBr4whjanCSYA6vK5RwaYVtRc= github.com/traefik/yaegi v0.15.1 h1:YA5SbaL6HZA0Exh9T/oArRHqGN2HQ+zgmCY7dkoTXu4= @@ -1760,15 +1435,12 @@ github.com/traefik/yaegi v0.15.1/go.mod h1:AVRxhaI2G+nUsaM1zyktzwXn69G3t/AuTDrCi github.com/transip/gotransip/v6 v6.20.0 h1:AuvwyOZ51f2brzMbTqlRy/wmaM3kF7Vx5Wds8xcDflY= github.com/transip/gotransip/v6 v6.20.0/go.mod h1:nzv9eN2tdsUrm5nG5ZX6AugYIU4qgsMwIn2c0EZLk8c= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= github.com/ultradns/ultradns-go-sdk v1.5.0-20230427130837-23c9b0c h1:mKnW6IGLw7uXu6DL6RitufZWcXS6hCnauXRUFof7rKM= @@ -1777,50 +1449,36 @@ github.com/unrolled/render v1.0.2 h1:dGS3EmChQP3yOi1YeFNO/Dx+MbWZhdvhQJTXochM5bs github.com/unrolled/render v1.0.2/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM= github.com/unrolled/secure v1.0.9 h1:BWRuEb1vDrBFFDdbCnKkof3gZ35I/bnHGyt0LB0TNyQ= github.com/unrolled/secure v1.0.9/go.mod h1:fO+mEan+FLB0CdEnHf6Q4ZZVNqG+5fuLFnP8p0BXDPI= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= +github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= github.com/vdemeester/shakers v0.1.0 h1:K+n9sSyUCg2ywmZkv+3c7vsYZfivcfKhMh8kRxCrONM= github.com/vdemeester/shakers v0.1.0/go.mod h1:IZ1HHynUOQt32iQ3rvAeVddXLd19h/6LWiKsh9RZtAQ= github.com/vinyldns/go-vinyldns v0.9.16 h1:GZJStDkcCk1F1AcRc64LuuMh+ENL8pHA0CVd4ulRMcQ= github.com/vinyldns/go-vinyldns v0.9.16/go.mod h1:5qIJOdmzAnatKjurI+Tl4uTus7GJKJxb+zitufjHs3Q= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vulcand/oxy/v2 v2.0.0-20230427132221-be5cf38f3c1c h1:Qt/YKpE8uAKNF4x2mwBZxmVo2WtgUL1WFDeXr1nlfpA= github.com/vulcand/oxy/v2 v2.0.0-20230427132221-be5cf38f3c1c/go.mod h1:A2voDnpONyqdplUDK0lt5y4XHLiBXPBw7iQES8+ZWRw= github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt50= github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE7Qm9c+2GA= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= -github.com/weppos/publicsuffix-go v0.5.0 h1:rutRtjBJViU/YjcI5d80t4JAVvDltS6bciJg2K1HrLU= -github.com/weppos/publicsuffix-go v0.5.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/weppos/publicsuffix-go v0.13.1-0.20210123135404-5fd73613514e/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= +github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b h1:FsyNrX12e5BkplJq7wKOLk0+C6LZ+KGXvuEcKUYm5ss= +github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/handysort v0.0.0-20150421192137-fb3537ed64a1/go.mod h1:QcJo0QPSfTONNIgpN5RA8prR7fF8nkF6cTWTcNerRO8= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f h1:cG+ehPRJSlqljSufLf1KXeXpUd1dLNjnzA18mZcB/O0= github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f/go.mod h1:HEUYX/p8966tMUHHT+TsS0hF/Ca/NYwqprC5WXSDMfE= github.com/yandex-cloud/go-sdk v0.0.0-20220805164847-cf028e604997 h1:2wzke3JH7OtN20WsNDZx2VH/TCmsbqtDEbXzjF+i05E= @@ -1831,19 +1489,13 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= -github.com/zclconf/go-cty v1.7.1/go.mod h1:VDR4+I79ubFBGm1uJac1226K5yANQFHeauxPBoP54+o= -github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE= github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4/go.mod h1:5iU54tB79AMBcySS0R2XIyZBAVmeHranShAFELYx7is= -github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e h1:mvOa4+/DXStR4ZXOks/UsjeFdn5O5JpLUtzqk9U8xXw= -github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e/go.mod h1:w7kd3qXHh8FNaczNjslXqvFQiv5mMWRXlL9klTUAHc8= -github.com/zmap/zlint v0.0.0-20190806154020-fd021b4cfbeb h1:vxqkjztXSaPVDc8FQCdHTaejm2x747f6yPbnu1h2xkg= -github.com/zmap/zlint v0.0.0-20190806154020-fd021b4cfbeb/go.mod h1:29UiAJNsiVdvTBFCJW8e3q6dcDbOoPkhMgttOSCIMMY= +github.com/zmap/zcrypto v0.0.0-20210123152837-9cf5beac6d91/go.mod h1:R/deQh6+tSWlgI9tb4jNmXxn8nSCabl5ZQsBX9//I/E= +github.com/zmap/zcrypto v0.0.0-20220605182715-4dfcec6e9a8c h1:ufDm/IlBYZYLuiqvQuhpTKwrcAS2OlXEzWbDvTVGbSQ= +github.com/zmap/zcrypto v0.0.0-20220605182715-4dfcec6e9a8c/go.mod h1:egdRkzUylATvPkWMpebZbXhv0FMEMJGX/ur0D3Csk2s= +github.com/zmap/zlint/v3 v3.1.0 h1:WjVytZo79m/L1+/Mlphl09WBob6YTGljN5IGWZFpAv0= +github.com/zmap/zlint/v3 v3.1.0/go.mod h1:L7t8s3sEKkb0A2BxGy1IWrxt1ZATa1R4QfJZaQOD3zU= go.elastic.co/apm v1.13.1 h1:ICIcUcQOImg/bve9mQVyLCvm1cSUZ1afdwK6ACnxczU= go.elastic.co/apm v1.13.1/go.mod h1:dylGv2HKR0tiCV+wliJz1KHtDyuD8SPe69oV7VyK6WY= go.elastic.co/apm/module/apmhttp v1.13.1 h1:g2id6+AY8NRSA6nzwPDSU1AmBiHyZeh/lJRBlXq2yfQ= @@ -1858,15 +1510,14 @@ go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= -go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= +go.etcd.io/etcd/api/v3 v3.5.6 h1:Cy2qx3npLcYqTKqGJzMypnMv2tiRyifZJ17BlWIWA7A= +go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= -go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.6 h1:TXQWYceBKqLp4sa87rcPs11SXxUA/mHwH975v+BDvLU= +go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI= -go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.etcd.io/etcd/client/v3 v3.5.6 h1:coLs69PWCXE9G4FKquzNaSHrRyMCAXwF+IX1tAPVO8E= +go.etcd.io/etcd/client/v3 v3.5.6/go.mod h1:f6GRinRMCsFVv9Ht42EyY7nfsVGwrNO0WEoS2pRKzQk= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1878,7 +1529,29 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0 h1:WUMhXWqLmFlznidWF4B9iML8VMdZy4TzJVYzdYTCuaM= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0/go.mod h1:H1XIOXyXFff1aZa7nQeFHGYMB+gHH1TtZSti37uHX6o= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= +go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= +go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= +go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= +go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= +go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= +go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= +go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= +go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1887,14 +1560,16 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA= go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= @@ -1902,25 +1577,19 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go4.org/intern v0.0.0-20211027215823-ae77deb06f29/go.mod h1:cS2ma+47FKrLPdXFpr7CuxiTW3eyJbWew4qx0qtQWDA= go4.org/intern v0.0.0-20230525184215-6c62f75575cb h1:ae7kzL5Cfdmcecbh22ll7lYP3iuUdnfnhiPcSaDgH/8= go4.org/intern v0.0.0-20230525184215-6c62f75575cb/go.mod h1:Ycrt6raEcnF5FTsLiLKkhBTO6DPX3RCUCUVnks3gFJU= go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2 h1:WJhcL4p+YeDxmZWg141nRm7XC8IDmhz7lk5GpadO1Sg= go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2/go.mod h1:FftLjUGFEDu5k8lt0ddY+HcrH/qU/0qk+H8j9/nTl3E= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1928,20 +1597,17 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191028145041-f83a4685e152/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -1998,12 +1664,9 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2015,18 +1678,14 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190812203447-cdfb69ac37fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -2042,12 +1701,10 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -2056,12 +1713,10 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= @@ -2069,7 +1724,6 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2082,10 +1736,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2101,7 +1753,6 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2110,55 +1761,38 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190830141801-acfa387b8d69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2169,37 +1803,27 @@ golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200917073148-efd3b9a0ff20/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201110211018-35f3e6cf4a65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2212,14 +1836,12 @@ golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2231,8 +1853,8 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2242,7 +1864,6 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2261,7 +1882,6 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2271,8 +1891,6 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -2292,7 +1910,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191014205221-18e3458ac98b/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2356,10 +1973,8 @@ gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -2392,15 +2007,11 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= @@ -2410,7 +2021,6 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2443,13 +2053,13 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2459,7 +2069,6 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -2479,8 +2088,8 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2501,27 +2110,21 @@ gopkg.in/DataDog/dd-trace-go.v1 v1.56.1 h1:AUe/ZF7xm6vYnigPe+TY54DmfWYJxhMRaw/Tf gopkg.in/DataDog/dd-trace-go.v1 v1.56.1/go.mod h1:KDLJ3CWVOSuVVwu+0ZR5KZo2rP6c7YyBV3v387dIpUU= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= +gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/dancannon/gorethink.v3 v3.0.5 h1:/g7PWP7zUS6vSNmHSDbjCHQh1Rqn8Jy6zSMQxAsBSMQ= -gopkg.in/dancannon/gorethink.v3 v3.0.5/go.mod h1:GXsi1e3N2OcKhcP6nsYABTiUejbWMFO4GY5a4pEaeEc= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fatih/pool.v2 v2.0.0 h1:xIFeWtxifuQJGk/IEPKsTduEKcKvPmhoiVDGpC40nKg= -gopkg.in/fatih/pool.v2 v2.0.0/go.mod h1:8xVGeu1/2jr2wm5V9SPuMht2H5AEmf5aFMGSQixtjTY= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/gorethink/gorethink.v3 v3.0.5 h1:e2Uc/Xe+hpcVQFsj6MuHlYog3r0JYpnTzwDj/y2O4MU= -gopkg.in/gorethink/gorethink.v3 v3.0.5/go.mod h1:+3yIIHJUGMBK+wyPH+iN5TP+88ikFDfZdqTlK3Y9q8I= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= -gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -2534,9 +2137,9 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/ns1/ns1-go.v2 v2.7.6 h1:mCPl7q0jbIGACXvGBljAuuApmKZo3rRi4tlRIEbMvjA= gopkg.in/ns1/ns1-go.v2 v2.7.6/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2555,11 +2158,10 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2572,12 +2174,6 @@ howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqp howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a h1:1XCVEdxrvL6c0TGOhecLuB7U9zYNdxZEjvOqJreKZiM= inet.af/netaddr v0.0.0-20230525184311-b8eac61e914a/go.mod h1:e83i32mAQOW1LAqEIweALsuK2Uw4mhQadA5r7b0Wobo= -k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= -k8s.io/api v0.0.0-20191016110408-35e52d86657a/go.mod h1:/L5qH+AD540e7Cetbui1tuJeXdmNhO8jM6VkXeDdDhQ= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= k8s.io/api v0.21.3/go.mod h1:hUgeYHUbBp23Ue4qdX9tR8/ANi/g3ehylAqDn9NWVOg= k8s.io/api v0.22.1/go.mod h1:bh13rkTp3F1XEaLGykbyRD2QaTTzPm0e/BMd8ptFONY= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= @@ -2585,69 +2181,33 @@ k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.21.3/go.mod h1:kl6dap3Gd45+21Jnh6utCx8Z2xxLm8LGDkprcd+KbsE= k8s.io/apiextensions-apiserver v0.26.3 h1:5PGMm3oEzdB1W/FTMgGIDmm100vn7IaUP5er36dB+YE= k8s.io/apiextensions-apiserver v0.26.3/go.mod h1:jdA5MdjNWGP+njw1EKMZc64xAT5fIhN6VJrElV3sfpQ= -k8s.io/apimachinery v0.0.0-20180904193909-def12e63c512/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= -k8s.io/apimachinery v0.0.0-20190806215851-162a2dabc72f/go.mod h1:+ntn62igV2hyNj7/0brOvXSMONE2KxcePkSxK7/9FFQ= -k8s.io/apimachinery v0.0.0-20191004115801-a2eda9f80ab8/go.mod h1:llRdnznGEAqC3DcNm6yEj472xaFVfLM7hnYofMb12tQ= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.3/go.mod h1:H/IM+5vH9kZRNJ4l3x/fXP/5bOPJaVP/guptnZPeCFI= k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.26.3 h1:dQx6PNETJ7nODU3XPtrwkfuubs6w7sX0M8n61zHIV/k= k8s.io/apimachinery v0.26.3/go.mod h1:ats7nN1LExKHvJ9TmwootT00Yz05MuYqPXEXaVeOy5I= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/apiserver v0.21.3/go.mod h1:eDPWlZG6/cCCMj/JBcEpDoK+I+6i3r9GsChYBHSbAzU= -k8s.io/client-go v0.0.0-20180910083459-2cefa64ff137/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= -k8s.io/client-go v0.0.0-20191016111102-bec269661e48/go.mod h1:hrwktSwYGI4JK+TJA3dMaFyyvHVi/aLarVHpbs8bgCU= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= k8s.io/client-go v0.21.3/go.mod h1:+VPhCgTsaFmGILxR/7E1N0S+ryO010QBeNCv5JwRGYU= k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/code-generator v0.21.3/go.mod h1:K3y0Bv9Cz2cOW2vXUrNZlFbflhuPvuadW6JdnN6gGKo= k8s.io/code-generator v0.22.0/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.21.3/go.mod h1:kkuhtfEHeZM6LkX0saqSK8PbdO7A0HigUngmhhrwfGQ= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.4.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.10.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= -k8s.io/kube-openapi v0.0.0-20190709113604-33be087ad058/go.mod h1:nfDlWeOsu3pUf4yWGL+ERqohP4YsZcBJXWMK+gkzOA4= -k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= -k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210722164352-7f3ee0f31471/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -2660,8 +2220,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.19/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.9.6/go.mod h1:q6PpkM5vqQubEKUKOM6qr06oXGzOBcCby1DA9FbyZeA= sigs.k8s.io/controller-tools v0.6.2/go.mod h1:oaeGpjXn6+ZSEIQkUe/+3I40PNiDYp9aeawbt3xTgJ8= @@ -2669,10 +2227,7 @@ sigs.k8s.io/gateway-api v0.4.0 h1:07IJkTt21NetZTHtPKJk2I4XIgDN4BAlTIq1wK7V11o= sigs.k8s.io/gateway-api v0.4.0/go.mod h1:r3eiNP+0el+NTLwaTfOrCNXy8TukC+dIM3ggc+fbNWk= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= @@ -2681,4 +2236,3 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/integration/docker_compose_test.go b/integration/docker_compose_test.go index 2c2969fe0..e4e4c5244 100644 --- a/integration/docker_compose_test.go +++ b/integration/docker_compose_test.go @@ -65,7 +65,11 @@ func (s *DockerComposeSuite) TestComposeScale(c *check.C) { if strings.HasSuffix(name, "@internal") { continue } - c.Assert(name, checker.Equals, "whoami1-"+s.composeProject.Name+"@docker") + + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + + c.Assert(name, checker.Equals, "whoami1-"+composeProject.Name+"@docker") c.Assert(service.LoadBalancer.Servers, checker.HasLen, 2) // We could break here, but we don't just to keep us honest. } diff --git a/integration/docker_test.go b/integration/docker_test.go index fe7051f7f..d0124848f 100644 --- a/integration/docker_test.go +++ b/integration/docker_test.go @@ -76,7 +76,11 @@ func (s *DockerSuite) TestDefaultDockerContainers(c *check.C) { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) c.Assert(err, checker.IsNil) - req.Host = fmt.Sprintf("simple-%s.docker.localhost", s.composeProject.Name) + + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + + req.Host = fmt.Sprintf("simple-%s.docker.localhost", composeProject.Name) // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) resp, err := try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) diff --git a/integration/integration_test.go b/integration/integration_test.go index af3d35ca1..e50f34cb2 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -7,6 +7,7 @@ import ( "errors" "flag" "fmt" + "io" "io/fs" "os" "os/exec" @@ -16,9 +17,15 @@ import ( "text/template" "time" - "github.com/compose-spec/compose-go/cli" - "github.com/compose-spec/compose-go/types" + "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/config/configfile" + "github.com/docker/cli/cli/context/docker" + "github.com/docker/cli/cli/context/store" + manifeststore "github.com/docker/cli/cli/manifest/store" + registryclient "github.com/docker/cli/cli/registry/client" + "github.com/docker/cli/cli/streams" + "github.com/docker/cli/cli/trust" + cmdcompose "github.com/docker/compose/v2/cmd/compose" "github.com/docker/compose/v2/cmd/formatter" composeapi "github.com/docker/compose/v2/pkg/api" "github.com/docker/compose/v2/pkg/compose" @@ -27,6 +34,7 @@ import ( "github.com/docker/docker/client" "github.com/fatih/structs" "github.com/go-check/check" + notaryclient "github.com/theupdateframework/notary/client" "github.com/traefik/traefik/v2/pkg/log" checker "github.com/vdemeester/shakers" ) @@ -102,13 +110,13 @@ func Test(t *testing.T) { var traefikBinary = "../dist/traefik" type BaseSuite struct { - composeProject *types.Project - dockerComposeService composeapi.Service - dockerClient *client.Client + composeProjectOptions *cmdcompose.ProjectOptions + dockerComposeService composeapi.Service + dockerClient *client.Client } func (s *BaseSuite) TearDownSuite(c *check.C) { - if s.composeProject != nil && s.dockerComposeService != nil { + if s.composeProjectOptions != nil && s.dockerComposeService != nil { s.composeDown(c) } } @@ -123,40 +131,45 @@ func (s *BaseSuite) createComposeProject(c *check.C, name string) { s.dockerClient, err = client.NewClientWithOpts() c.Assert(err, checker.IsNil) - s.dockerComposeService = compose.NewComposeService(s.dockerClient, &configfile.ConfigFile{}) - ops, err := cli.NewProjectOptions([]string{composeFile}, cli.WithName(projectName)) - c.Assert(err, checker.IsNil) + fakeCLI := &FakeDockerCLI{client: s.dockerClient} + s.dockerComposeService = compose.NewComposeService(fakeCLI) - s.composeProject, err = cli.ProjectFromOptions(ops) - c.Assert(err, checker.IsNil) + s.composeProjectOptions = &cmdcompose.ProjectOptions{ + ProjectDir: ".", + ProjectName: projectName, + ConfigPaths: []string{composeFile}, + } } // composeUp starts the given services of the current docker compose project, if they are not already started. // Already running services are not affected (i.e. not stopped). func (s *BaseSuite) composeUp(c *check.C, services ...string) { - c.Assert(s.composeProject, check.NotNil) + c.Assert(s.composeProjectOptions, check.NotNil) c.Assert(s.dockerComposeService, check.NotNil) + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + // We use Create and Restart instead of Up, because the only option that actually works to control which containers // are started is within the RestartOptions. - err := s.dockerComposeService.Create(context.Background(), s.composeProject, composeapi.CreateOptions{}) + err = s.dockerComposeService.Create(context.Background(), composeProject, composeapi.CreateOptions{}) c.Assert(err, checker.IsNil) - err = s.dockerComposeService.Restart(context.Background(), s.composeProject, composeapi.RestartOptions{Services: services}) + err = s.dockerComposeService.Restart(context.Background(), composeProject.Name, composeapi.RestartOptions{Services: services}) c.Assert(err, checker.IsNil) } // composeExec runs the command in the given args in the given compose service container. // Already running services are not affected (i.e. not stopped). func (s *BaseSuite) composeExec(c *check.C, service string, args ...string) { - c.Assert(s.composeProject, check.NotNil) + c.Assert(s.composeProjectOptions, check.NotNil) c.Assert(s.dockerComposeService, check.NotNil) - _, err := s.dockerComposeService.Exec(context.Background(), s.composeProject.Name, composeapi.RunOptions{ + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + + _, err = s.dockerComposeService.Exec(context.Background(), composeProject.Name, composeapi.RunOptions{ Service: service, - Stdin: os.Stdin, - Stdout: os.Stdout, - Stderr: os.Stderr, Command: args, Tty: false, Index: 1, @@ -166,25 +179,28 @@ func (s *BaseSuite) composeExec(c *check.C, service string, args ...string) { // composeStop stops the given services of the current docker compose project and removes the corresponding containers. func (s *BaseSuite) composeStop(c *check.C, services ...string) { + c.Assert(s.composeProjectOptions, check.NotNil) c.Assert(s.dockerComposeService, check.NotNil) - c.Assert(s.composeProject, check.NotNil) - err := s.dockerComposeService.Stop(context.Background(), s.composeProject, composeapi.StopOptions{Services: services}) + composeProject, err := s.composeProjectOptions.ToProject(nil) c.Assert(err, checker.IsNil) - err = s.dockerComposeService.Remove(context.Background(), s.composeProject, composeapi.RemoveOptions{ - Services: services, - Force: true, - }) + err = s.dockerComposeService.Stop(context.Background(), composeProject.Name, composeapi.StopOptions{Services: services}) + c.Assert(err, checker.IsNil) + + err = s.dockerComposeService.Remove(context.Background(), composeProject.Name, composeapi.RemoveOptions{}) c.Assert(err, checker.IsNil) } // composeDown stops all compose project services and removes the corresponding containers. func (s *BaseSuite) composeDown(c *check.C) { + c.Assert(s.composeProjectOptions, check.NotNil) c.Assert(s.dockerComposeService, check.NotNil) - c.Assert(s.composeProject, check.NotNil) - err := s.dockerComposeService.Down(context.Background(), s.composeProject.Name, composeapi.DownOptions{}) + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + + err = s.dockerComposeService.Down(context.Background(), composeProject.Name, composeapi.DownOptions{}) c.Assert(err, checker.IsNil) } @@ -231,7 +247,7 @@ func (s *BaseSuite) displayLogK3S() { } func (s *BaseSuite) displayLogCompose(c *check.C) { - if s.dockerComposeService == nil || s.composeProject == nil { + if s.dockerComposeService == nil || s.composeProjectOptions == nil { log.WithoutContext().Infof("%s: No docker compose logs.", c.TestName()) return } @@ -239,9 +255,12 @@ func (s *BaseSuite) displayLogCompose(c *check.C) { log.WithoutContext().Infof("%s: docker compose logs: ", c.TestName()) logWriter := log.WithoutContext().WriterLevel(log.GetLevel()) - logConsumer := formatter.NewLogConsumer(context.Background(), logWriter, false, true) + logConsumer := formatter.NewLogConsumer(context.Background(), logWriter, logWriter, false, true, true) - err := s.dockerComposeService.Logs(context.Background(), s.composeProject.Name, logConsumer, composeapi.LogOptions{}) + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + + err = s.dockerComposeService.Logs(context.Background(), composeProject.Name, logConsumer, composeapi.LogOptions{}) c.Assert(err, checker.IsNil) log.WithoutContext().Println() @@ -291,8 +310,14 @@ func (s *BaseSuite) adaptFile(c *check.C, path string, tempObjects interface{}) } func (s *BaseSuite) getComposeServiceIP(c *check.C, name string) string { + c.Assert(s.composeProjectOptions, check.NotNil) + c.Assert(s.dockerComposeService, check.NotNil) + + composeProject, err := s.composeProjectOptions.ToProject(nil) + c.Assert(err, checker.IsNil) + filter := filters.NewArgs( - filters.Arg("label", fmt.Sprintf("%s=%s", composeapi.ProjectLabel, s.composeProject.Name)), + filters.Arg("label", fmt.Sprintf("%s=%s", composeapi.ProjectLabel, composeProject.Name)), filters.Arg("label", fmt.Sprintf("%s=%s", composeapi.ServiceLabel, name)), ) @@ -300,10 +325,10 @@ func (s *BaseSuite) getComposeServiceIP(c *check.C, name string) string { c.Assert(err, checker.IsNil) c.Assert(containers, checker.HasLen, 1) - networkNames := s.composeProject.NetworkNames() + networkNames := composeProject.NetworkNames() c.Assert(networkNames, checker.HasLen, 1) - network := s.composeProject.Networks[networkNames[0]] + network := composeProject.Networks[networkNames[0]] return containers[0].NetworkSettings.Networks[network.Name].IPAddress } @@ -366,3 +391,79 @@ func setupVPN(c *check.C, keyFile string) *tailscaleNotSuite { vpn.composeExec(c, "tailscaled", "tailscale", "up", "--authkey="+authKey, "--advertise-routes=172.31.42.0/24") return vpn } + +type FakeDockerCLI struct { + client client.APIClient +} + +func (f FakeDockerCLI) Client() client.APIClient { + return f.client +} + +func (f FakeDockerCLI) In() *streams.In { + return streams.NewIn(os.Stdin) +} + +func (f FakeDockerCLI) Out() *streams.Out { + return streams.NewOut(os.Stdout) +} + +func (f FakeDockerCLI) Err() io.Writer { + return streams.NewOut(os.Stderr) +} + +func (f FakeDockerCLI) SetIn(in *streams.In) { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) Apply(ops ...command.DockerCliOption) error { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) ConfigFile() *configfile.ConfigFile { + return &configfile.ConfigFile{} +} + +func (f FakeDockerCLI) ServerInfo() command.ServerInfo { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error) { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) DefaultVersion() string { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) CurrentVersion() string { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) ManifestStore() manifeststore.Store { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) RegistryClient(b bool) registryclient.RegistryClient { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) ContentTrustEnabled() bool { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) BuildKitEnabled() (bool, error) { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) ContextStore() store.Store { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) CurrentContext() string { + panic("implement me if you need me") +} + +func (f FakeDockerCLI) DockerEndpoint() docker.Endpoint { + panic("implement me if you need me") +} From e522446909123bd1a3b2bccf865cca535337582d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 9 Jan 2024 17:00:07 +0100 Subject: [PATCH 3/3] Improve integration tests Co-authored-by: Julien Salleyron --- .github/workflows/build.yaml | 27 +- .github/workflows/check_doc.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/documentation.yml | 2 +- .github/workflows/experimental.yaml | 2 +- .github/workflows/test-integration.yaml | 74 ++ .github/workflows/test-unit.yaml | 23 +- .github/workflows/validate.yaml | 47 +- .golangci.yml | 2 - .semaphore/semaphore.yml | 20 - Makefile | 103 +- docs/content/contributing/building-testing.md | 138 +-- go.mod | 91 +- go.sum | 332 +----- integration/access_log_test.go | 398 +++---- integration/acme_test.go | 132 ++- integration/conf_throttling_test.go | 48 +- integration/consul_catalog_test.go | 417 +++---- integration/consul_test.go | 113 +- integration/docker_compose_test.go | 53 +- integration/docker_test.go | 187 ++- integration/error_pages_test.go | 73 +- integration/etcd_test.go | 59 +- integration/file_test.go | 63 +- .../{with.toml => proxy-protocol.toml} | 10 +- .../fixtures/proxy-protocol/without.toml | 32 - integration/grpc_test.go | 197 ++-- integration/headers_test.go | 113 +- integration/healthcheck_test.go | 366 +++--- integration/hostresolver_test.go | 34 +- integration/http_test.go | 25 +- integration/https_test.go | 555 ++++----- integration/integration_test.go | 637 +++++----- integration/k8s_test.go | 126 +- integration/keepalive_test.go | 37 +- integration/log_rotation_test.go | 118 +- integration/marathon15_test.go | 52 +- integration/marathon_test.go | 59 +- integration/proxy_protocol_test.go | 183 +-- integration/ratelimit_test.go | 45 +- integration/redis_sentinel_test.go | 201 ++++ integration/redis_test.go | 236 +--- integration/resources/compose/access_log.yml | 7 +- integration/resources/compose/allowlist.yml | 5 - integration/resources/compose/base.yml | 5 - integration/resources/compose/consul.yml | 5 - .../resources/compose/consul_catalog.yml | 22 +- integration/resources/compose/docker.yml | 5 - integration/resources/compose/error_pages.yml | 9 +- integration/resources/compose/etcd.yml | 12 +- integration/resources/compose/file.yml | 5 - integration/resources/compose/healthcheck.yml | 5 - .../resources/compose/hostresolver.yml | 5 - integration/resources/compose/k8s.yml | 22 +- integration/resources/compose/minimal.yml | 9 +- integration/resources/compose/pebble.yml | 10 +- .../resources/compose/proxy-protocol.yml | 10 - integration/resources/compose/ratelimit.yml | 5 - integration/resources/compose/redis.yml | 5 - .../resources/compose/redis_sentinel.yml | 62 +- .../resources/compose/reqacceptgrace.yml | 5 - integration/resources/compose/rest.yml | 5 - integration/resources/compose/retry.yml | 5 - integration/resources/compose/stats.yml | 5 - integration/resources/compose/tailscale.yml | 8 +- integration/resources/compose/tcp.yml | 42 +- integration/resources/compose/timeout.yml | 5 - .../resources/compose/tlsclientheaders.yml | 5 - integration/resources/compose/tracing.yml | 5 - integration/resources/compose/udp.yml | 17 +- integration/resources/compose/zookeeper.yml | 5 - integration/resources/haproxy/haproxy.cfg | 30 - integration/rest_test.go | 88 +- integration/retry_test.go | 111 +- integration/simple_test.go | 1047 +++++++---------- integration/tcp_test.go | 261 ++-- integration/timeout_test.go | 50 +- integration/tls_client_headers_test.go | 53 +- integration/tracing_test.go | 289 ++--- integration/udp_test.go | 56 +- integration/websocket_test.go | 281 ++--- integration/zk_test.go | 61 +- script/code-gen.sh | 2 +- script/test-integration | 11 +- script/validate-lint | 2 +- 85 files changed, 3482 insertions(+), 4609 deletions(-) create mode 100644 .github/workflows/test-integration.yaml rename integration/fixtures/proxy-protocol/{with.toml => proxy-protocol.toml} (69%) delete mode 100644 integration/fixtures/proxy-protocol/without.toml create mode 100644 integration/redis_sentinel_test.go delete mode 100644 integration/resources/haproxy/haproxy.cfg diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0823568d7..d7cf99bcb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,6 @@ on: env: GO_VERSION: '1.21' CGO_ENABLED: 0 - IN_DOCKER: "" jobs: @@ -17,7 +16,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -39,38 +38,22 @@ jobs: os: [ ubuntu-20.04, macos-latest, windows-latest ] needs: - build-webui - defaults: - run: - working-directory: ${{ github.workspace }}/go/src/github.com/traefik/traefik steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v2 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - path: go/src/github.com/traefik/traefik fetch-depth: 0 - - name: Cache Go modules - uses: actions/cache@v3 + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - ~/Library/Caches/go-build - '%LocalAppData%\go-build' - key: ${{ runner.os }}-build-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-build-go- + go-version: ${{ env.GO_VERSION }} - name: Artifact webui uses: actions/download-artifact@v2 with: name: webui.tar.gz - path: ${{ github.workspace }}/go/src/github.com/traefik/traefik - name: Untar webui run: tar xvf webui.tar.gz diff --git a/.github/workflows/check_doc.yml b/.github/workflows/check_doc.yml index c800ad248..9f08efbb1 100644 --- a/.github/workflows/check_doc.yml +++ b/.github/workflows/check_doc.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3425536af..d3ef51b41 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index f9cc86519..5a1f215d3 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/experimental.yaml b/.github/workflows/experimental.yaml index 2b002a484..63d7c7bef 100644 --- a/.github/workflows/experimental.yaml +++ b/.github/workflows/experimental.yaml @@ -17,7 +17,7 @@ jobs: # https://github.com/marketplace/actions/checkout - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml new file mode 100644 index 000000000..bcbc3ec21 --- /dev/null +++ b/.github/workflows/test-integration.yaml @@ -0,0 +1,74 @@ +name: Test Integration + +on: + pull_request: + branches: + - '*' + push: + branches: + - 'gh-actions' + +env: + GO_VERSION: '1.21' + CGO_ENABLED: 0 + +jobs: + + build: + runs-on: ubuntu-20.04 + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Avoid generating webui + run: touch webui/static/index.html + + - name: Build binary + run: make binary + + test-integration: + runs-on: ubuntu-20.04 + needs: + - build + strategy: + fail-fast: true + matrix: + parallel: [12] + index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 , 11] + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Avoid generating webui + run: touch webui/static/index.html + + - name: Build binary + run: make binary + + - name: Generate go test Slice + id: test_split + uses: hashicorp-forge/go-test-split-action@v1 + with: + packages: ./integration + total: ${{ matrix.parallel }} + index: ${{ matrix.index }} + + - name: Run Integration tests + run: | + go test ./integration -test.timeout=20m -failfast -v -run "${{ steps.test_split.outputs.run}}" diff --git a/.github/workflows/test-unit.yaml b/.github/workflows/test-unit.yaml index 576f9a00e..7719186f7 100644 --- a/.github/workflows/test-unit.yaml +++ b/.github/workflows/test-unit.yaml @@ -7,37 +7,22 @@ on: env: GO_VERSION: '1.21' - IN_DOCKER: "" jobs: test-unit: runs-on: ubuntu-20.04 - defaults: - run: - working-directory: ${{ github.workspace }}/go/src/github.com/traefik/traefik - steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v2 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - path: go/src/github.com/traefik/traefik fetch-depth: 0 - - name: Cache Go modules - uses: actions/cache@v3 + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-test-unit-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-test-unit-go- + go-version: ${{ env.GO_VERSION }} - name: Avoid generating webui run: touch webui/static/index.html diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 914cddca1..1c0822abe 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -8,38 +8,23 @@ on: env: GO_VERSION: '1.21' GOLANGCI_LINT_VERSION: v1.55.2 - MISSSPELL_VERSION: v0.4.0 - IN_DOCKER: "" + MISSSPELL_VERSION: v0.4.1 jobs: validate: runs-on: ubuntu-20.04 - defaults: - run: - working-directory: ${{ github.workspace }}/go/src/github.com/traefik/traefik - steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v2 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - path: go/src/github.com/traefik/traefik fetch-depth: 0 - - name: Cache Go modules - uses: actions/cache@v3 + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-validate-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-validate-go- + go-version: ${{ env.GO_VERSION }} - name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }} run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION} @@ -56,30 +41,16 @@ jobs: validate-generate: runs-on: ubuntu-20.04 - defaults: - run: - working-directory: ${{ github.workspace }}/go/src/github.com/traefik/traefik - steps: - - name: Set up Go ${{ env.GO_VERSION }} - uses: actions/setup-go@v2 - with: - go-version: ${{ env.GO_VERSION }} - - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - path: go/src/github.com/traefik/traefik fetch-depth: 0 - - name: Cache Go modules - uses: actions/cache@v3 + - name: Set up Go ${{ env.GO_VERSION }} + uses: actions/setup-go@v5 with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: ${{ runner.os }}-validate-generate-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-validate-generate-go- + go-version: ${{ env.GO_VERSION }} - name: go generate run: | diff --git a/.golangci.yml b/.golangci.yml index 86b761fa8..22251b6c5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -146,7 +146,6 @@ linters-settings: gomoddirectives: replace-allow-list: - github.com/abbot/go-http-auth - - github.com/go-check/check - github.com/gorilla/mux - github.com/mailgun/minheap - github.com/mailgun/multibuf @@ -162,7 +161,6 @@ linters-settings: - expected-actual - float-compare - len - - suite-dont-use-pkg - suite-extra-assert-call - suite-thelper diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index d9a63e1f7..fa47df889 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -31,24 +31,6 @@ global_job_config: - cache restore traefik-$(checksum go.sum) blocks: - - name: Test Integration - dependencies: [] - run: - when: "branch =~ '.*' OR pull_request =~'.*'" - task: - jobs: - - name: Test Integration - commands: - - make pull-images - - touch webui/static/index.html # Avoid generating webui - - IN_DOCKER="" make binary - - make test-integration - - df -h - epilogue: - always: - commands: - - cache store traefik-$(checksum go.sum) $HOME/go/pkg/mod - - name: Release dependencies: [] run: @@ -65,8 +47,6 @@ blocks: value: 2.32.1 - name: CODENAME value: "mimolette" - - name: IN_DOCKER - value: "" prologue: commands: - export VERSION=${SEMAPHORE_GIT_TAG_NAME} diff --git a/Makefile b/Makefile index f5c5f9ddc..668c5404e 100644 --- a/Makefile +++ b/Makefile @@ -6,34 +6,6 @@ VERSION_GIT := $(if $(TAG_NAME),$(TAG_NAME),$(SHA)) VERSION := $(if $(VERSION),$(VERSION),$(VERSION_GIT)) GIT_BRANCH := $(subst heads/,,$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)) -TRAEFIK_DEV_IMAGE := traefik-dev$(if $(GIT_BRANCH),:$(subst /,-,$(GIT_BRANCH))) - -REPONAME := $(shell echo $(REPO) | tr '[:upper:]' '[:lower:]') -TRAEFIK_IMAGE := $(if $(REPONAME),$(REPONAME),"traefik/traefik") - -INTEGRATION_OPTS := $(if $(MAKE_DOCKER_HOST),-e "DOCKER_HOST=$(MAKE_DOCKER_HOST)",-v "/var/run/docker.sock:/var/run/docker.sock") -DOCKER_BUILD_ARGS := $(if $(DOCKER_VERSION), "--build-arg=DOCKER_VERSION=$(DOCKER_VERSION)",) - -# only used when running in docker -TRAEFIK_ENVS := \ - -e OS_ARCH_ARG \ - -e OS_PLATFORM_ARG \ - -e TESTFLAGS \ - -e VERBOSE \ - -e VERSION \ - -e CODENAME \ - -e TESTDIRS \ - -e CI \ - -e IN_DOCKER=true # Indicator for integration tests that we are running inside a container. - -TRAEFIK_MOUNT := -v "$(CURDIR)/dist:/go/src/github.com/traefik/traefik/dist" -DOCKER_RUN_OPTS := $(TRAEFIK_ENVS) $(TRAEFIK_MOUNT) "$(TRAEFIK_DEV_IMAGE)" -DOCKER_NON_INTERACTIVE ?= false -DOCKER_RUN_TRAEFIK := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS) -DOCKER_RUN_TRAEFIK_TEST := docker run --add-host=host.docker.internal:127.0.0.1 --rm --name=traefik --network traefik-test-network -v $(PWD):$(PWD) -w $(PWD) $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -it) $(DOCKER_RUN_OPTS) -DOCKER_RUN_TRAEFIK_NOTTY := docker run $(INTEGRATION_OPTS) $(if $(DOCKER_NON_INTERACTIVE), , -i) $(DOCKER_RUN_OPTS) - -IN_DOCKER ?= true .PHONY: default default: binary @@ -42,20 +14,6 @@ default: binary dist: mkdir -p dist -## Build Dev Docker image -.PHONY: build-dev-image -build-dev-image: dist -ifneq ("$(IN_DOCKER)", "") - docker build $(DOCKER_BUILD_ARGS) -t "$(TRAEFIK_DEV_IMAGE)" --build-arg HOST_PWD="$(PWD)" -f build.Dockerfile . -endif - -## Build Dev Docker image without cache -.PHONY: build-dev-image-no-cache -build-dev-image-no-cache: dist -ifneq ("$(IN_DOCKER)", "") - docker build $(DOCKER_BUILD_ARGS) --no-cache -t "$(TRAEFIK_DEV_IMAGE)" --build-arg HOST_PWD="$(PWD)" -f build.Dockerfile . -endif - ## Build WebUI Docker image .PHONY: build-webui-image build-webui-image: @@ -79,8 +37,8 @@ generate-webui: webui/static/index.html ## Build the binary .PHONY: binary -binary: generate-webui build-dev-image - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK)) ./script/make.sh generate binary +binary: generate-webui + ./script/make.sh generate binary ## Build the linux binary locally .PHONY: binary-debug @@ -89,35 +47,29 @@ binary-debug: generate-webui ## Build the binary for the standard platforms (linux, darwin, windows) .PHONY: crossbinary-default -crossbinary-default: generate-webui build-dev-image - $(DOCKER_RUN_TRAEFIK_NOTTY) ./script/make.sh generate crossbinary-default +crossbinary-default: generate-webui + ./script/make.sh generate crossbinary-default ## Build the binary for the standard platforms (linux, darwin, windows) in parallel .PHONY: crossbinary-default-parallel crossbinary-default-parallel: $(MAKE) generate-webui - $(MAKE) build-dev-image crossbinary-default + $(MAKE) crossbinary-default ## Run the unit and integration tests .PHONY: test -test: build-dev-image - -docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24 - trap 'docker network rm traefik-test-network' EXIT; \ - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_TEST)) ./script/make.sh generate test-unit binary test-integration +test: + ./script/make.sh generate test-unit binary test-integration ## Run the unit tests .PHONY: test-unit -test-unit: build-dev-image - -docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24 - trap 'docker network rm traefik-test-network' EXIT; \ - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_TEST)) ./script/make.sh generate test-unit +test-unit: + ./script/make.sh generate test-unit ## Run the integration tests .PHONY: test-integration -test-integration: build-dev-image - -docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24 - trap 'docker network rm traefik-test-network' EXIT; \ - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_TEST)) ./script/make.sh generate binary test-integration +test-integration: + ./script/make.sh generate binary test-integration ## Pull all images for integration tests .PHONY: pull-images @@ -128,16 +80,22 @@ pull-images: | uniq \ | xargs -P 6 -n 1 docker pull +EXECUTABLES = misspell shellcheck + ## Validate code and docs .PHONY: validate-files -validate-files: build-dev-image - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK)) ./script/make.sh generate validate-lint validate-misspell +validate-files: + $(foreach exec,$(EXECUTABLES),\ + $(if $(shell which $(exec)),,$(error "No $(exec) in PATH"))) + ./script/make.sh generate validate-lint validate-misspell bash $(CURDIR)/script/validate-shell-script.sh ## Validate code, docs, and vendor .PHONY: validate -validate: build-dev-image - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK)) ./script/make.sh generate validate-lint validate-misspell validate-vendor +validate: + $(foreach exec,$(EXECUTABLES),\ + $(if $(shell which $(exec)),,$(error "No $(exec) in PATH"))) + ./script/make.sh generate validate-lint validate-misspell validate-vendor bash $(CURDIR)/script/validate-shell-script.sh ## Clean up static directory and build a Docker Traefik image @@ -155,11 +113,6 @@ build-image-dirty: binary build-image-debug: binary-debug docker build -t $(TRAEFIK_IMAGE) -f debug.Dockerfile . -## Start a shell inside the build env -.PHONY: shell -shell: build-dev-image - $(DOCKER_RUN_TRAEFIK) /bin/bash - ## Build documentation site .PHONY: docs docs: @@ -187,23 +140,23 @@ generate-genconf: ## Create packages for the release .PHONY: release-packages -release-packages: generate-webui build-dev-image +release-packages: generate-webui rm -rf dist @- $(foreach os, linux darwin windows freebsd openbsd, \ - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) goreleaser release --skip-publish -p 2 --timeout="90m" --config $(shell go run ./internal/release $(os)); \ - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) go clean -cache; \ + goreleaser release --skip-publish -p 2 --timeout="90m" --config $(shell go run ./internal/release $(os)); \ + go clean -cache; \ ) - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) cat dist/**/*_checksums.txt >> dist/traefik_${VERSION}_checksums.txt - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) rm dist/**/*_checksums.txt - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) tar cfz dist/traefik-${VERSION}.src.tar.gz \ + cat dist/**/*_checksums.txt >> dist/traefik_${VERSION}_checksums.txt + rm dist/**/*_checksums.txt + tar cfz dist/traefik-${VERSION}.src.tar.gz \ --exclude-vcs \ --exclude .idea \ --exclude .travis \ --exclude .semaphoreci \ --exclude .github \ --exclude dist . - $(if $(IN_DOCKER),$(DOCKER_RUN_TRAEFIK_NOTTY)) chown -R $(shell id -u):$(shell id -g) dist/ + chown -R $(shell id -u):$(shell id -g) dist/ ## Format the Code .PHONY: fmt diff --git a/docs/content/contributing/building-testing.md b/docs/content/contributing/building-testing.md index 493a89747..838688869 100644 --- a/docs/content/contributing/building-testing.md +++ b/docs/content/contributing/building-testing.md @@ -13,67 +13,13 @@ Let's see how. ## Building -You need either [Docker](https://github.com/docker/docker "Link to website of Docker") and `make` (Method 1), or [Go](https://go.dev/ "Link to website of Go") (Method 2) in order to build Traefik. -For changes to its dependencies, the `dep` dependency management tool is required. - -### Method 1: Using `Docker` and `Makefile` - -Run make with the `binary` target. - -```bash -make binary -``` - -This will create binaries for the Linux platform in the `dist` folder. - -In case when you run build on CI, you may probably want to run docker in non-interactive mode. To achieve that define `DOCKER_NON_INTERACTIVE=true` environment variable. - -```bash -$ make binary -docker build -t traefik-webui -f webui/Dockerfile webui -Sending build context to Docker daemon 2.686MB -Step 1/11 : FROM node:8.15.0 - ---> 1f6c34f7921c -[...] -Successfully built ce4ff439c06a -Successfully tagged traefik-webui:latest -[...] -docker build -t "traefik-dev:4475--feature-documentation" -f build.Dockerfile . -Sending build context to Docker daemon 279MB -Step 1/10 : FROM golang:1.16-alpine - ---> f4bfb3d22bda -[...] -Successfully built 5c3c1a911277 -Successfully tagged traefik-dev:4475--feature-documentation -docker run -e "TEST_CONTAINER=1" -v "/var/run/docker.sock:/var/run/docker.sock" -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -e VERBOSE -e VERSION -e CODENAME -e TESTDIRS -e CI -e CONTAINER=DOCKER -v "/home/ldez/sources/go/src/github.com/traefik/traefik/"dist":/go/src/github.com/traefik/traefik/"dist"" "traefik-dev:4475--feature-documentation" ./script/make.sh generate binary ----> Making bundle: generate (in .) -removed 'autogen/genstatic/gen.go' - ----> Making bundle: binary (in .) - -$ ls dist/ -traefik* -``` - -The following targets can be executed outside Docker by setting the variable `IN_DOCKER` to an empty string (although be aware that some of the tests might fail in that context): - -- `test-unit` -- `test-integration` -- `validate` -- `binary` (the webUI is still generated by using Docker) - -ex: - -```bash -IN_DOCKER= make test-unit -``` - -### Method 2: Using `go` - -Requirements: - -- `go` v1.16+ -- environment variable `GO111MODULE=on` +You need: + - [Docker](https://github.com/docker/docker "Link to website of Docker") + - `make` + - [Go](https://go.dev/ "Link to website of Go") + - [misspell](https://github.com/golangci/misspell) + - [shellcheck](https://github.com/koalaman/shellcheck) + - [Tailscale](https://tailscale.com/) if you are using Docker Desktop !!! tip "Source Directory" @@ -106,41 +52,33 @@ Requirements: ## ... and the list goes on ``` -#### Build Traefik +### Build Traefik Once you've set up your go environment and cloned the source repository, you can build Traefik. ```bash -# Generate UI static files -make clean-webui generate-webui +$ make binary +./script/make.sh generate binary +---> Making bundle: generate (in .) -# required to merge non-code components into the final binary, -# such as the web dashboard/UI -go generate +---> Making bundle: binary (in .) + +$ ls dist/ +traefik* ``` -```bash -# Standard go build -go build ./cmd/traefik -``` - -You will find the Traefik executable (`traefik`) in the `~/go/src/github.com/traefik/traefik` directory. +You will find the Traefik executable (`traefik`) in the `./dist` directory. ## Testing -### Method 1: `Docker` and `make` - Run unit tests using the `test-unit` target. Run integration tests using the `test-integration` target. Run all tests (unit and integration) using the `test` target. ```bash $ make test-unit -docker build -t "traefik-dev:your-feature-branch" -f build.Dockerfile . -# […] -docker run --rm -it -e OS_ARCH_ARG -e OS_PLATFORM_ARG -e TESTFLAGS -v "/home/user/go/src/github/traefik/traefik/dist:/go/src/github.com/traefik/traefik/dist" "traefik-dev:your-feature-branch" ./script/make.sh generate test-unit +./script/make.sh generate test-unit ---> Making bundle: generate (in .) -removed 'gen.go' ---> Making bundle: test-unit (in .) + go test -cover -coverprofile=cover.out . @@ -151,28 +89,30 @@ Test success For development purposes, you can specify which tests to run by using (only works the `test-integration` target): +??? note "Configuring Tailscale for Docker Desktop user" + + Create `tailscale.secret` file in `integration` directory. + + This file need to contains a [Tailscale auth key](https://tailscale.com/kb/1085/auth-keys) + (an ephemeral, but reusable, one is recommended). + + Add this section to your tailscale ACLs to auto-approve the routes for the + containers in the docker subnet: + + ```json + "autoApprovers": { + // Allow myself to automatically + // advertize routes for docker networks + "routes": { + "172.31.42.0/24": ["your_tailscale_identity"], + }, + }, + ``` + ```bash # Run every tests in the MyTest suite -TESTFLAGS="-check.f MyTestSuite" make test-integration +TESTFLAGS="-test.run TestAccessLogSuite" make test-integration # Run the test "MyTest" in the MyTest suite -TESTFLAGS="-check.f MyTestSuite.MyTest" make test-integration - -# Run every tests starting with "My", in the MyTest suite -TESTFLAGS="-check.f MyTestSuite.My" make test-integration - -# Run every tests ending with "Test", in the MyTest suite -TESTFLAGS="-check.f MyTestSuite.*Test" make test-integration +TESTFLAGS="-test.run TestAccessLogSuite -testify.m ^TestAccessLog$" make test-integration ``` - -Check [gocheck](https://labix.org/gocheck "Link to website of gocheck") for more information. - -### Method 2: `go` - -Unit tests can be run from the cloned directory using `$ go test ./...` which should return `ok`, similar to: - -```test -ok _/home/user/go/src/github/traefik/traefik 0.004s -``` - -Integration tests must be run from the `integration/` directory and require the `-integration` switch: `$ cd integration && go test -integration ./...`. diff --git a/go.mod b/go.mod index 6b04cccc6..81c2de9a8 100644 --- a/go.mod +++ b/go.mod @@ -13,14 +13,12 @@ require ( github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/docker/cli v24.0.7+incompatible - github.com/docker/compose/v2 v2.19.0 github.com/docker/docker v24.0.7+incompatible github.com/docker/go-connections v0.4.0 github.com/fatih/structs v1.1.0 github.com/fsnotify/fsnotify v1.7.0 github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 github.com/go-acme/lego/v4 v4.14.0 - github.com/go-check/check v0.0.0-00010101000000-000000000000 github.com/go-kit/kit v0.10.1-0.20200915143503-439c4d2ed3ea github.com/golang/protobuf v1.5.3 github.com/google/go-github/v28 v28.1.1 @@ -58,14 +56,13 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.8.4 github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 - github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a + github.com/testcontainers/testcontainers-go v0.27.0 github.com/traefik/paerser v0.2.0 github.com/traefik/yaegi v0.15.1 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.2.0+incompatible github.com/unrolled/render v1.0.2 github.com/unrolled/secure v1.0.9 - github.com/vdemeester/shakers v0.1.0 github.com/vulcand/oxy/v2 v2.0.0-20230427132221-be5cf38f3c1c github.com/vulcand/predicate v1.2.0 go.elastic.co/apm v1.13.1 @@ -90,9 +87,8 @@ require ( require ( cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect + dario.cat/mergo v1.0.0 // indirect github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 // indirect - github.com/AlecAivazis/survey/v2 v2.3.7 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect @@ -121,6 +117,7 @@ require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 // indirect github.com/VividCortex/gohistogram v1.0.0 // indirect github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2 // indirect @@ -144,29 +141,20 @@ require ( github.com/aws/smithy-go v1.14.2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect - github.com/buger/goterm v1.0.4 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/civo/civogo v0.3.11 // indirect github.com/cloudflare/cloudflare-go v0.70.0 // indirect - github.com/compose-spec/compose-go v1.15.0 // indirect - github.com/containerd/console v1.0.3 // indirect - github.com/containerd/containerd v1.7.2 // indirect - github.com/containerd/continuity v0.4.1 // indirect - github.com/containerd/typeurl/v2 v2.1.1 // indirect + github.com/containerd/containerd v1.7.11 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpu/goacmedns v0.1.1 // indirect - github.com/cyphar/filepath-securejoin v0.2.3 // indirect + github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/deepmap/oapi-codegen v1.9.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493 // indirect github.com/dnsimple/dnsimple-go v1.2.0 // indirect - github.com/docker/buildx v0.11.2 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect - github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -178,42 +166,33 @@ require ( github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/exoscale/egoscale v0.100.1 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsevents v0.1.1 // indirect - github.com/fvbommel/sortorder v1.0.2 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-errors/errors v1.0.1 // indirect github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.3.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect github.com/go-openapi/swag v0.19.14 // indirect github.com/go-resty/resty/v2 v2.7.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/mock v1.6.0 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect github.com/google/s2a-go v0.1.5 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.3.1 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.11.0 // indirect github.com/gophercloud/gophercloud v1.0.0 // indirect github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae // indirect github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/cronexpr v1.1.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -225,8 +204,6 @@ require ( github.com/huandu/xstrings v1.4.0 // indirect github.com/iij/doapi v0.0.0-20190504054126-0bbf12d6d7df // indirect github.com/imdario/mergo v0.3.16 // indirect - github.com/in-toto/in-toto-golang v0.9.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/infobloxopen/infoblox-go-client v1.1.1 // indirect github.com/jcchavezs/porto v0.1.0 // indirect @@ -236,8 +213,8 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect - github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/labbsr0x/bindman-dns-webhook v1.0.2 // indirect github.com/labbsr0x/goh v1.0.1 // indirect @@ -246,28 +223,20 @@ require ( github.com/liquidweb/liquidweb-cli v0.6.9 // indirect github.com/liquidweb/liquidweb-go v1.6.3 // indirect github.com/looplab/fsm v0.1.0 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailgun/minheap v0.0.0-20170619185613-3dbe6c6bf55f // indirect github.com/mailgun/multibuf v0.1.2 // indirect github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/mattn/go-shellwords v1.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/miekg/pkcs11 v1.1.1 // indirect github.com/mimuret/golang-iij-dpf v0.9.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/reflectwalk v1.0.1 // indirect - github.com/moby/buildkit v0.12.3 // indirect - github.com/moby/locker v1.0.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect - github.com/moby/spdystream v0.2.0 // indirect - github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect - github.com/moby/sys/signal v0.7.0 // indirect - github.com/moby/sys/symlink v0.2.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -286,23 +255,22 @@ require ( github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/ginkgo/v2 v2.9.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc3 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opencontainers/runc v1.1.7 // indirect github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect github.com/oracle/oci-go-sdk v24.3.0+incompatible // indirect github.com/outcaste-io/ristretto v0.2.3 // indirect github.com/ovh/go-ovh v1.4.1 // indirect - github.com/pelletier/go-toml v1.9.5 // indirect github.com/philhofer/fwd v1.1.2 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/pquerna/otp v1.4.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect github.com/quic-go/qpack v0.4.0 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect github.com/redis/go-redis/v9 v9.2.1 // indirect - github.com/rivo/uniseg v0.4.4 // indirect github.com/sacloud/api-client-go v0.2.8 // indirect github.com/sacloud/go-http v0.1.6 // indirect github.com/sacloud/iaas-api-go v1.11.1 // indirect @@ -311,53 +279,36 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/fasthash v1.0.3 // indirect - github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 // indirect - github.com/shibumi/go-pathspec v1.3.0 // indirect + github.com/shirou/gopsutil/v3 v3.23.11 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04 // indirect github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect github.com/softlayer/softlayer-go v1.1.2 // indirect github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e // indirect github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.1 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 // indirect github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490 // indirect - github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect github.com/tinylib/msgp v1.1.8 // indirect - github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect - github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect - github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/transip/gotransip/v6 v6.20.0 // indirect github.com/ultradns/ultradns-go-sdk v1.5.0-20230427130837-23c9b0c // indirect github.com/vinyldns/go-vinyldns v0.9.16 // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect - github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f // indirect github.com/yandex-cloud/go-sdk v0.0.0-20220805164847-cf028e604997 // indirect - github.com/zmap/zlint/v3 v3.1.0 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect go.elastic.co/apm/module/apmhttp v1.13.1 // indirect go.elastic.co/fastjson v1.1.0 // indirect go.etcd.io/etcd/api/v3 v3.5.6 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect go.etcd.io/etcd/client/v3 v3.5.6 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 // indirect - go.opentelemetry.io/otel v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 // indirect - go.opentelemetry.io/otel/metric v1.20.0 // indirect - go.opentelemetry.io/otel/sdk v1.20.0 // indirect - go.opentelemetry.io/otel/trace v1.20.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/atomic v1.11.0 // indirect + go.uber.org/goleak v1.3.0 // indirect go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/ratelimit v0.2.0 // indirect @@ -368,8 +319,7 @@ require ( golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.128.0 // indirect @@ -394,7 +344,6 @@ require ( // Containous forks replace ( github.com/abbot/go-http-auth => github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e - github.com/go-check/check => github.com/containous/check v0.0.0-20170915194414-ca0bf163426a github.com/gorilla/mux => github.com/containous/mux v0.0.0-20220627093034-b2dd784e613f github.com/mailgun/minheap => github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595 ) diff --git a/go.sum b/go.sum index bce395c47..dc194e29d 100644 --- a/go.sum +++ b/go.sum @@ -40,15 +40,13 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= -github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg= -github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/AdamSLevy/jsonrpc2/v14 v14.1.0 h1:Dy3M9aegiI7d7PF1LUdjbVigJReo+QOceYsMyFh9qoE= github.com/AdamSLevy/jsonrpc2/v14 v14.1.0/go.mod h1:ZakZtbCXxCz82NJvq7MoREtiQesnDfrtF6RFUGzQfLo= -github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= -github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0 h1:8kDqDngH+DmVBiCtIjCFTGa7MBnsIOkF9IccInFEbjk= @@ -131,20 +129,15 @@ github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBa github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= -github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= -github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87 h1:xPMsUicZ3iosVPSIP7bW5EcGUzjiiMl1OYTe14y/R24= github.com/OpenDNS/vegadns2client v0.0.0-20180418235048-a3fa4a771d87/go.mod h1:iGLljf5n9GjT6kc0HBvyI1nOKnGQbNB66VzSNbK5iks= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A= github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g= @@ -163,8 +156,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755 h1:J45/QHgrzUdqe/Vco/Vxk0wRvdS2nKUxmf/zLgvfass= github.com/aliyun/alibaba-cloud-sdk-go v1.61.1755/go.mod h1:RcDobYh8k5VP6TNybz9m++gL3ijVI5wueVr0EM10VsU= -github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= -github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -178,8 +169,6 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c h1:651/eoCRnQ7YtSjAnSzRucrJz+3iGEFt+ysraELS81M= github.com/armon/go-radix v1.0.1-0.20221118154546-54df44f2176c/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -227,27 +216,15 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= -github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY= -github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE= -github.com/bugsnag/bugsnag-go v1.0.5/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/bugsnag-go v1.5.0 h1:tP8hiPv1pGGW3LA6LKy5lW6WG+y9J2xWUdPd3WC452k= -github.com/bugsnag/bugsnag-go v1.5.0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/bugsnag/panicwrap v1.2.0 h1:OzrKrRvXis8qEvOkfcxNcYbOd2O7xXS2nnKMEMABFQA= -github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= @@ -268,9 +245,6 @@ github.com/civo/civogo v0.3.11 h1:mON/fyrV946Sbk6paRtOSGsN+asCgCmHCgArf5xmGxM= github.com/civo/civogo v0.3.11/go.mod h1:7+GeeFwc4AYTULaEshpT2vIcl3Qq8HPoxA17viX3l6g= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= -github.com/cloudflare/cfssl v1.6.4 h1:NMOvfrEjFfC63K3SGXgAnFdsgkmiq4kATme5BfcqrO8= -github.com/cloudflare/cfssl v1.6.4/go.mod h1:8b3CQMxfWPAeom3zBnGJ6sd+G1NkL5TXqmDXacb+1J0= github.com/cloudflare/cloudflare-go v0.70.0 h1:4opGbUygM8DjirUuaz23jn3akuAcnOCEx+0nQtQEcFo= github.com/cloudflare/cloudflare-go v0.70.0/go.mod h1:VW6GuazkaZ4xEDkFt24lkXQUsE8q7BiGqDniC2s8WEM= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -281,38 +255,15 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= -github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4= -github.com/compose-spec/compose-go v1.15.0 h1:rv3TTgbS3U4Y8sRTngrcxDmpbz+fq26wTqHculSCi6s= -github.com/compose-spec/compose-go v1.15.0/go.mod h1:3yngGBGfls6FHGQsg4B1z6gz8ej9SOvmAJtxCwgbcnc= -github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= -github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= -github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= -github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= -github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= -github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= -github.com/containerd/nydus-snapshotter v0.8.2 h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E= -github.com/containerd/nydus-snapshotter v0.8.2/go.mod h1:UJILTN5LVBRY+dt8BGJbp72Xy729hUZsOugObEI3/O8= -github.com/containerd/stargz-snapshotter v0.14.3 h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U= -github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= -github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= -github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= -github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= -github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= -github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= +github.com/containerd/containerd v1.7.11 h1:lfGKw3eU35sjV0aG2eYZTiwFEY1pCzxdzicHP3SZILw= +github.com/containerd/containerd v1.7.11/go.mod h1:5UluHxHTX2rdvYuZ5OJTC5m/KJNs0Zs9wVoJm9zf5ZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd h1:0n+lFLh5zU0l6KSk3KpnDwfbPGAR44aRLgTbCnhRBHU= github.com/containous/alice v0.0.0-20181107144136-d83ebdd94cbd/go.mod h1:BbQgeDS5i0tNvypwEoF1oNjOJw8knRAE1DnVvjDstcQ= -github.com/containous/check v0.0.0-20170915194414-ca0bf163426a h1:8esAQaPKjfntQR1bag/mAOvWJd5HqSX5nsa+0KT63zo= -github.com/containous/check v0.0.0-20170915194414-ca0bf163426a/go.mod h1:eQOqZ7GoFsLxI7jFKLs7+Nv2Rm1x4FyK8d2NV+yGjwQ= github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e h1:D+uTEzDZc1Fhmd0Pq06c+O9+KkAyExw0eVmu/NOqaHU= github.com/containous/go-http-auth v0.4.1-0.20200324110947-a37a7636d23e/go.mod h1:s8kLgBQolDbsJOPVIGCEEv9zGAKUUf/685Gi0Qqg8z8= github.com/containous/minheap v0.0.0-20190809180810-6e71eb837595 h1:aPspFRO6b94To3gl4yTDOEtpjFwXI7V2W+z0JcNljQ4= @@ -336,18 +287,16 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpu/goacmedns v0.1.1 h1:DM3H2NiN2oam7QljgGY5ygy4yDXhK5Z4JUnqaugs2C4= github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ= +github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= +github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -357,7 +306,6 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.0-20210816181553-5444fa50b93d/go. github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= github.com/deepmap/oapi-codegen v1.9.1 h1:yHmEnA7jSTUMQgV+uN02WpZtwHnz2CBW3mZRIxr1vtI= github.com/deepmap/oapi-codegen v1.9.1/go.mod h1:PLqNAhdedP8ttRpBBkzLKU3bp+Fpy+tTgeAMlztR2cw= -github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= @@ -366,38 +314,20 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= -github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493 h1:fm5DpBD+A7o0+x9Nf+o9/4/qPGbfxLpr9qIPVuV8vQc= -github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493/go.mod h1:+fqBJ4vPYo4Uu1ZE4d+bUtTLRXfdSL3NvCZIZ9GHv58= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/dnsimple/dnsimple-go v1.2.0 h1:ddTGyLVKly5HKb5L65AkLqFqwZlWo3WnR0BlFZlIddM= github.com/dnsimple/dnsimple-go v1.2.0/go.mod h1:z/cs26v/eiRvUyXsHQBLd8lWF8+cD6GbmkPH84plM4U= -github.com/docker/buildx v0.11.2 h1:R3p9F0gnI4FwvQ0p40UwdX1T4ugap4UWxY3TFHoP4Ws= -github.com/docker/buildx v0.11.2/go.mod h1:CWAABt10iIuGpleypA3103mplDfcGu0A2AvT03xfpTc= github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/compose/v2 v2.19.0 h1:88LLRdyeVdkuIlc9wJ6SPUs2x5IoF4O9DtCgPS/d9lA= -github.com/docker/compose/v2 v2.19.0/go.mod h1:08yDbnLQKUqBpL862sUo4RBSKXt0n0XLtIbaUSMW1O8= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= -github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= -github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e h1:rMOGp6HPeMHbdLrZkX2nD+94uqDunc27tXVuS+ey4mQ= github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw= @@ -405,7 +335,6 @@ github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:Htrtb github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= @@ -427,8 +356,6 @@ github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6 github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= -github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= @@ -443,9 +370,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -461,8 +385,6 @@ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -470,15 +392,11 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/fsnotify/fsevents v0.1.1 h1:/125uxJvvoSDDBPen6yUZbil8J9ydKZnnl3TWWmvnkw= -github.com/fsnotify/fsevents v0.1.1/go.mod h1:+d+hS27T6k5J8CRaPLKFgwKYcpS7GwW3Ule9+SC2ZRc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fvbommel/sortorder v1.0.2 h1:mV4o8B2hKboCdkJm+a7uX/SIpZob4JzUpc5GGnM45eo= -github.com/fvbommel/sortorder v1.0.2/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2 h1:df6OFl8WNXk82xxP3R9ZPZ5seOA8XZkwLdbEzZF1/xI= github.com/gambol99/go-marathon v0.0.0-20180614232016-99a156b96fb2/go.mod h1:GLyXJD41gBO/NPKVPGQbhyyC06eugGy15QEZyUkE2/s= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -512,12 +430,11 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= @@ -543,9 +460,6 @@ github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSG github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -558,14 +472,9 @@ github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVr github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/goccy/go-json v0.7.8/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -578,11 +487,8 @@ github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -598,7 +504,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -627,9 +532,6 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.4 h1:hCyXHDbtqlr/lMXU0D4WgbalXL0Zk4dSWWMbPV8VrqY= -github.com/google/certificate-transparency-go v1.1.4/go.mod h1:D6lvbfwckhNrbM9WVl1EVeMOyzC19mpIjMOI4nxBHtQ= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -646,6 +548,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= @@ -678,14 +581,12 @@ github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b/go.mod h1:czg5+yv1E0Z github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.5 h1:8IYp3w9nysqv3JH+NJgXJzGbDHzLOTj43BmSkp+O7qg= github.com/google/s2a-go v0.1.5/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -711,18 +612,12 @@ github.com/gravitational/trace v1.1.16-0.20220114165159-14a9a7dd6aaf/go.mod h1:z github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= -github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.26.1 h1:5oSXOO5fboPZeW5SN+TdGFP/BILDgBm19OrPZ/pICIM= @@ -778,8 +673,6 @@ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM= -github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= @@ -791,8 +684,6 @@ github.com/hashicorp/nomad/api v0.0.0-20220506174431-b5665129cd1f/go.mod h1:b/Ao github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= -github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= @@ -807,11 +698,7 @@ github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/in-toto/in-toto-golang v0.9.0 h1:tHny7ac4KgtsfrG6ybU8gVOZux2H8jN05AXJ9EBM1XU= -github.com/in-toto/in-toto-golang v0.9.0/go.mod h1:xsBVrVsHNsB61++S6Dy2vWosKhuA3lUTQd+eF9HdeMo= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb-client-go/v2 v2.7.0 h1:QgP5mlBE9sGnzplpnf96pr+p7uqlIlL4W2GAP3n+XZg= github.com/influxdata/influxdb-client-go/v2 v2.7.0/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= @@ -840,20 +727,11 @@ github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= -github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o= -github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs= -github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4= github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -875,16 +753,11 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcMpsXCp3lJ03zYT1PkRd3kQGPn9GVg= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= -github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -936,7 +809,6 @@ github.com/lestrrat-go/httpcc v1.0.0/go.mod h1:tGS/u00Vh5N6FHNkExqGGNId8e0Big+++ github.com/lestrrat-go/iter v1.0.1/go.mod h1:zIdgO1mRKhn8l9vrZJZz9TUMMFbQbLeTsbqPDrJ/OJc= github.com/lestrrat-go/jwx v1.2.7/go.mod h1:bw24IXWbavc0R2RsOtpXL7RtMyP589yZ1+L7kd09ZGA= github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.17.2 h1:b32dj4662PGG5P9qVa6nBezccWdqgukndlMIuPGq1CQ= @@ -951,13 +823,14 @@ github.com/liquidweb/liquidweb-go v1.6.3/go.mod h1:SuXXp+thr28LnjEw18AYtWwIbWMHS github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/looplab/fsm v0.1.0 h1:Qte7Zdn/5hBNbXzP7yxVU4OIFHWXBovyTT2LaBTyC20= github.com/looplab/fsm v0.1.0/go.mod h1:m2VaOfDHxqXBBMgc26m6yUOwkFn8H2AlJDE+jd/uafI= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= -github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailgun/multibuf v0.1.2 h1:QE9kE27lK6LFZB4aYNVtUPlWVHVCT0zpgUr2uoq/+jk= github.com/mailgun/multibuf v0.1.2/go.mod h1:E+sUhIy69qgT6EM57kCPdUTlHnjTuxQBO/yf6af9Hes= github.com/mailgun/timetools v0.0.0-20141028012446-7e6055773c51 h1:Kg/NPZLLC3aAFr1YToMs98dbCdhootQ1hZIvZU28hAQ= @@ -996,11 +869,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= -github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -1008,17 +876,12 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxatome/go-testdeep v1.12.0 h1:Ql7Go8Tg0C1D/uMMX59LAoYK7LffeJQ6X2T04nTH68g= github.com/maxatome/go-testdeep v1.12.0/go.mod h1:lPZc/HAcJMP92l7yI6TRz1aZN5URwUBUAfUNvrclaNM= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.47/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= -github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimuret/golang-iij-dpf v0.9.1 h1:Gj6EhHJkOhr+q2RnvRPJsPMcjuVnWPSccEHyoEehU34= github.com/mimuret/golang-iij-dpf v0.9.1/go.mod h1:sl9KyOkESib9+KRD3HaGpgi1xk7eoN2+d96LCLsME2M= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -1036,7 +899,6 @@ github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9 github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -1045,22 +907,11 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/buildkit v0.12.3 h1:cFaPVnyC0PwAP5xHHfzdU5v9rgQrCi6HnGSg3WuFKp4= -github.com/moby/buildkit v0.12.3/go.mod h1:adB4y0SxxX8trnrY+oEulb48ODLqPO6pKMF0ppGcCoI= -github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= -github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= -github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= -github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= -github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= @@ -1073,7 +924,6 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -1120,7 +970,6 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= @@ -1134,7 +983,6 @@ github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGV github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.14.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -1145,15 +993,10 @@ github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+q github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= -github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v1.1.7 h1:y2EZDS8sNng4Ksf0GUYNhKbTShZJPJg1FiXJNH/uoCk= github.com/opencontainers/runc v1.1.7/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= -github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8= -github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= -github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -1183,10 +1026,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= -github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= @@ -1213,10 +1052,11 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/otp v1.4.0 h1:wZvl1TIVxKRThZIBiwOOHOGP/1+nZyWBil9Y2XNEDzg= github.com/pquerna/otp v1.4.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= -github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -1229,7 +1069,6 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1238,7 +1077,6 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1250,7 +1088,6 @@ github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB8 github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -1279,14 +1116,12 @@ github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6Qml github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052 h1:Qp27Idfgi6ACvFQat5+VJvlYToylpM/hcyLBI3WaKPA= github.com/richardartoul/molecule v1.0.1-0.20221107223329-32cfee06a052/go.mod h1:uvX/8buq8uVeiZiFht+0lqSLBHF+uGV8BrTv8W/SIwk= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -1311,22 +1146,21 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0 h1:OwvJ5jQf9LnIAS83waAj github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xeGtfIqFy7Do03K4cdCY0A/GlJLDKLHI= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002 h1:ka9QPuQg2u4LGipiZGsgkg3rJCo4iIUCy75FddM0GRQ= -github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= -github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= -github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= +github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ= +github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04 h1:ZTzdx88+AcnjqUfJwnz89UBrMSBQ1NEysg9u5d+dU9c= github.com/simplesurance/bunny-go v0.0.0-20221115111006-e11d9dc91f04/go.mod h1:5KS21fpch8TIMyAUv/qQqTa3GZfBDYgjaZbd2KXKYfg= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1346,41 +1180,27 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE= -github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= -github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1408,26 +1228,20 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154 h1:XGopsea1Dw7ecQ8JscCNQXDGYAKDiWjDeXnpN/+BY9g= github.com/stvp/go-udp-testing v0.0.0-20191102171040-06b61409b154/go.mod h1:7jxmlfBCDBXRzr0eAQJ48XC1hBu1np4CS5+cHEYfwpc= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490 h1:mmz27tVi2r70JYnm5y0Zk8w0Qzsx+vfUw3oqSyrEfP8= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.490/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490 h1:g9SWTaTy/rEuhMErC2jWq9Qt5ci+jBYSvXnJsLq4adg= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.490/go.mod h1:l9q4vc1QiawUB1m3RU+87yLvrrxe54jc0w/kEl4DbSQ= -github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a h1:tlJ7tGUHvcvL1v3yR6NcCc9nOqh2L+CG6HWrYQtwzQ0= -github.com/theupdateframework/notary v0.7.1-0.20210315103452-bf96a202a09a/go.mod h1:Y94A6rPp2OwNfP/7vmf8O2xx2IykP8pPXQ1DLouGnEw= -github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA= -github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375/go.mod h1:xRroudyp5iVtxKqZCrA6n2TLFRBf8bmnjr1UD4x+z7g= +github.com/testcontainers/testcontainers-go v0.27.0 h1:IeIrJN4twonTDuMuBNQdKZ+K97yd7VrmNGu+lDpYcDk= +github.com/testcontainers/testcontainers-go v0.27.0/go.mod h1:+HgYZcd17GshBUZv9b+jKFJ198heWPQq3KQIp2+N+7U= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg= -github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA= -github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= -github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= -github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= -github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/traefik/paerser v0.2.0 h1:zqCLGSXoNlcBd+mzqSCLjon/I6phqIjeJL2xFB2ysgQ= github.com/traefik/paerser v0.2.0/go.mod h1:afzaVcgF8A+MpTnPG4wBr4whjanCSYA6vK5RwaYVtRc= github.com/traefik/yaegi v0.15.1 h1:YA5SbaL6HZA0Exh9T/oArRHqGN2HQ+zgmCY7dkoTXu4= @@ -1456,10 +1270,6 @@ github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKn github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME= -github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= -github.com/vdemeester/shakers v0.1.0 h1:K+n9sSyUCg2ywmZkv+3c7vsYZfivcfKhMh8kRxCrONM= -github.com/vdemeester/shakers v0.1.0/go.mod h1:IZ1HHynUOQt32iQ3rvAeVddXLd19h/6LWiKsh9RZtAQ= github.com/vinyldns/go-vinyldns v0.9.16 h1:GZJStDkcCk1F1AcRc64LuuMh+ENL8pHA0CVd4ulRMcQ= github.com/vinyldns/go-vinyldns v0.9.16/go.mod h1:5qIJOdmzAnatKjurI+Tl4uTus7GJKJxb+zitufjHs3Q= github.com/vulcand/oxy/v2 v2.0.0-20230427132221-be5cf38f3c1c h1:Qt/YKpE8uAKNF4x2mwBZxmVo2WtgUL1WFDeXr1nlfpA= @@ -1468,15 +1278,8 @@ github.com/vulcand/predicate v1.2.0 h1:uFsW1gcnnR7R+QTID+FVcs0sSYlIGntoGOTb3rQJt github.com/vulcand/predicate v1.2.0/go.mod h1:VipoNYXny6c8N381zGUWkjuuNHiRbeAZhE7Qm9c+2GA= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= -github.com/weppos/publicsuffix-go v0.13.1-0.20210123135404-5fd73613514e/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= -github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b h1:FsyNrX12e5BkplJq7wKOLk0+C6LZ+KGXvuEcKUYm5ss= -github.com/weppos/publicsuffix-go v0.15.1-0.20210511084619-b1f36a2d6c0b/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yandex-cloud/go-genproto v0.0.0-20220805142335-27b56ddae16f h1:cG+ehPRJSlqljSufLf1KXeXpUd1dLNjnzA18mZcB/O0= @@ -1489,13 +1292,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE= -github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4/go.mod h1:5iU54tB79AMBcySS0R2XIyZBAVmeHranShAFELYx7is= -github.com/zmap/zcrypto v0.0.0-20210123152837-9cf5beac6d91/go.mod h1:R/deQh6+tSWlgI9tb4jNmXxn8nSCabl5ZQsBX9//I/E= -github.com/zmap/zcrypto v0.0.0-20220605182715-4dfcec6e9a8c h1:ufDm/IlBYZYLuiqvQuhpTKwrcAS2OlXEzWbDvTVGbSQ= -github.com/zmap/zcrypto v0.0.0-20220605182715-4dfcec6e9a8c/go.mod h1:egdRkzUylATvPkWMpebZbXhv0FMEMJGX/ur0D3Csk2s= -github.com/zmap/zlint/v3 v3.1.0 h1:WjVytZo79m/L1+/Mlphl09WBob6YTGljN5IGWZFpAv0= -github.com/zmap/zlint/v3 v3.1.0/go.mod h1:L7t8s3sEKkb0A2BxGy1IWrxt1ZATa1R4QfJZaQOD3zU= +github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.elastic.co/apm v1.13.1 h1:ICIcUcQOImg/bve9mQVyLCvm1cSUZ1afdwK6ACnxczU= go.elastic.co/apm v1.13.1/go.mod h1:dylGv2HKR0tiCV+wliJz1KHtDyuD8SPe69oV7VyK6WY= go.elastic.co/apm/module/apmhttp v1.13.1 h1:g2id6+AY8NRSA6nzwPDSU1AmBiHyZeh/lJRBlXq2yfQ= @@ -1529,29 +1327,7 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0 h1:PzIubN4/sjByhDRHLviCjJuweBXWFZWhghjg7cS28+M= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0/go.mod h1:Ct6zzQEuGK3WpJs2n4dn+wfJYzd/+hNnxMRTWjGn30M= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0 h1:WUMhXWqLmFlznidWF4B9iML8VMdZy4TzJVYzdYTCuaM= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0/go.mod h1:H1XIOXyXFff1aZa7nQeFHGYMB+gHH1TtZSti37uHX6o= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0 h1:1eHu3/pUSWaOgltNK3WJFaywKsTIr/PwvHyDmi0lQA0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.0/go.mod h1:HyABWq60Uy1kjJSa2BVOxUVao8Cdick5AWSKPutqy6U= -go.opentelemetry.io/otel v1.20.0 h1:vsb/ggIY+hUjD/zCAQHpzTmndPqv/ml2ArbsbfBYTAc= -go.opentelemetry.io/otel v1.20.0/go.mod h1:oUIGj3D77RwJdM6PPZImDpSZGDvkD9fhesHny69JFrs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 h1:DeFD0VgTZ+Cj6hxravYYZE2W4GlneVH81iAOPjZkzk8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0/go.mod h1:GijYcYmNpX1KazD5JmWGsi4P7dDTTTnfv1UbGn84MnU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 h1:gvmNvqrPYovvyRmCSygkUDyL8lC5Tl845MLEwqpxhEU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0/go.mod h1:vNUq47TGFioo+ffTSnKNdob241vePmtNZnAODKapKd0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0 h1:CsBiKCiQPdSjS+MlRiqeTI9JDDpSuk0Hb6QTRfwer8k= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.20.0/go.mod h1:CMJYNAfooOwSZSAmAeMUV1M+TXld3BiK++z9fqIm2xk= -go.opentelemetry.io/otel/metric v1.20.0 h1:ZlrO8Hu9+GAhnepmRGhSU7/VkpjrNowxRN9GyKR4wzA= -go.opentelemetry.io/otel/metric v1.20.0/go.mod h1:90DRw3nfK4D7Sm/75yQ00gTJxtkBxX+wu6YaNymbpVM= -go.opentelemetry.io/otel/sdk v1.20.0 h1:5Jf6imeFZlZtKv9Qbo6qt2ZkmWtdWx/wzcCbNUlAWGM= -go.opentelemetry.io/otel/sdk v1.20.0/go.mod h1:rmkSx1cZCm/tn16iWDn1GQbLtsW/LvsdEEFzCSRM6V0= -go.opentelemetry.io/otel/trace v1.20.0 h1:+yxVAPZPbQhbC3OfAkeIVTky6iTFpcr4SiY9om7mXSQ= -go.opentelemetry.io/otel/trace v1.20.0/go.mod h1:HJSK7F/hA5RlzpZ0zKDCHCDHm556LCDtKaAo6JmBFUU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -1588,7 +1364,6 @@ go4.org/unsafe/assume-no-moving-gc v0.0.0-20230525183740-e7c30c78aeb2/go.mod h1: golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1597,14 +1372,11 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -1776,6 +1548,7 @@ golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1813,8 +1586,8 @@ golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201110211018-35f3e6cf4a65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1825,7 +1598,6 @@ golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1837,11 +1609,9 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1853,8 +1623,10 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2029,7 +1801,6 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2059,7 +1830,6 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1: google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2108,10 +1878,7 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/DataDog/dd-trace-go.v1 v1.56.1 h1:AUe/ZF7xm6vYnigPe+TY54DmfWYJxhMRaw/TfvrbzvE= gopkg.in/DataDog/dd-trace-go.v1 v1.56.1/go.mod h1:KDLJ3CWVOSuVVwu+0ZR5KZo2rP6c7YyBV3v387dIpUU= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= -gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2122,7 +1889,6 @@ gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qS gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -2137,8 +1903,6 @@ gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24 gopkg.in/ns1/ns1-go.v2 v2.7.6 h1:mCPl7q0jbIGACXvGBljAuuApmKZo3rRi4tlRIEbMvjA= gopkg.in/ns1/ns1-go.v2 v2.7.6/go.mod h1:GMnKY+ZuoJ+lVLL+78uSTjwTz2jMazq6AfGKQOYhsPk= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= -gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= @@ -2160,8 +1924,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= +gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/integration/access_log_test.go b/integration/access_log_test.go index 5a65beb9e..1361deaa0 100644 --- a/integration/access_log_test.go +++ b/integration/access_log_test.go @@ -11,13 +11,15 @@ import ( "os" "strconv" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/log" "github.com/traefik/traefik/v2/pkg/middlewares/accesslog" - checker "github.com/vdemeester/shakers" ) const ( @@ -28,6 +30,10 @@ const ( // AccessLogSuite tests suite. type AccessLogSuite struct{ BaseSuite } +func TestAccessLogSuite(t *testing.T) { + suite.Run(t, new(AccessLogSuite)) +} + type accessLogValue struct { formatOnly bool code string @@ -36,67 +42,67 @@ type accessLogValue struct { serviceURL string } -func (s *AccessLogSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "access_log") - s.composeUp(c) +func (s *AccessLogSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("access_log") + s.composeUp() } -func (s *AccessLogSuite) TearDownTest(c *check.C) { - displayTraefikLogFile(c, traefikTestLogFile) +func (s *AccessLogSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *AccessLogSuite) TearDownTest() { + s.displayTraefikLogFile(traefikTestLogFile) _ = os.Remove(traefikTestAccessLogFile) } -func (s *AccessLogSuite) TestAccessLog(c *check.C) { +func (s *AccessLogSuite) TestAccessLog() { ensureWorkingDirectoryIsClean() // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) defer func() { traefikLog, err := os.ReadFile(traefikTestLogFile) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) log.WithoutContext().Info(string(traefikLog)) }() - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.waitForTraefik("server1") - waitForTraefik(c, "server1") - - checkStatsForLogFile(c) + s.checkStatsForLogFile() // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Make some requests req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend1.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend2.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogOutput(c) + count := s.checkAccessLogOutput() - c.Assert(count, checker.GreaterOrEqualThan, 3) + assert.Equal(s.T(), 3, count) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogAuthFrontend(c *check.C) { +func (s *AccessLogSuite) TestAccessLogAuthFrontend() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -124,48 +130,43 @@ func (s *AccessLogSuite) TestAccessLogAuthFrontend(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "authFrontend") + s.waitForTraefik("authFrontend") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test auth entrypoint req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8006/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend.auth.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.SetBasicAuth("test", "") err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.SetBasicAuth("test", "test") err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogDigestAuthMiddleware(c *check.C) { +func (s *AccessLogSuite) TestAccessLogDigestAuthMiddleware() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -193,27 +194,22 @@ func (s *AccessLogSuite) TestAccessLogDigestAuthMiddleware(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "digestAuthMiddleware") + s.waitForTraefik("digestAuthMiddleware") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test auth entrypoint req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8008/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "entrypoint.digest.auth.docker.local" resp, err := try.ResponseUntilStatusCode(req, 500*time.Millisecond, http.StatusUnauthorized) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) digest := digestParts(resp) digest["uri"] = "/" @@ -225,22 +221,22 @@ func (s *AccessLogSuite) TestAccessLogDigestAuthMiddleware(c *check.C) { req.Header.Set("Content-Type", "application/json") err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) digest["password"] = "test" req.Header.Set("Authorization", getDigestAuthorization(digest)) err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } // Thanks to mvndaai for digest authentication @@ -291,7 +287,7 @@ func getDigestAuthorization(digestParts map[string]string) string { return authorization } -func (s *AccessLogSuite) TestAccessLogFrontendRedirect(c *check.C) { +func (s *AccessLogSuite) TestAccessLogFrontendRedirect() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -308,38 +304,33 @@ func (s *AccessLogSuite) TestAccessLogFrontendRedirect(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "frontendRedirect") + s.waitForTraefik("frontendRedirect") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test frontend redirect req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8005/test", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogJSONFrontendRedirect(c *check.C) { +func (s *AccessLogSuite) TestAccessLogJSONFrontendRedirect() { ensureWorkingDirectoryIsClean() type logLine struct { @@ -365,30 +356,25 @@ func (s *AccessLogSuite) TestAccessLogJSONFrontendRedirect(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_json_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_json_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "frontendRedirect") + s.waitForTraefik("frontendRedirect") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test frontend redirect req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8005/test", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - lines := extractLines(c) - c.Assert(len(lines), checker.GreaterOrEqualThan, len(expected)) + lines := s.extractLines() + assert.GreaterOrEqual(s.T(), len(lines), len(expected)) for i, line := range lines { if line == "" { @@ -396,15 +382,15 @@ func (s *AccessLogSuite) TestAccessLogJSONFrontendRedirect(c *check.C) { } var logline logLine err := json.Unmarshal([]byte(line), &logline) - c.Assert(err, checker.IsNil) - c.Assert(logline.DownstreamStatus, checker.Equals, expected[i].DownstreamStatus) - c.Assert(logline.OriginStatus, checker.Equals, expected[i].OriginStatus) - c.Assert(logline.RouterName, checker.Equals, expected[i].RouterName) - c.Assert(logline.ServiceName, checker.Equals, expected[i].ServiceName) + require.NoError(s.T(), err) + assert.Equal(s.T(), expected[i].DownstreamStatus, logline.DownstreamStatus) + assert.Equal(s.T(), expected[i].OriginStatus, logline.OriginStatus) + assert.Equal(s.T(), expected[i].RouterName, logline.RouterName) + assert.Equal(s.T(), expected[i].ServiceName, logline.ServiceName) } } -func (s *AccessLogSuite) TestAccessLogRateLimit(c *check.C) { +func (s *AccessLogSuite) TestAccessLogRateLimit() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -424,42 +410,37 @@ func (s *AccessLogSuite) TestAccessLogRateLimit(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "rateLimit") + s.waitForTraefik("rateLimit") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test rate limit req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8007/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "ratelimit.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusTooManyRequests), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogBackendNotFound(c *check.C) { +func (s *AccessLogSuite) TestAccessLogBackendNotFound() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -473,38 +454,33 @@ func (s *AccessLogSuite) TestAccessLogBackendNotFound(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.waitForTraefik("server1") - waitForTraefik(c, "server1") - - checkStatsForLogFile(c) + s.checkStatsForLogFile() // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test rate limit req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "backendnotfound.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogFrontendWhitelist(c *check.C) { +func (s *AccessLogSuite) TestAccessLogFrontendWhitelist() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -518,38 +494,33 @@ func (s *AccessLogSuite) TestAccessLogFrontendWhitelist(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "frontendWhitelist") + s.waitForTraefik("frontendWhitelist") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test rate limit req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend.whitelist.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusForbidden), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogAuthFrontendSuccess(c *check.C) { +func (s *AccessLogSuite) TestAccessLogAuthFrontendSuccess() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -563,39 +534,34 @@ func (s *AccessLogSuite) TestAccessLogAuthFrontendSuccess(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "authFrontend") + s.waitForTraefik("authFrontend") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test auth entrypoint req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8006/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend.auth.docker.local" req.SetBasicAuth("test", "test") err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func (s *AccessLogSuite) TestAccessLogPreflightHeadersMiddleware(c *check.C) { +func (s *AccessLogSuite) TestAccessLogPreflightHeadersMiddleware() { ensureWorkingDirectoryIsClean() expected := []accessLogValue{ @@ -609,79 +575,74 @@ func (s *AccessLogSuite) TestAccessLogPreflightHeadersMiddleware(c *check.C) { } // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) + s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.checkStatsForLogFile() - checkStatsForLogFile(c) - - waitForTraefik(c, "preflightCORS") + s.waitForTraefik("preflightCORS") // Verify Traefik started OK - checkTraefikStarted(c) + s.checkTraefikStarted() // Test preflight response req, err := http.NewRequest(http.MethodOptions, "http://127.0.0.1:8009/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "preflight.docker.local" req.Header.Set("Origin", "whatever") req.Header.Set("Access-Control-Request-Method", "GET") err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log output as expected - count := checkAccessLogExactValuesOutput(c, expected) + count := s.checkAccessLogExactValuesOutput(expected) - c.Assert(count, checker.GreaterOrEqualThan, len(expected)) + assert.GreaterOrEqual(s.T(), count, len(expected)) // Verify no other Traefik problems - checkNoOtherTraefikProblems(c) + s.checkNoOtherTraefikProblems() } -func checkNoOtherTraefikProblems(c *check.C) { +func (s *AccessLogSuite) checkNoOtherTraefikProblems() { traefikLog, err := os.ReadFile(traefikTestLogFile) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if len(traefikLog) > 0 { fmt.Printf("%s\n", string(traefikLog)) } } -func checkAccessLogOutput(c *check.C) int { - lines := extractLines(c) +func (s *AccessLogSuite) checkAccessLogOutput() int { + lines := s.extractLines() count := 0 for i, line := range lines { if len(line) > 0 { count++ - CheckAccessLogFormat(c, line, i) + s.CheckAccessLogFormat(line, i) } } return count } -func checkAccessLogExactValuesOutput(c *check.C, values []accessLogValue) int { - lines := extractLines(c) +func (s *AccessLogSuite) checkAccessLogExactValuesOutput(values []accessLogValue) int { + lines := s.extractLines() count := 0 for i, line := range lines { fmt.Println(line) if len(line) > 0 { count++ if values[i].formatOnly { - CheckAccessLogFormat(c, line, i) + s.CheckAccessLogFormat(line, i) } else { - checkAccessLogExactValues(c, line, i, values[i]) + s.checkAccessLogExactValues(line, i, values[i]) } } } return count } -func extractLines(c *check.C) []string { +func (s *AccessLogSuite) extractLines() []string { accessLog, err := os.ReadFile(traefikTestAccessLogFile) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) lines := strings.Split(string(accessLog), "\n") @@ -694,14 +655,14 @@ func extractLines(c *check.C) []string { return clean } -func checkStatsForLogFile(c *check.C) { +func (s *AccessLogSuite) checkStatsForLogFile() { err := try.Do(1*time.Second, func() error { if _, errStat := os.Stat(traefikTestLogFile); errStat != nil { return fmt.Errorf("could not get stats for log file: %w", errStat) } return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } func ensureWorkingDirectoryIsClean() { @@ -709,69 +670,38 @@ func ensureWorkingDirectoryIsClean() { os.Remove(traefikTestLogFile) } -func checkTraefikStarted(c *check.C) []byte { +func (s *AccessLogSuite) checkTraefikStarted() []byte { traefikLog, err := os.ReadFile(traefikTestLogFile) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if len(traefikLog) > 0 { fmt.Printf("%s\n", string(traefikLog)) } return traefikLog } -func CheckAccessLogFormat(c *check.C, line string, i int) { +func (s *BaseSuite) CheckAccessLogFormat(line string, i int) { results, err := accesslog.ParseAccessLog(line) - c.Assert(err, checker.IsNil) - c.Assert(results, checker.HasLen, 14) - c.Assert(results[accesslog.OriginStatus], checker.Matches, `^(-|\d{3})$`) + require.NoError(s.T(), err) + assert.Len(s.T(), results, 14) + assert.Regexp(s.T(), `^(-|\d{3})$`, results[accesslog.OriginStatus]) count, _ := strconv.Atoi(results[accesslog.RequestCount]) - c.Assert(count, checker.GreaterOrEqualThan, i+1) - c.Assert(results[accesslog.RouterName], checker.Matches, `"(rt-.+@docker|api@internal)"`) - c.Assert(results[accesslog.ServiceURL], checker.HasPrefix, `"http://`) - c.Assert(results[accesslog.Duration], checker.Matches, `^\d+ms$`) + assert.GreaterOrEqual(s.T(), count, i+1) + assert.Regexp(s.T(), `"(rt-.+@docker|api@internal)"`, results[accesslog.RouterName]) + assert.True(s.T(), strings.HasPrefix(results[accesslog.ServiceURL], `"http://`)) + assert.Regexp(s.T(), `^\d+ms$`, results[accesslog.Duration]) } -func checkAccessLogExactValues(c *check.C, line string, i int, v accessLogValue) { +func (s *AccessLogSuite) checkAccessLogExactValues(line string, i int, v accessLogValue) { results, err := accesslog.ParseAccessLog(line) - c.Assert(err, checker.IsNil) - c.Assert(results, checker.HasLen, 14) + require.NoError(s.T(), err) + assert.Len(s.T(), results, 14) if len(v.user) > 0 { - c.Assert(results[accesslog.ClientUsername], checker.Equals, v.user) + assert.Equal(s.T(), v.user, results[accesslog.ClientUsername]) } - c.Assert(results[accesslog.OriginStatus], checker.Equals, v.code) + assert.Equal(s.T(), v.code, results[accesslog.OriginStatus]) count, _ := strconv.Atoi(results[accesslog.RequestCount]) - c.Assert(count, checker.GreaterOrEqualThan, i+1) - c.Assert(results[accesslog.RouterName], checker.Matches, `^"?`+v.routerName+`.*(@docker)?$`) - c.Assert(results[accesslog.ServiceURL], checker.Matches, `^"?`+v.serviceURL+`.*$`) - c.Assert(results[accesslog.Duration], checker.Matches, `^\d+ms$`) -} - -func waitForTraefik(c *check.C, containerName string) { - time.Sleep(1 * time.Second) - - // Wait for Traefik to turn ready. - req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/api/rawdata", nil) - c.Assert(err, checker.IsNil) - - err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains(containerName)) - c.Assert(err, checker.IsNil) -} - -func displayTraefikLogFile(c *check.C, path string) { - if c.Failed() { - if _, err := os.Stat(path); !os.IsNotExist(err) { - content, errRead := os.ReadFile(path) - fmt.Printf("%s: Traefik logs: \n", c.TestName()) - if errRead == nil { - fmt.Println(content) - } else { - fmt.Println(errRead) - } - } else { - fmt.Printf("%s: No Traefik logs.\n", c.TestName()) - } - errRemove := os.Remove(path) - if errRemove != nil { - fmt.Println(errRemove) - } - } + assert.GreaterOrEqual(s.T(), count, i+1) + assert.Regexp(s.T(), `^"?`+v.routerName+`.*(@docker)?$`, results[accesslog.RouterName]) + assert.Regexp(s.T(), `^"?`+v.serviceURL+`.*$`, results[accesslog.ServiceURL]) + assert.Regexp(s.T(), `^\d+ms$`, results[accesslog.Duration]) } diff --git a/integration/acme_test.go b/integration/acme_test.go index 73e9958bb..be48e7557 100644 --- a/integration/acme_test.go +++ b/integration/acme_test.go @@ -8,16 +8,19 @@ import ( "net/http" "os" "path/filepath" + "testing" "time" - "github.com/go-check/check" "github.com/miekg/dns" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/static" + "github.com/traefik/traefik/v2/pkg/log" "github.com/traefik/traefik/v2/pkg/provider/acme" "github.com/traefik/traefik/v2/pkg/testhelpers" "github.com/traefik/traefik/v2/pkg/types" - checker "github.com/vdemeester/shakers" ) // ACME test suites. @@ -27,6 +30,10 @@ type AcmeSuite struct { fakeDNSServer *dns.Server } +func TestAcmeSuite(t *testing.T) { + suite.Run(t, new(AcmeSuite)) +} + type subCases struct { host string expectedCommonName string @@ -87,17 +94,18 @@ func setupPebbleRootCA() (*http.Transport, error) { }, nil } -func (s *AcmeSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "pebble") - s.composeUp(c) +func (s *AcmeSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - s.fakeDNSServer = startFakeDNSServer(s.getContainerIP(c, "traefik")) - s.pebbleIP = s.getComposeServiceIP(c, "pebble") + s.createComposeProject("pebble") + s.composeUp() + + // Retrieving the Docker host ip. + s.fakeDNSServer = startFakeDNSServer(s.hostIP) + s.pebbleIP = s.getComposeServiceIP("pebble") pebbleTransport, err := setupPebbleRootCA() - if err != nil { - c.Fatal(err) - } + require.NoError(s.T(), err) // wait for pebble req := testhelpers.MustNewRequest(http.MethodGet, s.getAcmeURL(), nil) @@ -113,21 +121,24 @@ func (s *AcmeSuite) SetUpSuite(c *check.C) { } return try.StatusCodeIs(http.StatusOK)(resp) }) - c.Assert(err, checker.IsNil) + + require.NoError(s.T(), err) } -func (s *AcmeSuite) TearDownSuite(c *check.C) { +func (s *AcmeSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() + if s.fakeDNSServer != nil { err := s.fakeDNSServer.Shutdown() if err != nil { - c.Log(err) + log.WithoutContext().Info(err.Error()) } } - s.composeDown(c) + s.composeDown() } -func (s *AcmeSuite) TestHTTP01Domains(c *check.C) { +func (s *AcmeSuite) TestHTTP01Domains() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_domains.toml", subCases: []subCases{{ @@ -147,10 +158,10 @@ func (s *AcmeSuite) TestHTTP01Domains(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01StoreDomains(c *check.C) { +func (s *AcmeSuite) TestHTTP01StoreDomains() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_store_domains.toml", subCases: []subCases{{ @@ -170,10 +181,10 @@ func (s *AcmeSuite) TestHTTP01StoreDomains(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01DomainsInSAN(c *check.C) { +func (s *AcmeSuite) TestHTTP01DomainsInSAN() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_domains.toml", subCases: []subCases{{ @@ -194,10 +205,10 @@ func (s *AcmeSuite) TestHTTP01DomainsInSAN(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01OnHostRule(c *check.C) { +func (s *AcmeSuite) TestHTTP01OnHostRule() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_base.toml", subCases: []subCases{{ @@ -214,10 +225,10 @@ func (s *AcmeSuite) TestHTTP01OnHostRule(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestMultipleResolver(c *check.C) { +func (s *AcmeSuite) TestMultipleResolver() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_multiple_resolvers.toml", subCases: []subCases{ @@ -245,10 +256,10 @@ func (s *AcmeSuite) TestMultipleResolver(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01OnHostRuleECDSA(c *check.C) { +func (s *AcmeSuite) TestHTTP01OnHostRuleECDSA() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_base.toml", subCases: []subCases{{ @@ -266,10 +277,10 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleECDSA(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01OnHostRuleInvalidAlgo(c *check.C) { +func (s *AcmeSuite) TestHTTP01OnHostRuleInvalidAlgo() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_base.toml", subCases: []subCases{{ @@ -287,10 +298,10 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleInvalidAlgo(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01OnHostRuleDefaultDynamicCertificatesWithWildcard(c *check.C) { +func (s *AcmeSuite) TestHTTP01OnHostRuleDefaultDynamicCertificatesWithWildcard() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_tls.toml", subCases: []subCases{{ @@ -307,10 +318,10 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleDefaultDynamicCertificatesWithWildcard(c }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestHTTP01OnHostRuleDynamicCertificatesWithWildcard(c *check.C) { +func (s *AcmeSuite) TestHTTP01OnHostRuleDynamicCertificatesWithWildcard() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_tls_dynamic.toml", subCases: []subCases{{ @@ -327,10 +338,10 @@ func (s *AcmeSuite) TestHTTP01OnHostRuleDynamicCertificatesWithWildcard(c *check }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestTLSALPN01OnHostRuleTCP(c *check.C) { +func (s *AcmeSuite) TestTLSALPN01OnHostRuleTCP() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_tcp.toml", subCases: []subCases{{ @@ -347,10 +358,10 @@ func (s *AcmeSuite) TestTLSALPN01OnHostRuleTCP(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestTLSALPN01OnHostRule(c *check.C) { +func (s *AcmeSuite) TestTLSALPN01OnHostRule() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_base.toml", subCases: []subCases{{ @@ -367,10 +378,10 @@ func (s *AcmeSuite) TestTLSALPN01OnHostRule(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestTLSALPN01Domains(c *check.C) { +func (s *AcmeSuite) TestTLSALPN01Domains() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_domains.toml", subCases: []subCases{{ @@ -390,10 +401,10 @@ func (s *AcmeSuite) TestTLSALPN01Domains(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } -func (s *AcmeSuite) TestTLSALPN01DomainsInSAN(c *check.C) { +func (s *AcmeSuite) TestTLSALPN01DomainsInSAN() { testCase := acmeTestCase{ traefikConfFilePath: "fixtures/acme/acme_domains.toml", subCases: []subCases{{ @@ -414,12 +425,12 @@ func (s *AcmeSuite) TestTLSALPN01DomainsInSAN(c *check.C) { }, } - s.retrieveAcmeCertificate(c, testCase) + s.retrieveAcmeCertificate(testCase) } // Test Let's encrypt down. -func (s *AcmeSuite) TestNoValidLetsEncryptServer(c *check.C) { - file := s.adaptFile(c, "fixtures/acme/acme_base.toml", templateModel{ +func (s *AcmeSuite) TestNoValidLetsEncryptServer() { + file := s.adaptFile("fixtures/acme/acme_base.toml", templateModel{ Acme: map[string]static.CertificateResolver{ "default": {ACME: &acme.Configuration{ CAServer: "http://wrongurl:4001/directory", @@ -427,21 +438,16 @@ func (s *AcmeSuite) TestNoValidLetsEncryptServer(c *check.C) { }}, }, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Expected traefik works - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) } // Doing an HTTPS request and test the response certificate. -func (s *AcmeSuite) retrieveAcmeCertificate(c *check.C, testCase acmeTestCase) { +func (s *AcmeSuite) retrieveAcmeCertificate(testCase acmeTestCase) { if len(testCase.template.PortHTTP) == 0 { testCase.template.PortHTTP = ":5002" } @@ -456,14 +462,10 @@ func (s *AcmeSuite) retrieveAcmeCertificate(c *check.C, testCase acmeTestCase) { } } - file := s.adaptFile(c, testCase.traefikConfFilePath, testCase.template) - defer os.Remove(file) + file := s.adaptFile(testCase.traefikConfFilePath, testCase.template) + + s.traefikCmd(withConfigFile(file)) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) // A real file is needed to have the right mode on acme.json file defer os.Remove("/tmp/acme.json") @@ -477,11 +479,11 @@ func (s *AcmeSuite) retrieveAcmeCertificate(c *check.C, testCase acmeTestCase) { } // wait for traefik (generating acme account take some seconds) - err = try.Do(60*time.Second, func() error { + err := try.Do(60*time.Second, func() error { _, errGet := client.Get("https://127.0.0.1:5001") return errGet }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) for _, sub := range testCase.subCases { client = &http.Client{ @@ -503,7 +505,7 @@ func (s *AcmeSuite) retrieveAcmeCertificate(c *check.C, testCase acmeTestCase) { var resp *http.Response // Retry to send a Request which uses the LE generated certificate - err = try.Do(60*time.Second, func() error { + err := try.Do(60*time.Second, func() error { resp, err = client.Do(req) if err != nil { return err @@ -517,10 +519,10 @@ func (s *AcmeSuite) retrieveAcmeCertificate(c *check.C, testCase acmeTestCase) { return nil }) - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, resp.StatusCode) // Check Domain into response certificate - c.Assert(resp.TLS.PeerCertificates[0].Subject.CommonName, checker.Equals, sub.expectedCommonName) - c.Assert(resp.TLS.PeerCertificates[0].PublicKeyAlgorithm, checker.Equals, sub.expectedAlgorithm) + assert.Equal(s.T(), sub.expectedCommonName, resp.TLS.PeerCertificates[0].Subject.CommonName) + assert.Equal(s.T(), sub.expectedAlgorithm, resp.TLS.PeerCertificates[0].PublicKeyAlgorithm) } } diff --git a/integration/conf_throttling_test.go b/integration/conf_throttling_test.go index 6c4333b35..7e29c039f 100644 --- a/integration/conf_throttling_test.go +++ b/integration/conf_throttling_test.go @@ -8,36 +8,38 @@ import ( "net/http" "regexp" "strconv" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/dynamic" - checker "github.com/vdemeester/shakers" ) type ThrottlingSuite struct{ BaseSuite } -func (s *ThrottlingSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "rest") - s.composeUp(c) +func TestThrottlingSuite(t *testing.T) { + suite.Run(t, new(ThrottlingSuite)) } -func (s *ThrottlingSuite) TestThrottleConfReload(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/throttling/simple.toml")) +func (s *ThrottlingSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("rest") + s.composeUp() +} - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *ThrottlingSuite) TestThrottleConfReload() { + s.traefikCmd(withConfigFile("fixtures/throttling/simple.toml")) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("rest@internal")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("rest@internal")) + require.NoError(s.T(), err) // Expected a 404 as we did not configure anything. err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) config := &dynamic.Configuration{ HTTP: &dynamic.HTTPConfiguration{ @@ -47,7 +49,7 @@ func (s *ThrottlingSuite) TestThrottleConfReload(c *check.C) { LoadBalancer: &dynamic.ServersLoadBalancer{ Servers: []dynamic.Server{ { - URL: "http://" + s.getComposeServiceIP(c, "whoami1") + ":80", + URL: "http://" + s.getComposeServiceIP("whoami1") + ":80", }, }, }, @@ -68,28 +70,28 @@ func (s *ThrottlingSuite) TestThrottleConfReload(c *check.C) { for i := 0; i < confChanges; i++ { config.HTTP.Routers[fmt.Sprintf("routerHTTP%d", i)] = router data, err := json.Marshal(config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodPut, "http://127.0.0.1:8080/api/providers/rest", bytes.NewReader(data)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) time.Sleep(200 * time.Millisecond) } reloadsRegexp := regexp.MustCompile(`traefik_config_reloads_total (\d*)\n`) resp, err := http.Get("http://127.0.0.1:8080/metrics") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer resp.Body.Close() body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) fields := reloadsRegexp.FindStringSubmatch(string(body)) - c.Assert(len(fields), checker.Equals, 2) + assert.Len(s.T(), fields, 2) reloads, err := strconv.Atoi(fields[1]) if err != nil { @@ -101,5 +103,5 @@ func (s *ThrottlingSuite) TestThrottleConfReload(c *check.C) { // Therefore the throttling (set at 400ms for this test) should only let // (2s / 400 ms =) 5 config reloads happen in theory. // In addition, we have to take into account the extra config reload from the internal provider (5 + 1). - c.Assert(reloads, checker.LessOrEqualThan, 6) + assert.LessOrEqual(s.T(), reloads, 6) } diff --git a/integration/consul_catalog_test.go b/integration/consul_catalog_test.go index bdefbd4cc..8043d5bab 100644 --- a/integration/consul_catalog_test.go +++ b/integration/consul_catalog_test.go @@ -4,13 +4,14 @@ import ( "fmt" "net" "net/http" - "os" + "testing" "time" - "github.com/go-check/check" "github.com/hashicorp/consul/api" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type ConsulCatalogSuite struct { @@ -20,26 +21,36 @@ type ConsulCatalogSuite struct { consulURL string } -func (s *ConsulCatalogSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "consul_catalog") - s.composeUp(c) +func TestConsulCatalogSuite(t *testing.T) { + suite.Run(t, new(ConsulCatalogSuite)) +} - s.consulURL = "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "consul"), "8500") +func (s *ConsulCatalogSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("consul_catalog") + s.composeUp() + + s.consulURL = "http://" + net.JoinHostPort(s.getComposeServiceIP("consul"), "8500") var err error s.consulClient, err = api.NewClient(&api.Config{ Address: s.consulURL, }) - c.Check(err, check.IsNil) + require.NoError(s.T(), err) // Wait for consul to elect itself leader err = s.waitToElectConsulLeader() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) s.consulAgentClient, err = api.NewClient(&api.Config{ - Address: "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "consul-agent"), "8500"), + Address: "http://" + net.JoinHostPort(s.getComposeServiceIP("consul-agent"), "8500"), }) - c.Check(err, check.IsNil) + require.NoError(s.T(), err) +} + +func (s *ConsulCatalogSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() } func (s *ConsulCatalogSuite) waitToElectConsulLeader() error { @@ -83,36 +94,36 @@ func (s *ConsulCatalogSuite) deregisterService(id string, onAgent bool) error { return client.Agent().ServiceDeregister(id) } -func (s *ConsulCatalogSuite) TestWithNotExposedByDefaultAndDefaultsSettings(c *check.C) { +func (s *ConsulCatalogSuite) TestWithNotExposedByDefaultAndDefaultsSettings() { reg1 := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", Tags: []string{"traefik.enable=true"}, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg1, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) reg2 := &api.AgentServiceRegistration{ ID: "whoami2", Name: "whoami", Tags: []string{"traefik.enable=true"}, Port: 80, - Address: s.getComposeServiceIP(c, "whoami2"), + Address: s.getComposeServiceIP("whoami2"), } err = s.registerService(reg2, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) reg3 := &api.AgentServiceRegistration{ ID: "whoami3", Name: "whoami", Tags: []string{"traefik.enable=true"}, Port: 80, - Address: s.getComposeServiceIP(c, "whoami3"), + Address: s.getComposeServiceIP("whoami3"), } err = s.registerService(reg3, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string @@ -120,23 +131,18 @@ func (s *ConsulCatalogSuite) TestWithNotExposedByDefaultAndDefaultsSettings(c *c ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/default_not_exposed.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/default_not_exposed.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "whoami" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami1", "Hostname: whoami2", "Hostname: whoami3")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.StatusCodeIs(200), @@ -145,18 +151,18 @@ func (s *ConsulCatalogSuite) TestWithNotExposedByDefaultAndDefaultsSettings(c *c fmt.Sprintf(`"http://%s:80":"UP"`, reg2.Address), fmt.Sprintf(`"http://%s:80":"UP"`, reg3.Address), )) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami2", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami3", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestByLabels(c *check.C) { - containerIP := s.getComposeServiceIP(c, "whoami1") +func (s *ConsulCatalogSuite) TestByLabels() { + containerIP := s.getComposeServiceIP("whoami1") reg := &api.AgentServiceRegistration{ ID: "whoami1", @@ -171,7 +177,7 @@ func (s *ConsulCatalogSuite) TestByLabels(c *check.C) { Address: containerIP, } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string @@ -179,23 +185,18 @@ func (s *ConsulCatalogSuite) TestByLabels(c *check.C) { ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/default_not_exposed.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/default_not_exposed.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8000/whoami", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContainsOr("Hostname: whoami1", "Hostname: whoami2", "Hostname: whoami3")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestSimpleConfiguration(c *check.C) { +func (s *ConsulCatalogSuite) TestSimpleConfiguration() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -204,37 +205,32 @@ func (s *ConsulCatalogSuite) TestSimpleConfiguration(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) reg := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", Tags: []string{"traefik.enable=true"}, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "whoami.consul.localhost" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami1")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestSimpleConfigurationWithWatch(c *check.C) { +func (s *ConsulCatalogSuite) TestSimpleConfigurationWithWatch() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -243,39 +239,34 @@ func (s *ConsulCatalogSuite) TestSimpleConfigurationWithWatch(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple_watch.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple_watch.toml", tempObjects) reg := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", Tags: []string{"traefik.enable=true"}, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "whoami.consul.localhost" err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContainsOr("Hostname: whoami1")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoamiIP := s.getComposeServiceIP(c, "whoami1") + whoamiIP := s.getComposeServiceIP("whoami1") reg.Check = &api.AgentServiceCheck{ CheckID: "some-ok-check", TCP: whoamiIP + ":80", @@ -285,10 +276,10 @@ func (s *ConsulCatalogSuite) TestSimpleConfigurationWithWatch(c *check.C) { } err = s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContainsOr("Hostname: whoami1")) - c.Assert(err, checker.IsNil) + err = try.Request(req, 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContainsOr("Hostname: whoami1")) + require.NoError(s.T(), err) reg.Check = &api.AgentServiceCheck{ CheckID: "some-failing-check", @@ -299,16 +290,16 @@ func (s *ConsulCatalogSuite) TestSimpleConfigurationWithWatch(c *check.C) { } err = s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err = try.Request(req, 5*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestRegisterServiceWithoutIP(c *check.C) { +func (s *ConsulCatalogSuite) TestRegisterServiceWithoutIP() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -317,8 +308,7 @@ func (s *ConsulCatalogSuite) TestRegisterServiceWithoutIP(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) reg := &api.AgentServiceRegistration{ ID: "whoami1", @@ -328,25 +318,21 @@ func (s *ConsulCatalogSuite) TestRegisterServiceWithoutIP(c *check.C) { Address: "", } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/api/http/services", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("whoami@consulcatalog", "\"http://127.0.0.1:80\": \"UP\"")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestDefaultConsulService(c *check.C) { +func (s *ConsulCatalogSuite) TestDefaultConsulService() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -355,37 +341,32 @@ func (s *ConsulCatalogSuite) TestDefaultConsulService(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) reg := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "whoami.consul.localhost" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami1")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulServiceWithTCPLabels(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulServiceWithTCPLabels() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -394,8 +375,7 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithTCPLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) // Start a container with some tags reg := &api.AgentServiceRegistration{ @@ -407,32 +387,28 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithTCPLabels(c *check.C) { "traefik.tcp.Services.Super.Loadbalancer.server.port=8080", }, Port: 8080, - Address: s.getComposeServiceIP(c, "whoamitcp"), + Address: s.getComposeServiceIP("whoamitcp"), } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`my.super.host`)")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) who, err := guessWho("127.0.0.1:8000", "my.super.host", true) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - c.Assert(who, checker.Contains, "whoamitcp") + assert.Contains(s.T(), who, "whoamitcp") err = s.deregisterService("whoamitcp", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulServiceWithLabels(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulServiceWithLabels() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -441,8 +417,7 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) // Start a container with some tags reg1 := &api.AgentServiceRegistration{ @@ -452,11 +427,11 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithLabels(c *check.C) { "traefik.http.Routers.Super.Rule=Host(`my.super.host`)", }, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg1, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start another container by replacing a '.' by a '-' reg2 := &api.AgentServiceRegistration{ @@ -466,40 +441,36 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithLabels(c *check.C) { "traefik.http.Routers.SuperHost.Rule=Host(`my-super.host`)", }, Port: 80, - Address: s.getComposeServiceIP(c, "whoami2"), + Address: s.getComposeServiceIP("whoami2"), } err = s.registerService(reg2, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my-super.host" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami1")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami2")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami2", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestSameServiceIDOnDifferentConsulAgent(c *check.C) { +func (s *ConsulCatalogSuite) TestSameServiceIDOnDifferentConsulAgent() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -508,8 +479,7 @@ func (s *ConsulCatalogSuite) TestSameServiceIDOnDifferentConsulAgent(c *check.C) DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/default_not_exposed.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/default_not_exposed.toml", tempObjects) // Start a container with some tags tags := []string{ @@ -523,50 +493,46 @@ func (s *ConsulCatalogSuite) TestSameServiceIDOnDifferentConsulAgent(c *check.C) Name: "whoami", Tags: tags, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg1, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) reg2 := &api.AgentServiceRegistration{ ID: "whoami", Name: "whoami", Tags: tags, Port: 80, - Address: s.getComposeServiceIP(c, "whoami2"), + Address: s.getComposeServiceIP("whoami2"), } err = s.registerService(reg2, true) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami1", "Hostname: whoami2")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/api/rawdata", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 2*time.Second, try.StatusCodeIs(200), - try.BodyContainsOr(s.getComposeServiceIP(c, "whoami1"), s.getComposeServiceIP(c, "whoami2"))) - c.Assert(err, checker.IsNil) + try.BodyContainsOr(s.getComposeServiceIP("whoami1"), s.getComposeServiceIP("whoami2"))) + require.NoError(s.T(), err) err = s.deregisterService("whoami", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami", true) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulServiceWithOneMissingLabels(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulServiceWithOneMissingLabels() { tempObjects := struct { ConsulAddress string DefaultRule string @@ -575,8 +541,7 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithOneMissingLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.consul.localhost`)", } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) // Start a container with some tags reg := &api.AgentServiceRegistration{ @@ -586,32 +551,28 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithOneMissingLabels(c *check.C) { "traefik.random.value=my.super.host", }, Port: 80, - Address: s.getComposeServiceIP(c, "whoami1"), + Address: s.getComposeServiceIP("whoami1"), } err := s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) // TODO validate : run on 80 // Expected a 404 as we did not configure anything err = try.Request(req, 1500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulServiceWithHealthCheck(c *check.C) { - whoamiIP := s.getComposeServiceIP(c, "whoami1") +func (s *ConsulCatalogSuite) TestConsulServiceWithHealthCheck() { + whoamiIP := s.getComposeServiceIP("whoami1") tags := []string{ "traefik.enable=true", "traefik.http.routers.router1.rule=Path(`/whoami`)", @@ -635,7 +596,7 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithHealthCheck(c *check.C) { } err := s.registerService(reg1, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string @@ -643,22 +604,17 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithHealthCheck(c *check.C) { ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/simple.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8000/whoami", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoami2IP := s.getComposeServiceIP(c, "whoami2") + whoami2IP := s.getComposeServiceIP("whoami2") reg2 := &api.AgentServiceRegistration{ ID: "whoami2", Name: "whoami", @@ -675,26 +631,26 @@ func (s *ConsulCatalogSuite) TestConsulServiceWithHealthCheck(c *check.C) { } err = s.registerService(reg2, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "whoami" // TODO Need to wait for up to 10 seconds (for consul discovery or traefik to boot up ?) err = try.Request(req, 10*time.Second, try.StatusCodeIs(200), try.BodyContainsOr("Hostname: whoami2")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami2", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulConnect(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulConnect() { // Wait for consul to fully initialize connect CA err := s.waitForConnectCA() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - connectIP := s.getComposeServiceIP(c, "connect") + connectIP := s.getComposeServiceIP("connect") reg := &api.AgentServiceRegistration{ ID: "uuid-api1", Name: "uuid-api", @@ -712,9 +668,9 @@ func (s *ConsulCatalogSuite) TestConsulConnect(c *check.C) { Address: connectIP, } err = s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoamiIP := s.getComposeServiceIP(c, "whoami1") + whoamiIP := s.getComposeServiceIP("whoami1") regWhoami := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", @@ -727,40 +683,35 @@ func (s *ConsulCatalogSuite) TestConsulConnect(c *check.C) { Address: whoamiIP, } err = s.registerService(regWhoami, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string }{ ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/connect.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/connect.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8000/", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("uuid-api1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulConnect_ByDefault(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulConnect_ByDefault() { // Wait for consul to fully initialize connect CA err := s.waitForConnectCA() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - connectIP := s.getComposeServiceIP(c, "connect") + connectIP := s.getComposeServiceIP("connect") reg := &api.AgentServiceRegistration{ ID: "uuid-api1", Name: "uuid-api", @@ -777,9 +728,9 @@ func (s *ConsulCatalogSuite) TestConsulConnect_ByDefault(c *check.C) { Address: connectIP, } err = s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoamiIP := s.getComposeServiceIP(c, "whoami1") + whoamiIP := s.getComposeServiceIP("whoami1") regWhoami := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami1", @@ -792,9 +743,9 @@ func (s *ConsulCatalogSuite) TestConsulConnect_ByDefault(c *check.C) { Address: whoamiIP, } err = s.registerService(regWhoami, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoami2IP := s.getComposeServiceIP(c, "whoami2") + whoami2IP := s.getComposeServiceIP("whoami2") regWhoami2 := &api.AgentServiceRegistration{ ID: "whoami2", Name: "whoami2", @@ -808,45 +759,40 @@ func (s *ConsulCatalogSuite) TestConsulConnect_ByDefault(c *check.C) { Address: whoami2IP, } err = s.registerService(regWhoami2, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string }{ ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/connect_by_default.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/connect_by_default.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8000/", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 10*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami2", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("uuid-api1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami2", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulCatalogSuite) TestConsulConnect_NotAware(c *check.C) { +func (s *ConsulCatalogSuite) TestConsulConnect_NotAware() { // Wait for consul to fully initialize connect CA err := s.waitForConnectCA() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - connectIP := s.getComposeServiceIP(c, "connect") + connectIP := s.getComposeServiceIP("connect") reg := &api.AgentServiceRegistration{ ID: "uuid-api1", Name: "uuid-api", @@ -864,9 +810,9 @@ func (s *ConsulCatalogSuite) TestConsulConnect_NotAware(c *check.C) { Address: connectIP, } err = s.registerService(reg, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - whoamiIP := s.getComposeServiceIP(c, "whoami1") + whoamiIP := s.getComposeServiceIP("whoami1") regWhoami := &api.AgentServiceRegistration{ ID: "whoami1", Name: "whoami", @@ -879,30 +825,25 @@ func (s *ConsulCatalogSuite) TestConsulConnect_NotAware(c *check.C) { Address: whoamiIP, } err = s.registerService(regWhoami, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tempObjects := struct { ConsulAddress string }{ ConsulAddress: s.consulURL, } - file := s.adaptFile(c, "fixtures/consul_catalog/connect_not_aware.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul_catalog/connect_not_aware.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8000/", 10*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 10*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("uuid-api1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = s.deregisterService("whoami1", false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/consul_test.go b/integration/consul_test.go index b1028d2bb..176ab7587 100644 --- a/integration/consul_test.go +++ b/integration/consul_test.go @@ -10,16 +10,17 @@ import ( "net/http" "os" "path/filepath" + "testing" "time" - "github.com/go-check/check" "github.com/kvtools/consul" "github.com/kvtools/valkeyrie" "github.com/kvtools/valkeyrie/store" "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" - checker "github.com/vdemeester/shakers" ) // Consul test suites. @@ -29,18 +30,16 @@ type ConsulSuite struct { consulURL string } -func (s *ConsulSuite) resetStore(c *check.C) { - err := s.kvClient.DeleteTree(context.Background(), "traefik") - if err != nil && !errors.Is(err, store.ErrKeyNotFound) { - c.Fatal(err) - } +func TestConsulSuite(t *testing.T) { + suite.Run(t, new(ConsulSuite)) } -func (s *ConsulSuite) setupStore(c *check.C) { - s.createComposeProject(c, "consul") - s.composeUp(c) +func (s *ConsulSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("consul") + s.composeUp() - consulAddr := net.JoinHostPort(s.getComposeServiceIP(c, "consul"), "8500") + consulAddr := net.JoinHostPort(s.getComposeServiceIP("consul"), "8500") s.consulURL = fmt.Sprintf("http://%s", consulAddr) kv, err := valkeyrie.NewStore( @@ -51,21 +50,27 @@ func (s *ConsulSuite) setupStore(c *check.C) { ConnectionTimeout: 10 * time.Second, }, ) - if err != nil { - c.Fatal("Cannot create store consul") - } + require.NoError(s.T(), err, "Cannot create store consul") s.kvClient = kv // wait for consul err = try.Do(60*time.Second, try.KVExists(kv, "test")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { - s.setupStore(c) +func (s *ConsulSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} - file := s.adaptFile(c, "fixtures/consul/simple.toml", struct{ ConsulAddress string }{s.consulURL}) - defer os.Remove(file) +func (s *ConsulSuite) TearDownTest() { + err := s.kvClient.DeleteTree(context.Background(), "traefik") + if err != nil && !errors.Is(err, store.ErrKeyNotFound) { + require.ErrorIs(s.T(), err, store.ErrKeyNotFound) + } +} + +func (s *ConsulSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/consul/simple.toml", struct{ ConsulAddress string }{s.consulURL}) data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", @@ -115,39 +120,35 @@ func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { for k, v := range data { err := s.kvClient.Put(context.Background(), k, []byte(v), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains(`"striper@consul":`, `"compressor@consul":`, `"srvcA@consul":`, `"srvcB@consul":`), ) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var obtained api.RunTimeRepresentation err = json.NewDecoder(resp.Body).Decode(&obtained) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) got, err := json.MarshalIndent(obtained, "", " ") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) expectedJSON := filepath.FromSlash("testdata/rawdata-consul.json") if *updateExpected { err = os.WriteFile(expectedJSON, got, 0o666) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } expected, err := os.ReadFile(expectedJSON) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if !bytes.Equal(expected, got) { diff := difflib.UnifiedDiff{ @@ -159,33 +160,27 @@ func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) { } text, err := difflib.GetUnifiedDiffString(diff) - c.Assert(err, checker.IsNil) - c.Error(text) + require.NoError(s.T(), err, text) } } -func (s *ConsulSuite) assertWhoami(c *check.C, host string, expectedStatusCode int) { +func (s *ConsulSuite) assertWhoami(host string, expectedStatusCode int) { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - if err != nil { - c.Fatal(err) - } + require.NoError(s.T(), err) req.Host = host resp, err := try.ResponseUntilStatusCode(req, 15*time.Second, expectedStatusCode) + require.NoError(s.T(), err) resp.Body.Close() - c.Assert(err, checker.IsNil) } -func (s *ConsulSuite) TestDeleteRootKey(c *check.C) { +func (s *ConsulSuite) TestDeleteRootKey() { // This test case reproduce the issue: https://github.com/traefik/traefik/issues/8092 - s.setupStore(c) - s.resetStore(c) - file := s.adaptFile(c, "fixtures/consul/simple.toml", struct{ ConsulAddress string }{s.consulURL}) - defer os.Remove(file) + file := s.adaptFile("fixtures/consul/simple.toml", struct{ ConsulAddress string }{s.consulURL}) ctx := context.Background() - svcaddr := net.JoinHostPort(s.getComposeServiceIP(c, "whoami"), "80") + svcaddr := net.JoinHostPort(s.getComposeServiceIP("whoami"), "80") data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", @@ -202,32 +197,28 @@ func (s *ConsulSuite) TestDeleteRootKey(c *check.C) { for k, v := range data { err := s.kvClient.Put(ctx, k, []byte(v), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains(`"Router0@consul":`, `"Router1@consul":`, `"simplesvc0@consul":`, `"simplesvc1@consul":`), ) - c.Assert(err, checker.IsNil) - s.assertWhoami(c, "kv1.localhost", http.StatusOK) - s.assertWhoami(c, "kv2.localhost", http.StatusOK) + require.NoError(s.T(), err) + s.assertWhoami("kv1.localhost", http.StatusOK) + s.assertWhoami("kv2.localhost", http.StatusOK) // delete router1 err = s.kvClient.DeleteTree(ctx, "traefik/http/routers/Router1") - c.Assert(err, checker.IsNil) - s.assertWhoami(c, "kv1.localhost", http.StatusOK) - s.assertWhoami(c, "kv2.localhost", http.StatusNotFound) + require.NoError(s.T(), err) + s.assertWhoami("kv1.localhost", http.StatusOK) + s.assertWhoami("kv2.localhost", http.StatusNotFound) // delete simple services and router0 err = s.kvClient.DeleteTree(ctx, "traefik") - c.Assert(err, checker.IsNil) - s.assertWhoami(c, "kv1.localhost", http.StatusNotFound) - s.assertWhoami(c, "kv2.localhost", http.StatusNotFound) + require.NoError(s.T(), err) + s.assertWhoami("kv1.localhost", http.StatusNotFound) + s.assertWhoami("kv2.localhost", http.StatusNotFound) } diff --git a/integration/docker_compose_test.go b/integration/docker_compose_test.go index e4e4c5244..563cf7eca 100644 --- a/integration/docker_compose_test.go +++ b/integration/docker_compose_test.go @@ -3,15 +3,16 @@ package integration import ( "encoding/json" "net/http" - "os" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" "github.com/traefik/traefik/v2/pkg/testhelpers" - checker "github.com/vdemeester/shakers" ) // Docker tests suite. @@ -19,12 +20,21 @@ type DockerComposeSuite struct { BaseSuite } -func (s *DockerComposeSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "minimal") - s.composeUp(c) +func TestDockerComposeSuite(t *testing.T) { + suite.Run(t, new(DockerComposeSuite)) } -func (s *DockerComposeSuite) TestComposeScale(c *check.C) { +func (s *DockerComposeSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("minimal") + s.composeUp() +} + +func (s *DockerComposeSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *DockerComposeSuite) TestComposeScale() { tempObjects := struct { DockerHost string DefaultRule string @@ -32,45 +42,36 @@ func (s *DockerComposeSuite) TestComposeScale(c *check.C) { DockerHost: s.getDockerHost(), DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/minimal.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/minimal.toml", tempObjects) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req := testhelpers.MustNewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) req.Host = "my.super.host" - _, err = try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) - c.Assert(err, checker.IsNil) + _, err := try.ResponseUntilStatusCode(req, 5*time.Second, http.StatusOK) + require.NoError(s.T(), err) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer resp.Body.Close() var rtconf api.RunTimeRepresentation err = json.NewDecoder(resp.Body).Decode(&rtconf) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // check that we have only three routers (the one from this test + 2 unrelated internal ones) - c.Assert(rtconf.Routers, checker.HasLen, 3) + assert.Len(s.T(), rtconf.Routers, 3) // check that we have only one service (not counting the internal ones) with n servers services := rtconf.Services - c.Assert(services, checker.HasLen, 4) + assert.Len(s.T(), services, 4) for name, service := range services { if strings.HasSuffix(name, "@internal") { continue } - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - c.Assert(name, checker.Equals, "whoami1-"+composeProject.Name+"@docker") - c.Assert(service.LoadBalancer.Servers, checker.HasLen, 2) + assert.Equal(s.T(), "service-mini@docker", name) + assert.Len(s.T(), service.LoadBalancer.Servers, 2) // We could break here, but we don't just to keep us honest. } } diff --git a/integration/docker_test.go b/integration/docker_test.go index d0124848f..f9060ec71 100644 --- a/integration/docker_test.go +++ b/integration/docker_test.go @@ -2,15 +2,15 @@ package integration import ( "encoding/json" - "fmt" "io" "net/http" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // Docker tests suite. @@ -18,15 +18,24 @@ type DockerSuite struct { BaseSuite } -func (s *DockerSuite) SetUpTest(c *check.C) { - s.createComposeProject(c, "docker") +func TestDockerSuite(t *testing.T) { + suite.Run(t, new(DockerSuite)) } -func (s *DockerSuite) TearDownTest(c *check.C) { - s.composeDown(c) +func (s *DockerSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("docker") } -func (s *DockerSuite) TestSimpleConfiguration(c *check.C) { +func (s *DockerSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *DockerSuite) TearDownTest() { + s.composeStop("simple", "withtcplabels", "withlabels1", "withlabels2", "withonelabelmissing", "powpow") +} + +func (s *DockerSuite) TestSimpleConfiguration() { tempObjects := struct { DockerHost string DefaultRule string @@ -35,24 +44,18 @@ func (s *DockerSuite) TestSimpleConfiguration(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c) + s.composeUp() - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) } -func (s *DockerSuite) TestDefaultDockerContainers(c *check.C) { +func (s *DockerSuite) TestDefaultDockerContainers() { tempObjects := struct { DockerHost string DefaultRule string @@ -61,41 +64,30 @@ func (s *DockerSuite) TestDefaultDockerContainers(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c, "simple") + s.composeUp("simple") // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) + req.Host = "simple.docker.localhost" - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - req.Host = fmt.Sprintf("simple-%s.docker.localhost", composeProject.Name) - - // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) - resp, err := try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) - c.Assert(err, checker.IsNil) + resp, err := try.ResponseUntilStatusCode(req, 3*time.Second, http.StatusOK) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var version map[string]interface{} - c.Assert(json.Unmarshal(body, &version), checker.IsNil) - c.Assert(version["Version"], checker.Equals, "swarm/1.0.0") + assert.NoError(s.T(), json.Unmarshal(body, &version)) + assert.Equal(s.T(), "swarm/1.0.0", version["Version"]) } -func (s *DockerSuite) TestDockerContainersWithTCPLabels(c *check.C) { +func (s *DockerSuite) TestDockerContainersWithTCPLabels() { tempObjects := struct { DockerHost string DefaultRule string @@ -104,29 +96,23 @@ func (s *DockerSuite) TestDockerContainersWithTCPLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c, "withtcplabels") + s.composeUp("withtcplabels") // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`my.super.host`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`my.super.host`)")) + require.NoError(s.T(), err) who, err := guessWho("127.0.0.1:8000", "my.super.host", true) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - c.Assert(who, checker.Contains, "my.super.host") + assert.Contains(s.T(), who, "my.super.host") } -func (s *DockerSuite) TestDockerContainersWithLabels(c *check.C) { +func (s *DockerSuite) TestDockerContainersWithLabels() { tempObjects := struct { DockerHost string DefaultRule string @@ -135,44 +121,37 @@ func (s *DockerSuite) TestDockerContainersWithLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c, "withlabels1", "withlabels2") + s.composeUp("withlabels1", "withlabels2") // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my-super.host" - // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) - _, err = try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) - c.Assert(err, checker.IsNil) + _, err = try.ResponseUntilStatusCode(req, 3*time.Second, http.StatusOK) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" - // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) - resp, err := try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) - c.Assert(err, checker.IsNil) + resp, err := try.ResponseUntilStatusCode(req, 3*time.Second, http.StatusOK) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var version map[string]interface{} - c.Assert(json.Unmarshal(body, &version), checker.IsNil) - c.Assert(version["Version"], checker.Equals, "swarm/1.0.0") + assert.NoError(s.T(), json.Unmarshal(body, &version)) + assert.Equal(s.T(), "swarm/1.0.0", version["Version"]) } -func (s *DockerSuite) TestDockerContainersWithOneMissingLabels(c *check.C) { +func (s *DockerSuite) TestDockerContainersWithOneMissingLabels() { tempObjects := struct { DockerHost string DefaultRule string @@ -181,31 +160,23 @@ func (s *DockerSuite) TestDockerContainersWithOneMissingLabels(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c, "withonelabelmissing") + s.composeUp("withonelabelmissing") // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" - // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) - // TODO validate : run on 80 // Expected a 404 as we did not configure anything - err = try.Request(req, 1500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err = try.Request(req, 3*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) } -func (s *DockerSuite) TestRestartDockerContainers(c *check.C) { +func (s *DockerSuite) TestRestartDockerContainers() { tempObjects := struct { DockerHost string DefaultRule string @@ -214,46 +185,40 @@ func (s *DockerSuite) TestRestartDockerContainers(c *check.C) { DefaultRule: "Host(`{{ normalize .Name }}.docker.localhost`)", } - file := s.adaptFile(c, "fixtures/docker/simple.toml", tempObjects) - defer os.Remove(file) + file := s.adaptFile("fixtures/docker/simple.toml", tempObjects) - s.composeUp(c, "powpow") + s.composeUp("powpow") // Start traefik - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/version", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "my.super.host" // TODO Need to wait than 500 milliseconds more (for swarm or traefik to boot up ?) resp, err := try.ResponseUntilStatusCode(req, 1500*time.Millisecond, http.StatusOK) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var version map[string]interface{} - c.Assert(json.Unmarshal(body, &version), checker.IsNil) - c.Assert(version["Version"], checker.Equals, "swarm/1.0.0") + assert.NoError(s.T(), json.Unmarshal(body, &version)) + assert.Equal(s.T(), "swarm/1.0.0", version["Version"]) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("powpow")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - s.composeStop(c, "powpow") + s.composeStop("powpow") time.Sleep(5 * time.Second) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("powpow")) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) - s.composeUp(c, "powpow") + s.composeUp("powpow") err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("powpow")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/error_pages_test.go b/integration/error_pages_test.go index a9bd1c7a1..acc31fec2 100644 --- a/integration/error_pages_test.go +++ b/integration/error_pages_test.go @@ -3,12 +3,12 @@ package integration import ( "net/http" "net/http/httptest" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // ErrorPagesSuite test suites. @@ -18,83 +18,78 @@ type ErrorPagesSuite struct { BackendIP string } -func (s *ErrorPagesSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "error_pages") - s.composeUp(c) - - s.ErrorPageIP = s.getComposeServiceIP(c, "nginx2") - s.BackendIP = s.getComposeServiceIP(c, "nginx1") +func TestErrorPagesSuite(t *testing.T) { + suite.Run(t, new(ErrorPagesSuite)) } -func (s *ErrorPagesSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/error_pages/simple.toml", struct { +func (s *ErrorPagesSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("error_pages") + s.composeUp() + + s.ErrorPageIP = s.getComposeServiceIP("nginx2") + s.BackendIP = s.getComposeServiceIP("nginx1") +} + +func (s *ErrorPagesSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *ErrorPagesSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/error_pages/simple.toml", struct { Server1 string Server2 string }{"http://" + s.BackendIP + ":80", s.ErrorPageIP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) frontendReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendReq.Host = "test.local" err = try.Request(frontendReq, 2*time.Second, try.BodyContains("nginx")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ErrorPagesSuite) TestErrorPage(c *check.C) { +func (s *ErrorPagesSuite) TestErrorPage() { // error.toml contains a mis-configuration of the backend host - file := s.adaptFile(c, "fixtures/error_pages/error.toml", struct { + file := s.adaptFile("fixtures/error_pages/error.toml", struct { Server1 string Server2 string }{s.BackendIP, s.ErrorPageIP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) frontendReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendReq.Host = "test.local" err = try.Request(frontendReq, 2*time.Second, try.BodyContains("An error occurred.")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ErrorPagesSuite) TestErrorPageFlush(c *check.C) { +func (s *ErrorPagesSuite) TestErrorPageFlush() { srv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { rw.Header().Add("Transfer-Encoding", "chunked") rw.WriteHeader(http.StatusInternalServerError) _, _ = rw.Write([]byte("KO")) })) - file := s.adaptFile(c, "fixtures/error_pages/simple.toml", struct { + file := s.adaptFile("fixtures/error_pages/simple.toml", struct { Server1 string Server2 string }{srv.URL, s.ErrorPageIP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) frontendReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendReq.Host = "test.local" err = try.Request(frontendReq, 2*time.Second, try.BodyContains("An error occurred."), try.HasHeaderValue("Content-Type", "text/html", true), ) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/etcd_test.go b/integration/etcd_test.go index 71d8a8fa2..0f1ca5d1a 100644 --- a/integration/etcd_test.go +++ b/integration/etcd_test.go @@ -8,16 +8,17 @@ import ( "net/http" "os" "path/filepath" + "testing" "time" - "github.com/go-check/check" "github.com/kvtools/etcdv3" "github.com/kvtools/valkeyrie" "github.com/kvtools/valkeyrie/store" "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" - checker "github.com/vdemeester/shakers" ) // etcd test suites. @@ -27,12 +28,18 @@ type EtcdSuite struct { etcdAddr string } -func (s *EtcdSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "etcd") - s.composeUp(c) +func TestEtcdSuite(t *testing.T) { + suite.Run(t, new(EtcdSuite)) +} + +func (s *EtcdSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("etcd") + s.composeUp() var err error - s.etcdAddr = net.JoinHostPort(s.getComposeServiceIP(c, "etcd"), "2379") + s.etcdAddr = net.JoinHostPort(s.getComposeServiceIP("etcd"), "2379") s.kvClient, err = valkeyrie.NewStore( context.Background(), etcdv3.StoreName, @@ -41,18 +48,19 @@ func (s *EtcdSuite) SetUpSuite(c *check.C) { ConnectionTimeout: 10 * time.Second, }, ) - if err != nil { - c.Fatal("Cannot create store etcd") - } + require.NoError(s.T(), err) // wait for etcd err = try.Do(60*time.Second, try.KVExists(s.kvClient, "test")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/etcd/simple.toml", struct{ EtcdAddress string }{s.etcdAddr}) - defer os.Remove(file) +func (s *EtcdSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *EtcdSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/etcd/simple.toml", struct{ EtcdAddress string }{s.etcdAddr}) data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", @@ -102,39 +110,35 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { for k, v := range data { err := s.kvClient.Put(context.Background(), k, []byte(v), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains(`"striper@etcd":`, `"compressor@etcd":`, `"srvcA@etcd":`, `"srvcB@etcd":`), ) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var obtained api.RunTimeRepresentation err = json.NewDecoder(resp.Body).Decode(&obtained) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) got, err := json.MarshalIndent(obtained, "", " ") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) expectedJSON := filepath.FromSlash("testdata/rawdata-etcd.json") if *updateExpected { err = os.WriteFile(expectedJSON, got, 0o666) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } expected, err := os.ReadFile(expectedJSON) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if !bytes.Equal(expected, got) { diff := difflib.UnifiedDiff{ @@ -146,7 +150,6 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) { } text, err := difflib.GetUnifiedDiffString(diff) - c.Assert(err, checker.IsNil) - c.Error(text) + require.NoError(s.T(), err, text) } } diff --git a/integration/file_test.go b/integration/file_test.go index 5537638c2..c18f6e625 100644 --- a/integration/file_test.go +++ b/integration/file_test.go @@ -2,61 +2,58 @@ package integration import ( "net/http" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // File tests suite. type FileSuite struct{ BaseSuite } -func (s *FileSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "file") - s.composeUp(c) +func TestFileSuite(t *testing.T) { + suite.Run(t, new(FileSuite)) } -func (s *FileSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/file/simple.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *FileSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("file") + s.composeUp() +} + +func (s *FileSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *FileSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/file/simple.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) } // #56 regression test, make sure it does not fail? -func (s *FileSuite) TestSimpleConfigurationNoPanic(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/file/56-simple-panic.toml")) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *FileSuite) TestSimpleConfigurationNoPanic() { + s.traefikCmd(withConfigFile("fixtures/file/56-simple-panic.toml")) // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) } -func (s *FileSuite) TestDirectoryConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/file/directory.toml")) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *FileSuite) TestDirectoryConfiguration() { + s.traefikCmd(withConfigFile("fixtures/file/directory.toml")) // Expected a 404 as we did not configure anything at /test - err = try.GetRequest("http://127.0.0.1:8000/test", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/test", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Expected a 502 as there is no backend server err = try.GetRequest("http://127.0.0.1:8000/test2", 1000*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/fixtures/proxy-protocol/with.toml b/integration/fixtures/proxy-protocol/proxy-protocol.toml similarity index 69% rename from integration/fixtures/proxy-protocol/with.toml rename to integration/fixtures/proxy-protocol/proxy-protocol.toml index c47e97dc5..30fa87004 100644 --- a/integration/fixtures/proxy-protocol/with.toml +++ b/integration/fixtures/proxy-protocol/proxy-protocol.toml @@ -6,10 +6,14 @@ level = "DEBUG" [entryPoints] - [entryPoints.web] + [entryPoints.trust] address = ":8000" - [entryPoints.web.proxyProtocol] - trustedIPs = ["{{.HaproxyIP}}"] + [entryPoints.trust.proxyProtocol] + trustedIPs = ["127.0.0.1"] + [entryPoints.nottrust] + address = ":9000" + [entryPoints.nottrust.proxyProtocol] + trustedIPs = ["1.2.3.4"] [api] insecure = true diff --git a/integration/fixtures/proxy-protocol/without.toml b/integration/fixtures/proxy-protocol/without.toml deleted file mode 100644 index 71b982486..000000000 --- a/integration/fixtures/proxy-protocol/without.toml +++ /dev/null @@ -1,32 +0,0 @@ -[global] - checkNewVersion = false - sendAnonymousUsage = false - -[log] - level = "DEBUG" - -[entryPoints] - [entryPoints.web] - address = ":8000" - [entryPoints.web.proxyProtocol] - trustedIPs = ["1.2.3.4"] - -[api] - insecure = true - -[providers.file] - filename = "{{ .SelfFilename }}" - -## dynamic configuration ## - -[http.routers] - [http.routers.router1] - service = "service1" - rule = "Path(`/whoami`)" - -[http.services] - [http.services.service1] - [http.services.service1.loadBalancer] - - [[http.services.service1.loadBalancer.servers]] - url = "http://{{.WhoamiIP}}" diff --git a/integration/grpc_test.go b/integration/grpc_test.go index 6493d1f04..0e493fd7e 100644 --- a/integration/grpc_test.go +++ b/integration/grpc_test.go @@ -8,9 +8,11 @@ import ( "math/rand" "net" "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/helloworld" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/log" @@ -29,16 +31,20 @@ const randCharset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567 // GRPCSuite tests suite. type GRPCSuite struct{ BaseSuite } +func TestGRPCSuite(t *testing.T) { + suite.Run(t, new(GRPCSuite)) +} + type myserver struct { stopStreamExample chan bool } -func (s *GRPCSuite) SetUpSuite(c *check.C) { +func (s *GRPCSuite) SetupSuite() { var err error LocalhostCert, err = os.ReadFile("./resources/tls/local.cert") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) LocalhostKey, err = os.ReadFile("./resources/tls/local.key") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) } func (s *myserver) SayHello(ctx context.Context, in *helloworld.HelloRequest) (*helloworld.HelloReply, error) { @@ -137,19 +143,18 @@ func callStreamExampleClientGRPC() (helloworld.Greeter_StreamExampleClient, func return t, closer, nil } -func (s *GRPCSuite) TestGRPC(c *check.C) { +func (s *GRPCSuite) TestGRPC() { lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := startGRPCServer(lis, &myserver{}) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config.toml", struct { + file := s.adaptFile("fixtures/grpc/config.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -159,79 +164,65 @@ func (s *GRPCSuite) TestGRPC(c *check.C) { GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var response string err = try.Do(1*time.Second, func() error { response, err = callHelloClientGRPC("World", true) return err }) - c.Assert(err, check.IsNil) - c.Assert(response, check.Equals, "Hello World") + assert.NoError(s.T(), err) + assert.Equal(s.T(), "Hello World", response) } -func (s *GRPCSuite) TestGRPCh2c(c *check.C) { +func (s *GRPCSuite) TestGRPCh2c() { lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := starth2cGRPCServer(lis, &myserver{}) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config_h2c.toml", struct { + file := s.adaptFile("fixtures/grpc/config_h2c.toml", struct { GRPCServerPort string }{ GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var response string err = try.Do(1*time.Second, func() error { response, err = callHelloClientGRPC("World", false) return err }) - c.Assert(err, check.IsNil) - c.Assert(response, check.Equals, "Hello World") + assert.NoError(s.T(), err) + assert.Equal(s.T(), "Hello World", response) } -func (s *GRPCSuite) TestGRPCh2cTermination(c *check.C) { +func (s *GRPCSuite) TestGRPCh2cTermination() { lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := starth2cGRPCServer(lis, &myserver{}) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config_h2c_termination.toml", struct { + file := s.adaptFile("fixtures/grpc/config_h2c_termination.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -241,40 +232,33 @@ func (s *GRPCSuite) TestGRPCh2cTermination(c *check.C) { GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var response string err = try.Do(1*time.Second, func() error { response, err = callHelloClientGRPC("World", true) return err }) - c.Assert(err, check.IsNil) - c.Assert(response, check.Equals, "Hello World") + assert.NoError(s.T(), err) + assert.Equal(s.T(), "Hello World", response) } -func (s *GRPCSuite) TestGRPCInsecure(c *check.C) { +func (s *GRPCSuite) TestGRPCInsecure() { lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := startGRPCServer(lis, &myserver{}) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config_insecure.toml", struct { + file := s.adaptFile("fixtures/grpc/config_insecure.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -284,44 +268,37 @@ func (s *GRPCSuite) TestGRPCInsecure(c *check.C) { GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var response string err = try.Do(1*time.Second, func() error { response, err = callHelloClientGRPC("World", true) return err }) - c.Assert(err, check.IsNil) - c.Assert(response, check.Equals, "Hello World") + assert.NoError(s.T(), err) + assert.Equal(s.T(), "Hello World", response) } -func (s *GRPCSuite) TestGRPCBuffer(c *check.C) { +func (s *GRPCSuite) TestGRPCBuffer() { stopStreamExample := make(chan bool) defer func() { stopStreamExample <- true }() lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := startGRPCServer(lis, &myserver{ stopStreamExample: stopStreamExample, }) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config.toml", struct { + file := s.adaptFile("fixtures/grpc/config.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -331,27 +308,21 @@ func (s *GRPCSuite) TestGRPCBuffer(c *check.C) { GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var client helloworld.Greeter_StreamExampleClient client, closer, err := callStreamExampleClientGRPC() defer func() { _ = closer() }() - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) received := make(chan bool) go func() { tr, err := client.Recv() - c.Assert(err, check.IsNil) - c.Assert(len(tr.GetData()), check.Equals, 512) + assert.NoError(s.T(), err) + assert.Len(s.T(), tr.GetData(), 512) received <- true }() @@ -363,25 +334,24 @@ func (s *GRPCSuite) TestGRPCBuffer(c *check.C) { return errors.New("failed to receive stream data") } }) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) } -func (s *GRPCSuite) TestGRPCBufferWithFlushInterval(c *check.C) { +func (s *GRPCSuite) TestGRPCBufferWithFlushInterval() { stopStreamExample := make(chan bool) lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := startGRPCServer(lis, &myserver{ stopStreamExample: stopStreamExample, }) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config.toml", struct { + file := s.adaptFile("fixtures/grpc/config.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -390,17 +360,11 @@ func (s *GRPCSuite) TestGRPCBufferWithFlushInterval(c *check.C) { KeyContent: string(LocalhostKey), GRPCServerPort: port, }) - defer os.Remove(file) - - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var client helloworld.Greeter_StreamExampleClient client, closer, err := callStreamExampleClientGRPC() @@ -408,13 +372,13 @@ func (s *GRPCSuite) TestGRPCBufferWithFlushInterval(c *check.C) { _ = closer() stopStreamExample <- true }() - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) received := make(chan bool) go func() { tr, err := client.Recv() - c.Assert(err, check.IsNil) - c.Assert(len(tr.GetData()), check.Equals, 512) + assert.NoError(s.T(), err) + assert.Len(s.T(), tr.GetData(), 512) received <- true }() @@ -426,22 +390,21 @@ func (s *GRPCSuite) TestGRPCBufferWithFlushInterval(c *check.C) { return errors.New("failed to receive stream data") } }) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) } -func (s *GRPCSuite) TestGRPCWithRetry(c *check.C) { +func (s *GRPCSuite) TestGRPCWithRetry() { lis, err := net.Listen("tcp", ":0") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) _, port, err := net.SplitHostPort(lis.Addr().String()) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) go func() { err := startGRPCServer(lis, &myserver{}) - c.Log(err) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) }() - file := s.adaptFile(c, "fixtures/grpc/config_retry.toml", struct { + file := s.adaptFile("fixtures/grpc/config_retry.toml", struct { CertContent string KeyContent string GRPCServerPort string @@ -451,23 +414,17 @@ func (s *GRPCSuite) TestGRPCWithRetry(c *check.C) { GRPCServerPort: port, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err = cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`127.0.0.1`)")) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) var response string err = try.Do(1*time.Second, func() error { response, err = callHelloClientGRPC("World", true) return err }) - c.Assert(err, check.IsNil) - c.Assert(response, check.Equals, "Hello World") + assert.NoError(s.T(), err) + assert.Equal(s.T(), "Hello World", response) } diff --git a/integration/headers_test.go b/integration/headers_test.go index 049783d85..68522cc47 100644 --- a/integration/headers_test.go +++ b/integration/headers_test.go @@ -4,50 +4,45 @@ import ( "net" "net/http" "net/http/httptest" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // Headers tests suite. type HeadersSuite struct{ BaseSuite } -func (s *HeadersSuite) TestSimpleConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/headers/basic.toml")) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) +func TestHeadersSuite(t *testing.T) { + suite.Run(t, new(HeadersSuite)) } -func (s *HeadersSuite) TestReverseProxyHeaderRemoved(c *check.C) { - file := s.adaptFile(c, "fixtures/headers/remove_reverseproxy_headers.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) +func (s *HeadersSuite) TestSimpleConfiguration() { + s.traefikCmd(withConfigFile("fixtures/headers/basic.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + // Expected a 404 as we did not configure anything + err := try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) +} + +func (s *HeadersSuite) TestReverseProxyHeaderRemoved() { + file := s.adaptFile("fixtures/headers/remove_reverseproxy_headers.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { _, found := r.Header["X-Forwarded-Host"] - c.Assert(found, checker.True) + assert.True(s.T(), found) _, found = r.Header["Foo"] - c.Assert(found, checker.False) + assert.False(s.T(), found) _, found = r.Header["X-Forwarded-For"] - c.Assert(found, checker.False) + assert.False(s.T(), found) }) listener, err := net.Listen("tcp", "127.0.0.1:9000") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) ts := &httptest.Server{ Listener: listener, @@ -57,31 +52,25 @@ func (s *HeadersSuite) TestReverseProxyHeaderRemoved(c *check.C) { defer ts.Close() req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "test.localhost" req.Header = http.Header{ "Foo": {"bar"}, } err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *HeadersSuite) TestCorsResponses(c *check.C) { - file := s.adaptFile(c, "fixtures/headers/cors.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HeadersSuite) TestCorsResponses() { + file := s.adaptFile("fixtures/headers/cors.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) backend := startTestServer("9000", http.StatusOK, "") defer backend.Close() - err = try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) testCase := []struct { desc string @@ -147,30 +136,24 @@ func (s *HeadersSuite) TestCorsResponses(c *check.C) { for _, test := range testCase { req, err := http.NewRequest(test.method, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.reqHost req.Header = test.requestHeaders err = try.Request(req, 500*time.Millisecond, try.HasHeaderStruct(test.expected)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } -func (s *HeadersSuite) TestSecureHeadersResponses(c *check.C) { - file := s.adaptFile(c, "fixtures/headers/secure.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HeadersSuite) TestSecureHeadersResponses() { + file := s.adaptFile("fixtures/headers/secure.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) backend := startTestServer("9000", http.StatusOK, "") defer backend.Close() - err = try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) testCase := []struct { desc string @@ -190,36 +173,30 @@ func (s *HeadersSuite) TestSecureHeadersResponses(c *check.C) { for _, test := range testCase { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.reqHost err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasHeaderStruct(test.expected)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/api/rawdata", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.internalReqHost err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasHeaderStruct(test.expected)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } -func (s *HeadersSuite) TestMultipleSecureHeadersResponses(c *check.C) { - file := s.adaptFile(c, "fixtures/headers/secure_multiple.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HeadersSuite) TestMultipleSecureHeadersResponses() { + file := s.adaptFile("fixtures/headers/secure_multiple.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) backend := startTestServer("9000", http.StatusOK, "") defer backend.Close() - err = try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest(backend.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) testCase := []struct { desc string @@ -238,10 +215,10 @@ func (s *HeadersSuite) TestMultipleSecureHeadersResponses(c *check.C) { for _, test := range testCase { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.reqHost err = try.Request(req, 500*time.Millisecond, try.HasHeaderStruct(test.expected)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } diff --git a/integration/healthcheck_test.go b/integration/healthcheck_test.go index c6ab99809..4e6279c97 100644 --- a/integration/healthcheck_test.go +++ b/integration/healthcheck_test.go @@ -7,11 +7,13 @@ import ( "net/http" "os" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // HealthCheck test suites. @@ -23,287 +25,272 @@ type HealthCheckSuite struct { whoami4IP string } -func (s *HealthCheckSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "healthcheck") - s.composeUp(c) - - s.whoami1IP = s.getComposeServiceIP(c, "whoami1") - s.whoami2IP = s.getComposeServiceIP(c, "whoami2") - s.whoami3IP = s.getComposeServiceIP(c, "whoami3") - s.whoami4IP = s.getComposeServiceIP(c, "whoami4") +func TestHealthCheckSuite(t *testing.T) { + suite.Run(t, new(HealthCheckSuite)) } -func (s *HealthCheckSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/healthcheck/simple.toml", struct { +func (s *HealthCheckSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("healthcheck") + s.composeUp() + + s.whoami1IP = s.getComposeServiceIP("whoami1") + s.whoami2IP = s.getComposeServiceIP("whoami2") + s.whoami3IP = s.getComposeServiceIP("whoami3") + s.whoami4IP = s.getComposeServiceIP("whoami4") +} + +func (s *HealthCheckSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *HealthCheckSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/healthcheck/simple.toml", struct { Server1 string Server2 string }{s.whoami1IP, s.whoami2IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) + require.NoError(s.T(), err) frontendHealthReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendHealthReq.Host = "test.localhost" err = try.Request(frontendHealthReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Fix all whoami health to 500 client := &http.Client{} whoamiHosts := []string{s.whoami1IP, s.whoami2IP} for _, whoami := range whoamiHosts { statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+whoami+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // Verify no backend service is available due to failing health checks err = try.Request(frontendHealthReq, 3*time.Second, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Change one whoami health to 200 statusOKReq1, err := http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusOKReq1) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify frontend health : after err = try.Request(frontendHealthReq, 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendReq.Host = "test.localhost" // Check if whoami1 responds err = try.Request(frontendReq, 500*time.Millisecond, try.BodyContains(s.whoami1IP)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Check if the service with bad health check (whoami2) never respond. err = try.Request(frontendReq, 2*time.Second, try.BodyContains(s.whoami2IP)) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) // TODO validate : run on 80 resp, err := http.Get("http://127.0.0.1:8000/") // Expected a 404 as we did not configure anything - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusNotFound) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusNotFound, resp.StatusCode) } -func (s *HealthCheckSuite) TestMultipleEntrypoints(c *check.C) { - file := s.adaptFile(c, "fixtures/healthcheck/multiple-entrypoints.toml", struct { +func (s *HealthCheckSuite) TestMultipleEntrypoints() { + file := s.adaptFile("fixtures/healthcheck/multiple-entrypoints.toml", struct { Server1 string Server2 string }{s.whoami1IP, s.whoami2IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Wait for traefik - err = try.GetRequest("http://localhost:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) + require.NoError(s.T(), err) // Check entrypoint http1 frontendHealthReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendHealthReq.Host = "test.localhost" - err = try.Request(frontendHealthReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err = try.Request(frontendHealthReq, 5*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) // Check entrypoint http2 frontendHealthReq, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:9000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendHealthReq.Host = "test.localhost" - err = try.Request(frontendHealthReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err = try.Request(frontendHealthReq, 5*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) // Set the both whoami health to 500 client := &http.Client{} whoamiHosts := []string{s.whoami1IP, s.whoami2IP} for _, whoami := range whoamiHosts { statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+whoami+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // Verify no backend service is available due to failing health checks err = try.Request(frontendHealthReq, 5*time.Second, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // reactivate the whoami2 statusInternalServerOkReq, err := http.NewRequest(http.MethodPost, "http://"+s.whoami2IP+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerOkReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontend1Req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontend1Req.Host = "test.localhost" frontend2Req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:9000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontend2Req.Host = "test.localhost" // Check if whoami1 never responds err = try.Request(frontend2Req, 2*time.Second, try.BodyContains(s.whoami1IP)) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) // Check if whoami1 never responds err = try.Request(frontend1Req, 2*time.Second, try.BodyContains(s.whoami1IP)) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) } -func (s *HealthCheckSuite) TestPortOverload(c *check.C) { +func (s *HealthCheckSuite) TestPortOverload() { // Set one whoami health to 200 client := &http.Client{} statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - file := s.adaptFile(c, "fixtures/healthcheck/port_overload.toml", struct { + file := s.adaptFile("fixtures/healthcheck/port_overload.toml", struct { Server1 string }{s.whoami1IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("Host(`test.localhost`)")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendHealthReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) frontendHealthReq.Host = "test.localhost" // We test bad gateway because we use an invalid port for the backend err = try.Request(frontendHealthReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Set one whoami health to 500 statusInternalServerErrorReq, err = http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify no backend service is available due to failing health checks err = try.Request(frontendHealthReq, 3*time.Second, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // Checks if all the loadbalancers created will correctly update the server status. -func (s *HealthCheckSuite) TestMultipleRoutersOnSameService(c *check.C) { - file := s.adaptFile(c, "fixtures/healthcheck/multiple-routers-one-same-service.toml", struct { +func (s *HealthCheckSuite) TestMultipleRoutersOnSameService() { + file := s.adaptFile("fixtures/healthcheck/multiple-routers-one-same-service.toml", struct { Server1 string }{s.whoami1IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`test.localhost`)")) + require.NoError(s.T(), err) // Set whoami health to 200 to be sure to start with the wanted status client := &http.Client{} statusOkReq, err := http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusOkReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // check healthcheck on web1 entrypoint healthReqWeb1, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) healthReqWeb1.Host = "test.localhost" err = try.Request(healthReqWeb1, 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // check healthcheck on web2 entrypoint healthReqWeb2, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:9000/health", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) healthReqWeb2.Host = "test.localhost" err = try.Request(healthReqWeb2, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Set whoami health to 500 statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify no backend service is available due to failing health checks err = try.Request(healthReqWeb1, 3*time.Second, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(healthReqWeb2, 3*time.Second, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Change one whoami health to 200 statusOKReq1, err := http.NewRequest(http.MethodPost, "http://"+s.whoami1IP+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusOKReq1) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify health check err = try.Request(healthReqWeb1, 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(healthReqWeb2, 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *HealthCheckSuite) TestPropagate(c *check.C) { - file := s.adaptFile(c, "fixtures/healthcheck/propagate.toml", struct { +func (s *HealthCheckSuite) TestPropagate() { + file := s.adaptFile("fixtures/healthcheck/propagate.toml", struct { Server1 string Server2 string Server3 string Server4 string }{s.whoami1IP, s.whoami2IP, s.whoami3IP, s.whoami4IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`root.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`root.localhost`)")) + require.NoError(s.T(), err) rootReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) rootReq.Host = "root.localhost" err = try.Request(rootReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Bring whoami1 and whoami3 down client := http.Client{ @@ -313,9 +300,9 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { whoamiHosts := []string{s.whoami1IP, s.whoami3IP} for _, whoami := range whoamiHosts { statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+whoami+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } try.Sleep(time.Second) @@ -327,19 +314,19 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { reachedServers := make(map[string]int) for i := 0; i < 4; i++ { resp, err := client.Do(rootReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if reachedServers[s.whoami4IP] > reachedServers[s.whoami2IP] { - c.Assert(string(body), checker.Contains, want2) + assert.Contains(s.T(), string(body), want2) reachedServers[s.whoami2IP]++ continue } if reachedServers[s.whoami2IP] > reachedServers[s.whoami4IP] { - c.Assert(string(body), checker.Contains, want4) + assert.Contains(s.T(), string(body), want4) reachedServers[s.whoami4IP]++ continue } @@ -356,48 +343,48 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { } } - c.Assert(reachedServers[s.whoami2IP], checker.Equals, 2) - c.Assert(reachedServers[s.whoami4IP], checker.Equals, 2) + assert.Equal(s.T(), 2, reachedServers[s.whoami2IP]) + assert.Equal(s.T(), 2, reachedServers[s.whoami4IP]) fooReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) fooReq.Host = "foo.localhost" // Verify load-balancing on foo still works, and that we're getting wsp2, wsp2, wsp2, wsp2, etc. want := `IP: ` + s.whoami2IP for i := 0; i < 4; i++ { resp, err := client.Do(fooReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - c.Assert(string(body), checker.Contains, want) + assert.Contains(s.T(), string(body), want) } barReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) barReq.Host = "bar.localhost" // Verify load-balancing on bar still works, and that we're getting wsp2, wsp2, wsp2, wsp2, etc. want = `IP: ` + s.whoami2IP for i := 0; i < 4; i++ { resp, err := client.Do(barReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - c.Assert(string(body), checker.Contains, want) + assert.Contains(s.T(), string(body), want) } // Bring whoami2 and whoami4 down whoamiHosts = []string{s.whoami2IP, s.whoami4IP} for _, whoami := range whoamiHosts { statusInternalServerErrorReq, err := http.NewRequest(http.MethodPost, "http://"+whoami+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusInternalServerErrorReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } try.Sleep(time.Second) @@ -405,25 +392,25 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { // Verify that everything is down, and that we get 503s everywhere. for i := 0; i < 2; i++ { resp, err := client.Do(rootReq) - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusServiceUnavailable) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusServiceUnavailable, resp.StatusCode) resp, err = client.Do(fooReq) - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusServiceUnavailable) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusServiceUnavailable, resp.StatusCode) resp, err = client.Do(barReq) - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusServiceUnavailable) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusServiceUnavailable, resp.StatusCode) } // Bring everything back up. whoamiHosts = []string{s.whoami1IP, s.whoami2IP, s.whoami3IP, s.whoami4IP} for _, whoami := range whoamiHosts { statusOKReq, err := http.NewRequest(http.MethodPost, "http://"+whoami+"/health", bytes.NewBufferString("200")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusOKReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } try.Sleep(time.Second) @@ -432,10 +419,10 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { reachedServers = make(map[string]int) for i := 0; i < 4; i++ { resp, err := client.Do(rootReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if strings.Contains(string(body), `IP: `+s.whoami1IP) { reachedServers[s.whoami1IP]++ @@ -458,19 +445,19 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { } } - c.Assert(reachedServers[s.whoami1IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami2IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami3IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami4IP], checker.Equals, 1) + assert.Equal(s.T(), 1, reachedServers[s.whoami1IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami2IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami3IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami4IP]) // Verify everything is up on foo router. reachedServers = make(map[string]int) for i := 0; i < 4; i++ { resp, err := client.Do(fooReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if strings.Contains(string(body), `IP: `+s.whoami1IP) { reachedServers[s.whoami1IP]++ @@ -493,19 +480,19 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { } } - c.Assert(reachedServers[s.whoami1IP], checker.Equals, 2) - c.Assert(reachedServers[s.whoami2IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami3IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami4IP], checker.Equals, 0) + assert.Equal(s.T(), 2, reachedServers[s.whoami1IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami2IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami3IP]) + assert.Equal(s.T(), 0, reachedServers[s.whoami4IP]) // Verify everything is up on bar router. reachedServers = make(map[string]int) for i := 0; i < 4; i++ { resp, err := client.Do(barReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if strings.Contains(string(body), `IP: `+s.whoami1IP) { reachedServers[s.whoami1IP]++ @@ -528,102 +515,87 @@ func (s *HealthCheckSuite) TestPropagate(c *check.C) { } } - c.Assert(reachedServers[s.whoami1IP], checker.Equals, 2) - c.Assert(reachedServers[s.whoami2IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami3IP], checker.Equals, 1) - c.Assert(reachedServers[s.whoami4IP], checker.Equals, 0) + assert.Equal(s.T(), 2, reachedServers[s.whoami1IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami2IP]) + assert.Equal(s.T(), 1, reachedServers[s.whoami3IP]) + assert.Equal(s.T(), 0, reachedServers[s.whoami4IP]) } -func (s *HealthCheckSuite) TestPropagateNoHealthCheck(c *check.C) { - file := s.adaptFile(c, "fixtures/healthcheck/propagate_no_healthcheck.toml", struct { +func (s *HealthCheckSuite) TestPropagateNoHealthCheck() { + file := s.adaptFile("fixtures/healthcheck/propagate_no_healthcheck.toml", struct { Server1 string }{s.whoami1IP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`noop.localhost`)"), try.BodyNotContains("Host(`root.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`noop.localhost`)"), try.BodyNotContains("Host(`root.localhost`)")) + require.NoError(s.T(), err) rootReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) rootReq.Host = "root.localhost" err = try.Request(rootReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *HealthCheckSuite) TestPropagateReload(c *check.C) { +func (s *HealthCheckSuite) TestPropagateReload() { // Setup a WSP service without the healthcheck enabled (wsp-service1) - withoutHealthCheck := s.adaptFile(c, "fixtures/healthcheck/reload_without_healthcheck.toml", struct { + withoutHealthCheck := s.adaptFile("fixtures/healthcheck/reload_without_healthcheck.toml", struct { Server1 string Server2 string }{s.whoami1IP, s.whoami2IP}) - defer os.Remove(withoutHealthCheck) - withHealthCheck := s.adaptFile(c, "fixtures/healthcheck/reload_with_healthcheck.toml", struct { + withHealthCheck := s.adaptFile("fixtures/healthcheck/reload_with_healthcheck.toml", struct { Server1 string Server2 string }{s.whoami1IP, s.whoami2IP}) - defer os.Remove(withHealthCheck) - cmd, display := s.traefikCmd(withConfigFile(withoutHealthCheck)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(withoutHealthCheck)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`root.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Host(`root.localhost`)")) + require.NoError(s.T(), err) // Allow one of the underlying services on it to fail all servers HC (whoami2) client := http.Client{ Timeout: 10 * time.Second, } statusOKReq, err := http.NewRequest(http.MethodPost, "http://"+s.whoami2IP+"/health", bytes.NewBufferString("500")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = client.Do(statusOKReq) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) rootReq, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) rootReq.Host = "root.localhost" // Check the failed service (whoami2) is getting requests, but answer 500 err = try.Request(rootReq, 500*time.Millisecond, try.StatusCodeIs(http.StatusServiceUnavailable)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Enable the healthcheck on the root WSP (wsp-service1) and let Traefik reload the config fr1, err := os.OpenFile(withoutHealthCheck, os.O_APPEND|os.O_WRONLY, 0o644) - c.Assert(fr1, checker.NotNil) - c.Assert(err, checker.IsNil) + assert.NotNil(s.T(), fr1) + require.NoError(s.T(), err) err = fr1.Truncate(0) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) fr2, err := os.ReadFile(withHealthCheck) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = fmt.Fprint(fr1, string(fr2)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = fr1.Close() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - try.Sleep(1 * time.Second) + // Waiting for the reflected change. + err = try.Request(rootReq, 5*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) // Check the failed service (whoami2) is not getting requests wantIPs := []string{s.whoami1IP, s.whoami1IP, s.whoami1IP, s.whoami1IP} for _, ip := range wantIPs { - want := "IP: " + ip - resp, err := client.Do(rootReq) - c.Assert(err, checker.IsNil) - - body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) - - c.Assert(string(body), checker.Contains, want) + err = try.Request(rootReq, 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("IP: "+ip)) + require.NoError(s.T(), err) } } diff --git a/integration/hostresolver_test.go b/integration/hostresolver_test.go index d76552016..7985ea191 100644 --- a/integration/hostresolver_test.go +++ b/integration/hostresolver_test.go @@ -2,27 +2,33 @@ package integration import ( "net/http" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type HostResolverSuite struct{ BaseSuite } -func (s *HostResolverSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "hostresolver") - s.composeUp(c) +func TestHostResolverSuite(t *testing.T) { + suite.Run(t, new(HostResolverSuite)) } -func (s *HostResolverSuite) TestSimpleConfig(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/simple_hostresolver.toml")) - defer display(c) +func (s *HostResolverSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.createComposeProject("hostresolver") + s.composeUp() +} + +func (s *HostResolverSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *HostResolverSuite) TestSimpleConfig() { + s.traefikCmd(withConfigFile("fixtures/simple_hostresolver.toml")) testCase := []struct { desc string @@ -43,10 +49,10 @@ func (s *HostResolverSuite) TestSimpleConfig(c *check.C) { for _, test := range testCase { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.host - err = try.Request(req, 1*time.Second, try.StatusCodeIs(test.status), try.HasBody()) - c.Assert(err, checker.IsNil) + err = try.Request(req, 5*time.Second, try.StatusCodeIs(test.status), try.HasBody()) + require.NoError(s.T(), err) } } diff --git a/integration/http_test.go b/integration/http_test.go index 6e18fcb80..7d19c41d5 100644 --- a/integration/http_test.go +++ b/integration/http_test.go @@ -5,28 +5,27 @@ import ( "net" "net/http" "net/http/httptest" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/dynamic" - checker "github.com/vdemeester/shakers" ) type HTTPSuite struct{ BaseSuite } -func (s *HTTPSuite) TestSimpleConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/http/simple.toml")) - defer display(c) +func TestHTTPSuite(t *testing.T) { + suite.Run(t, new(HTTPSuite)) +} - err := cmd.Start() - c.Assert(err, checker.IsNil) - - defer s.killCmd(cmd) +func (s *HTTPSuite) TestSimpleConfiguration() { + s.traefikCmd(withConfigFile("fixtures/http/simple.toml")) // Expect a 404 as we configured nothing. - err = try.GetRequest("http://127.0.0.1:8000/", time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Provide a configuration, fetched by Traefik provider. configuration := &dynamic.Configuration{ @@ -55,14 +54,14 @@ func (s *HTTPSuite) TestSimpleConfiguration(c *check.C) { } configData, err := json.Marshal(configuration) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) server := startTestServerWithResponse(configData) defer server.Close() // Expect configuration to be applied. err = try.GetRequest("http://127.0.0.1:9090/api/rawdata", 3*time.Second, try.BodyContains("routerHTTP@http", "serviceHTTP@http", "http://bacon:80")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } func startTestServerWithResponse(response []byte) (ts *httptest.Server) { diff --git a/integration/https_test.go b/integration/https_test.go index e5009e287..a4f7dc527 100644 --- a/integration/https_test.go +++ b/integration/https_test.go @@ -8,34 +8,35 @@ import ( "net/http" "net/http/httptest" "os" + "testing" "time" "github.com/BurntSushi/toml" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/dynamic" traefiktls "github.com/traefik/traefik/v2/pkg/tls" - checker "github.com/vdemeester/shakers" ) // HTTPSSuite tests suite. type HTTPSSuite struct{ BaseSuite } +func TestHTTPSSuite(t *testing.T) { + suite.Run(t, &HTTPSSuite{}) +} + // TestWithSNIConfigHandshake involves a client sending a SNI hostname of // "snitest.com", which happens to match the CN of 'snitest.com.crt'. The test // verifies that traefik presents the correct certificate. -func (s *HTTPSSuite) TestWithSNIConfigHandshake(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HTTPSSuite) TestWithSNIConfigHandshake() { + file := s.adaptFile("fixtures/https/https_sni.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -43,35 +44,30 @@ func (s *HTTPSSuite) TestWithSNIConfigHandshake(c *check.C) { NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("snitest.com") - c.Assert(err, checker.IsNil, check.Commentf("certificate did not match SNI servername")) + assert.NoError(s.T(), err, "certificate did not match SNI servername") proto := conn.ConnectionState().NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithSNIConfigRoute involves a client sending HTTPS requests with // SNI hostnames of "snitest.org" and "snitest.com". The test verifies // that traefik routes the requests to the expected backends. -func (s *HTTPSSuite) TestWithSNIConfigRoute(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HTTPSSuite) TestWithSNIConfigRoute() { + file := s.adaptFile("fixtures/https/https_sni.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) backend1 := startTestServer("9010", http.StatusNoContent, "") backend2 := startTestServer("9020", http.StatusResetContent, "") @@ -79,9 +75,9 @@ func (s *HTTPSSuite) TestWithSNIConfigRoute(c *check.C) { defer backend2.Close() err = try.GetRequest(backend1.URL, 1*time.Second, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest(backend2.URL, 1*time.Second, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tr1 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -97,37 +93,33 @@ func (s *HTTPSSuite) TestWithSNIConfigRoute(c *check.C) { } req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr1.TLSClientConfig.ServerName req.Header.Set("Host", tr1.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr1, try.HasCn(tr1.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr2.TLSClientConfig.ServerName req.Header.Set("Host", tr2.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr2, try.HasCn(tr2.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // TestWithTLSOptions verifies that traefik routes the requests with the associated tls options. -func (s *HTTPSSuite) TestWithTLSOptions(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_tls_options.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithTLSOptions() { + file := s.adaptFile("fixtures/https/https_tls_options.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) backend1 := startTestServer("9010", http.StatusNoContent, "") backend2 := startTestServer("9020", http.StatusResetContent, "") @@ -135,9 +127,9 @@ func (s *HTTPSSuite) TestWithTLSOptions(c *check.C) { defer backend2.Close() err = try.GetRequest(backend1.URL, 1*time.Second, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest(backend2.URL, 1*time.Second, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tr1 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -165,27 +157,27 @@ func (s *HTTPSSuite) TestWithTLSOptions(c *check.C) { // With valid TLS options and request req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr1.TLSClientConfig.ServerName req.Header.Set("Host", tr1.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr1, try.HasCn(tr1.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // With a valid TLS version req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr2.TLSClientConfig.ServerName req.Header.Set("Host", tr2.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 3*time.Second, tr2, try.HasCn(tr2.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // With a bad TLS version req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr3.TLSClientConfig.ServerName req.Header.Set("Host", tr3.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") @@ -193,27 +185,23 @@ func (s *HTTPSSuite) TestWithTLSOptions(c *check.C) { Transport: tr3, } _, err = client.Do(req) - c.Assert(err, checker.NotNil) - c.Assert(err.Error(), checker.Contains, "tls: no supported versions satisfy MinVersion and MaxVersion") + assert.Error(s.T(), err) + assert.Contains(s.T(), err.Error(), "tls: no supported versions satisfy MinVersion and MaxVersion") // with unknown tls option err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("unknown TLS options: unknown@file")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // TestWithConflictingTLSOptions checks that routers with same SNI but different TLS options get fallbacked to the default TLS options. -func (s *HTTPSSuite) TestWithConflictingTLSOptions(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_tls_options.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithConflictingTLSOptions() { + file := s.adaptFile("fixtures/https/https_tls_options.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.net`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.net`)")) + require.NoError(s.T(), err) backend1 := startTestServer("9010", http.StatusNoContent, "") backend2 := startTestServer("9020", http.StatusResetContent, "") @@ -221,9 +209,9 @@ func (s *HTTPSSuite) TestWithConflictingTLSOptions(c *check.C) { defer backend2.Close() err = try.GetRequest(backend1.URL, 1*time.Second, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest(backend2.URL, 1*time.Second, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tr4 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -243,17 +231,17 @@ func (s *HTTPSSuite) TestWithConflictingTLSOptions(c *check.C) { // With valid TLS options and request req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = trDefault.TLSClientConfig.ServerName req.Header.Set("Host", trDefault.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, trDefault, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // With a bad TLS version req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr4.TLSClientConfig.ServerName req.Header.Set("Host", tr4.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") @@ -261,29 +249,24 @@ func (s *HTTPSSuite) TestWithConflictingTLSOptions(c *check.C) { Transport: tr4, } _, err = client.Do(req) - c.Assert(err, checker.NotNil) - c.Assert(err.Error(), checker.Contains, "tls: no supported versions satisfy MinVersion and MaxVersion") + assert.ErrorContains(s.T(), err, "tls: no supported versions satisfy MinVersion and MaxVersion") // with unknown tls option err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains(fmt.Sprintf("found different TLS options for routers on the same host %v, so using the default TLS options instead", tr4.TLSClientConfig.ServerName))) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // TestWithSNIStrictNotMatchedRequest involves a client sending a SNI hostname of // "snitest.org", which does not match the CN of 'snitest.com.crt'. The test // verifies that traefik closes the connection. -func (s *HTTPSSuite) TestWithSNIStrictNotMatchedRequest(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni_strict.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithSNIStrictNotMatchedRequest() { + file := s.adaptFile("fixtures/https/https_sni_strict.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -292,24 +275,20 @@ func (s *HTTPSSuite) TestWithSNIStrictNotMatchedRequest(c *check.C) { } // Connection with no matching certificate should fail _, err = tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.NotNil, check.Commentf("failed to connect to server")) + assert.Error(s.T(), err, "failed to connect to server") } // TestWithDefaultCertificate involves a client sending a SNI hostname of // "snitest.org", which does not match the CN of 'snitest.com.crt'. The test // verifies that traefik returns the default certificate. -func (s *HTTPSSuite) TestWithDefaultCertificate(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni_default_cert.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithDefaultCertificate() { + file := s.adaptFile("fixtures/https/https_sni_default_cert.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -317,71 +296,63 @@ func (s *HTTPSSuite) TestWithDefaultCertificate(c *check.C) { NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("snitest.com") - c.Assert(err, checker.IsNil, check.Commentf("server did not serve correct default certificate")) + assert.NoError(s.T(), err, "server did not serve correct default certificate") proto := cs.NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithDefaultCertificateNoSNI involves a client sending a request with no ServerName // which does not match the CN of 'snitest.com.crt'. The test // verifies that traefik returns the default certificate. -func (s *HTTPSSuite) TestWithDefaultCertificateNoSNI(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni_default_cert.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithDefaultCertificateNoSNI() { + file := s.adaptFile("fixtures/https/https_sni_default_cert.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("snitest.com") - c.Assert(err, checker.IsNil, check.Commentf("server did not serve correct default certificate")) + assert.NoError(s.T(), err, "server did not serve correct default certificate") proto := cs.NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithOverlappingCertificate involves a client sending a SNI hostname of // "www.snitest.com", which matches the CN of two static certificates: // 'wildcard.snitest.com.crt', and `www.snitest.com.crt`. The test // verifies that traefik returns the non-wildcard certificate. -func (s *HTTPSSuite) TestWithOverlappingStaticCertificate(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni_default_cert.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithOverlappingStaticCertificate() { + file := s.adaptFile("fixtures/https/https_sni_default_cert.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -389,36 +360,32 @@ func (s *HTTPSSuite) TestWithOverlappingStaticCertificate(c *check.C) { NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("www.snitest.com") - c.Assert(err, checker.IsNil, check.Commentf("server did not serve correct default certificate")) + assert.NoError(s.T(), err, "server did not serve correct default certificate") proto := cs.NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithOverlappingCertificate involves a client sending a SNI hostname of // "www.snitest.com", which matches the CN of two dynamic certificates: // 'wildcard.snitest.com.crt', and `www.snitest.com.crt`. The test // verifies that traefik returns the non-wildcard certificate. -func (s *HTTPSSuite) TestWithOverlappingDynamicCertificate(c *check.C) { - file := s.adaptFile(c, "fixtures/https/dynamic_https_sni_default_cert.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithOverlappingDynamicCertificate() { + file := s.adaptFile("fixtures/https/dynamic_https_sni_default_cert.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -426,34 +393,30 @@ func (s *HTTPSSuite) TestWithOverlappingDynamicCertificate(c *check.C) { NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("www.snitest.com") - c.Assert(err, checker.IsNil, check.Commentf("server did not serve correct default certificate")) + assert.NoError(s.T(), err, "server did not serve correct default certificate") proto := cs.NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithClientCertificateAuthentication // The client can send a certificate signed by a CA trusted by the server but it's optional. -func (s *HTTPSSuite) TestWithClientCertificateAuthentication(c *check.C) { - file := s.adaptFile(c, "fixtures/https/clientca/https_1ca1config.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + +func (s *HTTPSSuite) TestWithClientCertificateAuthentication() { + file := s.adaptFile("fixtures/https/clientca/https_1ca1config.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -462,25 +425,25 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthentication(c *check.C) { } // Connection without client certificate should fail _, err = tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("should be allowed to connect to server")) + assert.NoError(s.T(), err, "should be allowed to connect to server") // Connect with client certificate signed by ca1 cert, err := tls.LoadX509KeyPair("fixtures/https/clientca/client1.crt", "fixtures/https/clientca/client1.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") conn.Close() // Connect with client certificate not signed by ca1 cert, err = tls.LoadX509KeyPair("fixtures/https/snitest.org.cert", "fixtures/https/snitest.org.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) conn, err = tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") conn.Close() @@ -491,16 +454,17 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthentication(c *check.C) { Certificates: []tls.Certificate{}, } cert, err = tls.LoadX509KeyPair("fixtures/https/clientca/client2.crt", "fixtures/https/clientca/client2.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) _, err = tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("should be allowed to connect to server")) + assert.NoError(s.T(), err, "should be allowed to connect to server") } // TestWithClientCertificateAuthentication // Use two CA:s and test that clients with client signed by either of them can connect. -func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check.C) { + +func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs() { server1 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { _, _ = rw.Write([]byte("server1")) })) server2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { _, _ = rw.Write([]byte("server2")) })) defer func() { @@ -508,7 +472,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check server2.Close() }() - file := s.adaptFile(c, "fixtures/https/clientca/https_2ca1config.toml", struct { + file := s.adaptFile("fixtures/https/clientca/https_2ca1config.toml", struct { Server1 string Server2 string }{ @@ -516,19 +480,14 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check Server2: server2.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "snitest.com" tlsConfig := &tls.Config{ @@ -544,15 +503,15 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check // Connection without client certificate should fail _, err = client.Do(req) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) cert, err := tls.LoadX509KeyPair("fixtures/https/clientca/client1.crt", "fixtures/https/clientca/client1.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) // Connect with client signed by ca1 _, err = client.Do(req) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Connect with client signed by ca2 tlsConfig = &tls.Config{ @@ -562,7 +521,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check } cert, err = tls.LoadX509KeyPair("fixtures/https/clientca/client2.crt", "fixtures/https/clientca/client2.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) client = http.Client{ @@ -572,7 +531,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check // Connect with client signed by ca1 _, err = client.Do(req) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Connect with client signed by ca3 should fail tlsConfig = &tls.Config{ @@ -582,7 +541,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check } cert, err = tls.LoadX509KeyPair("fixtures/https/clientca/client3.crt", "fixtures/https/clientca/client3.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) client = http.Client{ @@ -592,12 +551,13 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAs(c *check // Connect with client signed by ca1 _, err = client.Do(req) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) } // TestWithClientCertificateAuthentication // Use two CA:s in two different files and test that clients with client signed by either of them can connect. -func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleFiles(c *check.C) { + +func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleFiles() { server1 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { _, _ = rw.Write([]byte("server1")) })) server2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { _, _ = rw.Write([]byte("server2")) })) defer func() { @@ -605,26 +565,21 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF server2.Close() }() - file := s.adaptFile(c, "fixtures/https/clientca/https_2ca2config.toml", struct { + file := s.adaptFile("fixtures/https/clientca/https_2ca2config.toml", struct { Server1 string Server2 string }{ Server1: server1.URL, Server2: server2.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`snitest.org`)")) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "snitest.com" tlsConfig := &tls.Config{ @@ -640,15 +595,15 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF // Connection without client certificate should fail _, err = client.Do(req) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) // Connect with client signed by ca1 cert, err := tls.LoadX509KeyPair("fixtures/https/clientca/client1.crt", "fixtures/https/clientca/client1.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) _, err = client.Do(req) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Connect with client signed by ca2 tlsConfig = &tls.Config{ @@ -658,7 +613,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF } cert, err = tls.LoadX509KeyPair("fixtures/https/clientca/client2.crt", "fixtures/https/clientca/client2.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) client = http.Client{ @@ -667,7 +622,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF } _, err = client.Do(req) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Connect with client signed by ca3 should fail tlsConfig = &tls.Config{ @@ -677,7 +632,7 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF } cert, err = tls.LoadX509KeyPair("fixtures/https/clientca/client3.crt", "fixtures/https/clientca/client3.key") - c.Assert(err, checker.IsNil, check.Commentf("unable to load client certificate and key")) + assert.NoError(s.T(), err, "unable to load client certificate and key") tlsConfig.Certificates = append(tlsConfig.Certificates, cert) client = http.Client{ @@ -686,51 +641,41 @@ func (s *HTTPSSuite) TestWithClientCertificateAuthenticationMultipleCAsMultipleF } _, err = client.Do(req) - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) } -func (s *HTTPSSuite) TestWithRootCAsContentForHTTPSOnBackend(c *check.C) { +func (s *HTTPSSuite) TestWithRootCAsContentForHTTPSOnBackend() { backend := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })) defer backend.Close() - file := s.adaptFile(c, "fixtures/https/rootcas/https.toml", struct{ BackendHost string }{backend.URL}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + file := s.adaptFile("fixtures/https/rootcas/https.toml", struct{ BackendHost string }{backend.URL}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains(backend.URL)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains(backend.URL)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8081/ping", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *HTTPSSuite) TestWithRootCAsFileForHTTPSOnBackend(c *check.C) { +func (s *HTTPSSuite) TestWithRootCAsFileForHTTPSOnBackend() { backend := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) })) defer backend.Close() - file := s.adaptFile(c, "fixtures/https/rootcas/https_with_file.toml", struct{ BackendHost string }{backend.URL}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + file := s.adaptFile("fixtures/https/rootcas/https_with_file.toml", struct{ BackendHost string }{backend.URL}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains(backend.URL)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains(backend.URL)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8081/ping", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } func startTestServer(port string, statusCode int, textContent string) (ts *httptest.Server) { @@ -757,20 +702,14 @@ func startTestServer(port string, statusCode int, textContent string) (ts *httpt // SNI hostnames of "snitest.org" and "snitest.com". The test verifies // that traefik routes the requests to the expected backends thanks to given certificate if possible // otherwise thanks to the default one. -func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithNoChange(c *check.C) { - dynamicConfFileName := s.adaptFile(c, "fixtures/https/dynamic_https.toml", struct{}{}) - defer os.Remove(dynamicConfFileName) - confFileName := s.adaptFile(c, "fixtures/https/dynamic_https_sni.toml", struct { +func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithNoChange() { + dynamicConfFileName := s.adaptFile("fixtures/https/dynamic_https.toml", struct{}{}) + confFileName := s.adaptFile("fixtures/https/dynamic_https_sni.toml", struct { DynamicConfFileName string }{ DynamicConfFileName: dynamicConfFileName, }) - defer os.Remove(confFileName) - cmd, display := s.traefikCmd(withConfigFile(confFileName)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(confFileName)) tr1 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -787,8 +726,8 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithNoChange(c *check.C) { } // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr1.TLSClientConfig.ServerName+"`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr1.TLSClientConfig.ServerName+"`)")) + require.NoError(s.T(), err) backend1 := startTestServer("9010", http.StatusNoContent, "") backend2 := startTestServer("9020", http.StatusResetContent, "") @@ -796,29 +735,29 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithNoChange(c *check.C) { defer backend2.Close() err = try.GetRequest(backend1.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest(backend2.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr1.TLSClientConfig.ServerName req.Header.Set("Host", tr1.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") // snitest.org certificate must be used yet && Expected a 204 (from backend1) err = try.RequestWithTransport(req, 30*time.Second, tr1, try.HasCn(tr1.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr2.TLSClientConfig.ServerName req.Header.Set("Host", tr2.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") // snitest.com certificate does not exist, default certificate has to be used && Expected a 205 (from backend2) err = try.RequestWithTransport(req, 30*time.Second, tr2, try.HasCn("TRAEFIK DEFAULT CERT"), try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // TestWithSNIDynamicConfigRouteWithChange involves a client sending HTTPS requests with @@ -826,20 +765,15 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithNoChange(c *check.C) { // that traefik updates its configuration when the HTTPS configuration is modified and // it routes the requests to the expected backends thanks to given certificate if possible // otherwise thanks to the default one. -func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithChange(c *check.C) { - dynamicConfFileName := s.adaptFile(c, "fixtures/https/dynamic_https.toml", struct{}{}) - defer os.Remove(dynamicConfFileName) - confFileName := s.adaptFile(c, "fixtures/https/dynamic_https_sni.toml", struct { + +func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithChange() { + dynamicConfFileName := s.adaptFile("fixtures/https/dynamic_https.toml", struct{}{}) + confFileName := s.adaptFile("fixtures/https/dynamic_https_sni.toml", struct { DynamicConfFileName string }{ DynamicConfFileName: dynamicConfFileName, }) - defer os.Remove(confFileName) - cmd, display := s.traefikCmd(withConfigFile(confFileName)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(confFileName)) tr1 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -856,8 +790,8 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithChange(c *check.C) { } // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr2.TLSClientConfig.ServerName+"`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr2.TLSClientConfig.ServerName+"`)")) + require.NoError(s.T(), err) backend1 := startTestServer("9010", http.StatusNoContent, "") backend2 := startTestServer("9020", http.StatusResetContent, "") @@ -865,30 +799,30 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithChange(c *check.C) { defer backend2.Close() err = try.GetRequest(backend1.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest(backend2.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Change certificates configuration file content - modifyCertificateConfFileContent(c, tr1.TLSClientConfig.ServerName, dynamicConfFileName) + s.modifyCertificateConfFileContent(tr1.TLSClientConfig.ServerName, dynamicConfFileName) req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr1.TLSClientConfig.ServerName req.Header.Set("Host", tr1.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr1, try.HasCn(tr1.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr2.TLSClientConfig.ServerName req.Header.Set("Host", tr2.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr2, try.HasCn("TRAEFIK DEFAULT CERT"), try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // TestWithSNIDynamicConfigRouteWithTlsConfigurationDeletion involves a client sending HTTPS requests with @@ -896,20 +830,15 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithChange(c *check.C) { // that traefik updates its configuration when the HTTPS configuration is modified, even if it totally deleted, and // it routes the requests to the expected backends thanks to given certificate if possible // otherwise thanks to the default one. -func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithTlsConfigurationDeletion(c *check.C) { - dynamicConfFileName := s.adaptFile(c, "fixtures/https/dynamic_https.toml", struct{}{}) - defer os.Remove(dynamicConfFileName) - confFileName := s.adaptFile(c, "fixtures/https/dynamic_https_sni.toml", struct { + +func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithTlsConfigurationDeletion() { + dynamicConfFileName := s.adaptFile("fixtures/https/dynamic_https.toml", struct{}{}) + confFileName := s.adaptFile("fixtures/https/dynamic_https_sni.toml", struct { DynamicConfFileName string }{ DynamicConfFileName: dynamicConfFileName, }) - defer os.Remove(confFileName) - cmd, display := s.traefikCmd(withConfigFile(confFileName)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(confFileName)) tr2 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -919,41 +848,41 @@ func (s *HTTPSSuite) TestWithSNIDynamicConfigRouteWithTlsConfigurationDeletion(c } // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr2.TLSClientConfig.ServerName+"`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`"+tr2.TLSClientConfig.ServerName+"`)")) + require.NoError(s.T(), err) backend2 := startTestServer("9020", http.StatusResetContent, "") defer backend2.Close() err = try.GetRequest(backend2.URL, 500*time.Millisecond, try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = tr2.TLSClientConfig.ServerName req.Header.Set("Host", tr2.TLSClientConfig.ServerName) req.Header.Set("Accept", "*/*") err = try.RequestWithTransport(req, 30*time.Second, tr2, try.HasCn(tr2.TLSClientConfig.ServerName), try.StatusCodeIs(http.StatusResetContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Change certificates configuration file content - modifyCertificateConfFileContent(c, "", dynamicConfFileName) + s.modifyCertificateConfFileContent("", dynamicConfFileName) err = try.RequestWithTransport(req, 30*time.Second, tr2, try.HasCn("TRAEFIK DEFAULT CERT"), try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } // modifyCertificateConfFileContent replaces the content of a HTTPS configuration file. -func modifyCertificateConfFileContent(c *check.C, certFileName, confFileName string) { +func (s *HTTPSSuite) modifyCertificateConfFileContent(certFileName, confFileName string) { file, err := os.OpenFile("./"+confFileName, os.O_WRONLY, os.ModeExclusive) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer func() { file.Close() }() err = file.Truncate(0) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // If certificate file is not provided, just truncate the configuration file if len(certFileName) > 0 { @@ -972,25 +901,20 @@ func modifyCertificateConfFileContent(c *check.C, certFileName, confFileName str var confBuffer bytes.Buffer err := toml.NewEncoder(&confBuffer).Encode(tlsConf) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = file.Write(confBuffer.Bytes()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } -func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_redirect.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification() { + file := s.adaptFile("fixtures/https/https_redirect.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.BodyContains("Host(`example.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.BodyContains("Host(`example.com`)")) + require.NoError(s.T(), err) client := &http.Client{ CheckRedirect: func(req *http.Request, via []*http.Request) error { @@ -1064,17 +988,17 @@ func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification(c *check.C) sourceURL := fmt.Sprintf("http://127.0.0.1:8888%s", test.path) for _, host := range test.hosts { req, err := http.NewRequest(http.MethodGet, sourceURL, nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = host resp, err := client.Do(req) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp.Body.Close() location := resp.Header.Get("Location") expected := "https://" + net.JoinHostPort(host, "8443") + test.path - c.Assert(location, checker.Equals, expected) + assert.Equal(s.T(), expected, location) } } } @@ -1082,18 +1006,13 @@ func (s *HTTPSSuite) TestEntryPointHttpsRedirectAndPathModification(c *check.C) // TestWithSNIDynamicCaseInsensitive involves a client sending a SNI hostname of // "bar.www.snitest.com", which matches the DNS SAN of '*.WWW.SNITEST.COM'. The test // verifies that traefik presents the correct certificate. -func (s *HTTPSSuite) TestWithSNIDynamicCaseInsensitive(c *check.C) { - file := s.adaptFile(c, "fixtures/https/https_sni_case_insensitive_dynamic.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *HTTPSSuite) TestWithSNIDynamicCaseInsensitive() { + file := s.adaptFile("fixtures/https/https_sni_case_insensitive_dynamic.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("HostRegexp(`{subdomain:[a-z1-9-]+}.www.snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("HostRegexp(`{subdomain:[a-z1-9-]+}.www.snitest.com`)")) + require.NoError(s.T(), err) tlsConfig := &tls.Config{ InsecureSkipVerify: true, @@ -1101,22 +1020,22 @@ func (s *HTTPSSuite) TestWithSNIDynamicCaseInsensitive(c *check.C) { NextProtos: []string{"h2", "http/1.1"}, } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.IsNil, check.Commentf("failed to connect to server")) + assert.NoError(s.T(), err, "failed to connect to server") defer conn.Close() err = conn.Handshake() - c.Assert(err, checker.IsNil, check.Commentf("TLS handshake error")) + assert.NoError(s.T(), err, "TLS handshake error") cs := conn.ConnectionState() err = cs.PeerCertificates[0].VerifyHostname("*.WWW.SNITEST.COM") - c.Assert(err, checker.IsNil, check.Commentf("certificate did not match SNI servername")) + assert.NoError(s.T(), err, "certificate did not match SNI servername") proto := conn.ConnectionState().NegotiatedProtocol - c.Assert(proto, checker.Equals, "h2") + assert.Equal(s.T(), "h2", proto) } // TestWithDomainFronting verify the domain fronting behavior -func (s *HTTPSSuite) TestWithDomainFronting(c *check.C) { +func (s *HTTPSSuite) TestWithDomainFronting() { backend := startTestServer("9010", http.StatusOK, "server1") defer backend.Close() backend2 := startTestServer("9020", http.StatusOK, "server2") @@ -1124,17 +1043,12 @@ func (s *HTTPSSuite) TestWithDomainFronting(c *check.C) { backend3 := startTestServer("9030", http.StatusOK, "server3") defer backend3.Close() - file := s.adaptFile(c, "fixtures/https/https_domain_fronting.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + file := s.adaptFile("fixtures/https/https_domain_fronting.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`site1.www.snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`site1.www.snitest.com`)")) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -1222,34 +1136,29 @@ func (s *HTTPSSuite) TestWithDomainFronting(c *check.C) { test := test req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:4443", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.hostHeader err = try.RequestWithTransport(req, 500*time.Millisecond, &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true, ServerName: test.serverName}}, try.StatusCodeIs(test.expectedStatusCode), try.BodyContains(test.expectedContent)) if test.expectedError { - c.Assert(err, checker.NotNil) + assert.Error(s.T(), err) } else { - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } } // TestWithInvalidTLSOption verifies the behavior when using an invalid tlsOption configuration. -func (s *HTTPSSuite) TestWithInvalidTLSOption(c *check.C) { +func (s *HTTPSSuite) TestWithInvalidTLSOption() { backend := startTestServer("9010", http.StatusOK, "server1") defer backend.Close() - file := s.adaptFile(c, "fixtures/https/https_invalid_tls_options.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + file := s.adaptFile("fixtures/https/https_invalid_tls_options.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 500*time.Millisecond, try.BodyContains("Host(`snitest.com`)")) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -1279,7 +1188,7 @@ func (s *HTTPSSuite) TestWithInvalidTLSOption(c *check.C) { } conn, err := tls.Dial("tcp", "127.0.0.1:4443", tlsConfig) - c.Assert(err, checker.NotNil, check.Commentf("connected to server successfully")) - c.Assert(conn, checker.IsNil) + assert.Error(s.T(), err, "connected to server successfully") + assert.Nil(s.T(), conn) } } diff --git a/integration/integration_test.go b/integration/integration_test.go index e50f34cb2..9dc04dc38 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -9,210 +9,325 @@ import ( "fmt" "io" "io/fs" + stdlog "log" + "net/http" "os" "os/exec" "path/filepath" + "regexp" + "slices" "strings" "testing" "text/template" "time" - "github.com/docker/cli/cli/command" - "github.com/docker/cli/cli/config/configfile" - "github.com/docker/cli/cli/context/docker" - "github.com/docker/cli/cli/context/store" - manifeststore "github.com/docker/cli/cli/manifest/store" - registryclient "github.com/docker/cli/cli/registry/client" - "github.com/docker/cli/cli/streams" - "github.com/docker/cli/cli/trust" - cmdcompose "github.com/docker/compose/v2/cmd/compose" - "github.com/docker/compose/v2/cmd/formatter" - composeapi "github.com/docker/compose/v2/pkg/api" - "github.com/docker/compose/v2/pkg/compose" - dockertypes "github.com/docker/docker/api/types" - "github.com/docker/docker/api/types/filters" - "github.com/docker/docker/client" + "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/mount" + dockernetwork "github.com/docker/docker/api/types/network" "github.com/fatih/structs" - "github.com/go-check/check" - notaryclient "github.com/theupdateframework/notary/client" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/network" + "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/log" - checker "github.com/vdemeester/shakers" + "gopkg.in/yaml.v3" ) -var ( - integration = flag.Bool("integration", false, "run integration tests") - showLog = flag.Bool("tlog", false, "always show Traefik logs") -) +var showLog = flag.Bool("tlog", false, "always show Traefik logs") -func Test(t *testing.T) { - if !*integration { - log.WithoutContext().Info("Integration tests disabled.") - return - } +type composeConfig struct { + Services map[string]composeService `yaml:"services"` +} - // TODO(mpl): very niche optimization: do not start tailscale if none of the - // wanted tests actually need it (e.g. KeepAliveSuite does not). - var ( - vpn *tailscaleNotSuite - useVPN bool - ) - if os.Getenv("IN_DOCKER") != "true" { - if vpn = setupVPN(nil, "tailscale.secret"); vpn != nil { - defer vpn.TearDownSuite(nil) - useVPN = true - } - } +type composeService struct { + Image string `yaml:"image"` + Labels map[string]string `yaml:"labels"` + Hostname string `yaml:"hostname"` + Volumes []string `yaml:"volumes"` + CapAdd []string `yaml:"cap_add"` + Command []string `yaml:"command"` + Environment map[string]string `yaml:"environment"` + Privileged bool `yaml:"privileged"` + Deploy composeDeploy `yaml:"deploy"` +} - check.Suite(&AccessLogSuite{}) - if !useVPN { - check.Suite(&AcmeSuite{}) - } - check.Suite(&ConsulCatalogSuite{}) - check.Suite(&ConsulSuite{}) - check.Suite(&DockerComposeSuite{}) - check.Suite(&DockerSuite{}) - check.Suite(&ErrorPagesSuite{}) - check.Suite(&EtcdSuite{}) - check.Suite(&FileSuite{}) - check.Suite(&GRPCSuite{}) - check.Suite(&HeadersSuite{}) - check.Suite(&HealthCheckSuite{}) - check.Suite(&HostResolverSuite{}) - check.Suite(&HTTPSSuite{}) - check.Suite(&HTTPSuite{}) - if !useVPN { - check.Suite(&K8sSuite{}) - } - check.Suite(&KeepAliveSuite{}) - check.Suite(&LogRotationSuite{}) - check.Suite(&MarathonSuite{}) - check.Suite(&MarathonSuite15{}) - if !useVPN { - check.Suite(&ProxyProtocolSuite{}) - } - check.Suite(&RateLimitSuite{}) - check.Suite(&RedisSuite{}) - check.Suite(&RestSuite{}) - check.Suite(&RetrySuite{}) - check.Suite(&SimpleSuite{}) - check.Suite(&TCPSuite{}) - check.Suite(&TimeoutSuite{}) - check.Suite(&ThrottlingSuite{}) - check.Suite(&TLSClientHeadersSuite{}) - check.Suite(&TracingSuite{}) - check.Suite(&UDPSuite{}) - check.Suite(&WebsocketSuite{}) - check.Suite(&ZookeeperSuite{}) - - check.TestingT(t) +type composeDeploy struct { + Replicas int `yaml:"replicas"` } var traefikBinary = "../dist/traefik" type BaseSuite struct { - composeProjectOptions *cmdcompose.ProjectOptions - dockerComposeService composeapi.Service - dockerClient *client.Client + suite.Suite + containers map[string]testcontainers.Container + network *testcontainers.DockerNetwork + hostIP string } -func (s *BaseSuite) TearDownSuite(c *check.C) { - if s.composeProjectOptions != nil && s.dockerComposeService != nil { - s.composeDown(c) +func (s *BaseSuite) waitForTraefik(containerName string) { + time.Sleep(1 * time.Second) + + // Wait for Traefik to turn ready. + req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/api/rawdata", nil) + require.NoError(s.T(), err) + + err = try.Request(req, 2*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains(containerName)) + require.NoError(s.T(), err) +} + +func (s *BaseSuite) displayTraefikLogFile(path string) { + if s.T().Failed() { + if _, err := os.Stat(path); !os.IsNotExist(err) { + content, errRead := os.ReadFile(path) + // TODO TestName + // fmt.Printf("%s: Traefik logs: \n", c.TestName()) + fmt.Print("Traefik logs: \n") + if errRead == nil { + fmt.Println(content) + } else { + fmt.Println(errRead) + } + } else { + // fmt.Printf("%s: No Traefik logs.\n", c.TestName()) + fmt.Print("No Traefik logs.\n") + } + errRemove := os.Remove(path) + if errRemove != nil { + fmt.Println(errRemove) + } } } +func (s *BaseSuite) SetupSuite() { + // configure default standard log. + stdlog.SetFlags(stdlog.Lshortfile | stdlog.LstdFlags) + // TODO + // stdlog.SetOutput(log.Logger) + + ctx := context.Background() + // Create docker network + // docker network create traefik-test-network --driver bridge --subnet 172.31.42.0/24 + var opts []network.NetworkCustomizer + opts = append(opts, network.WithDriver("bridge")) + opts = append(opts, network.WithIPAM(&dockernetwork.IPAM{ + Driver: "default", + Config: []dockernetwork.IPAMConfig{ + { + Subnet: "172.31.42.0/24", + }, + }, + })) + dockerNetwork, err := network.New(ctx, opts...) + require.NoError(s.T(), err) + + s.network = dockerNetwork + s.hostIP = "172.31.42.1" + if isDockerDesktop(ctx, s.T()) { + s.hostIP = getDockerDesktopHostIP(ctx, s.T()) + s.setupVPN("tailscale.secret") + } +} + +func getDockerDesktopHostIP(ctx context.Context, t *testing.T) string { + t.Helper() + + req := testcontainers.ContainerRequest{ + Image: "alpine", + HostConfigModifier: func(config *container.HostConfig) { + config.AutoRemove = true + }, + Cmd: []string{"getent", "hosts", "host.docker.internal"}, + } + + con, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + }) + require.NoError(t, err) + + closer, err := con.Logs(ctx) + require.NoError(t, err) + + all, err := io.ReadAll(closer) + require.NoError(t, err) + + ipRegex := regexp.MustCompile(`\b(?:\d{1,3}\.){3}\d{1,3}\b`) + matches := ipRegex.FindAllString(string(all), -1) + require.Len(t, matches, 1) + + return matches[0] +} + +func isDockerDesktop(ctx context.Context, t *testing.T) bool { + t.Helper() + + cli, err := testcontainers.NewDockerClientWithOpts(ctx) + if err != nil { + t.Fatalf("failed to create docker client: %s", err) + } + + info, err := cli.Info(ctx) + if err != nil { + t.Fatalf("failed to get docker info: %s", err) + } + + return info.OperatingSystem == "Docker Desktop" +} + +func (s *BaseSuite) TearDownSuite() { + s.composeDown() + + err := try.Do(5*time.Second, func() error { + if s.network != nil { + err := s.network.Remove(context.Background()) + if err != nil { + return err + } + } + + return nil + }) + require.NoError(s.T(), err) +} + // createComposeProject creates the docker compose project stored as a field in the BaseSuite. // This method should be called before starting and/or stopping compose services. -func (s *BaseSuite) createComposeProject(c *check.C, name string) { - projectName := fmt.Sprintf("traefik-integration-test-%s", name) +func (s *BaseSuite) createComposeProject(name string) { composeFile := fmt.Sprintf("resources/compose/%s.yml", name) - var err error - s.dockerClient, err = client.NewClientWithOpts() - c.Assert(err, checker.IsNil) + file, err := os.ReadFile(composeFile) + require.NoError(s.T(), err) - fakeCLI := &FakeDockerCLI{client: s.dockerClient} - s.dockerComposeService = compose.NewComposeService(fakeCLI) + var composeConfigData composeConfig + err = yaml.Unmarshal(file, &composeConfigData) + require.NoError(s.T(), err) - s.composeProjectOptions = &cmdcompose.ProjectOptions{ - ProjectDir: ".", - ProjectName: projectName, - ConfigPaths: []string{composeFile}, + if s.containers == nil { + s.containers = map[string]testcontainers.Container{} } + + ctx := context.Background() + + for id, containerConfig := range composeConfigData.Services { + var mounts []mount.Mount + for _, volume := range containerConfig.Volumes { + split := strings.Split(volume, ":") + if len(split) != 2 { + continue + } + + if strings.HasPrefix(split[0], "./") { + path, err := os.Getwd() + if err != nil { + log.WithoutContext().Errorf("can't determine current directory: %v", err) + continue + } + split[0] = strings.Replace(split[0], "./", path+"/", 1) + } + + abs, err := filepath.Abs(split[0]) + require.NoError(s.T(), err) + + mounts = append(mounts, mount.Mount{Source: abs, Target: split[1], Type: mount.TypeBind}) + } + + if containerConfig.Deploy.Replicas > 0 { + for i := 0; i < containerConfig.Deploy.Replicas; i++ { + id = fmt.Sprintf("%s-%d", id, i+1) + con, err := s.createContainer(ctx, containerConfig, id, mounts) + require.NoError(s.T(), err) + s.containers[id] = con + } + continue + } + + con, err := s.createContainer(ctx, containerConfig, id, mounts) + require.NoError(s.T(), err) + s.containers[id] = con + } +} + +func (s *BaseSuite) createContainer(ctx context.Context, containerConfig composeService, id string, mounts []mount.Mount) (testcontainers.Container, error) { + req := testcontainers.ContainerRequest{ + Image: containerConfig.Image, + Env: containerConfig.Environment, + Cmd: containerConfig.Command, + Labels: containerConfig.Labels, + Name: id, + Hostname: containerConfig.Hostname, + Privileged: containerConfig.Privileged, + Networks: []string{s.network.Name}, + HostConfigModifier: func(config *container.HostConfig) { + if containerConfig.CapAdd != nil { + config.CapAdd = containerConfig.CapAdd + } + if !isDockerDesktop(ctx, s.T()) { + config.ExtraHosts = append(config.ExtraHosts, "host.docker.internal:"+s.hostIP) + } + config.Mounts = mounts + }, + } + con, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: false, + }) + + return con, err } // composeUp starts the given services of the current docker compose project, if they are not already started. // Already running services are not affected (i.e. not stopped). -func (s *BaseSuite) composeUp(c *check.C, services ...string) { - c.Assert(s.composeProjectOptions, check.NotNil) - c.Assert(s.dockerComposeService, check.NotNil) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - // We use Create and Restart instead of Up, because the only option that actually works to control which containers - // are started is within the RestartOptions. - err = s.dockerComposeService.Create(context.Background(), composeProject, composeapi.CreateOptions{}) - c.Assert(err, checker.IsNil) - - err = s.dockerComposeService.Restart(context.Background(), composeProject.Name, composeapi.RestartOptions{Services: services}) - c.Assert(err, checker.IsNil) -} - -// composeExec runs the command in the given args in the given compose service container. -// Already running services are not affected (i.e. not stopped). -func (s *BaseSuite) composeExec(c *check.C, service string, args ...string) { - c.Assert(s.composeProjectOptions, check.NotNil) - c.Assert(s.dockerComposeService, check.NotNil) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - _, err = s.dockerComposeService.Exec(context.Background(), composeProject.Name, composeapi.RunOptions{ - Service: service, - Command: args, - Tty: false, - Index: 1, - }) - c.Assert(err, checker.IsNil) +func (s *BaseSuite) composeUp(services ...string) { + for name, con := range s.containers { + if len(services) == 0 || slices.Contains(services, name) { + err := con.Start(context.Background()) + require.NoError(s.T(), err) + } + } } // composeStop stops the given services of the current docker compose project and removes the corresponding containers. -func (s *BaseSuite) composeStop(c *check.C, services ...string) { - c.Assert(s.composeProjectOptions, check.NotNil) - c.Assert(s.dockerComposeService, check.NotNil) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - err = s.dockerComposeService.Stop(context.Background(), composeProject.Name, composeapi.StopOptions{Services: services}) - c.Assert(err, checker.IsNil) - - err = s.dockerComposeService.Remove(context.Background(), composeProject.Name, composeapi.RemoveOptions{}) - c.Assert(err, checker.IsNil) +func (s *BaseSuite) composeStop(services ...string) { + for name, con := range s.containers { + if len(services) == 0 || slices.Contains(services, name) { + timeout := 10 * time.Second + err := con.Stop(context.Background(), &timeout) + require.NoError(s.T(), err) + } + } } // composeDown stops all compose project services and removes the corresponding containers. -func (s *BaseSuite) composeDown(c *check.C) { - c.Assert(s.composeProjectOptions, check.NotNil) - c.Assert(s.dockerComposeService, check.NotNil) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - err = s.dockerComposeService.Down(context.Background(), composeProject.Name, composeapi.DownOptions{}) - c.Assert(err, checker.IsNil) +func (s *BaseSuite) composeDown() { + for _, c := range s.containers { + err := c.Terminate(context.Background()) + require.NoError(s.T(), err) + } + s.containers = map[string]testcontainers.Container{} } func (s *BaseSuite) cmdTraefik(args ...string) (*exec.Cmd, *bytes.Buffer) { cmd := exec.Command(traefikBinary, args...) + + s.T().Cleanup(func() { + s.killCmd(cmd) + }) var out bytes.Buffer cmd.Stdout = &out cmd.Stderr = &out + + err := cmd.Start() + require.NoError(s.T(), err) + return cmd, &out } func (s *BaseSuite) killCmd(cmd *exec.Cmd) { + if cmd.Process == nil { + log.WithoutContext().Error("No process to kill") + return + } err := cmd.Process.Kill() if err != nil { log.WithoutContext().Errorf("Kill: %v", err) @@ -221,15 +336,18 @@ func (s *BaseSuite) killCmd(cmd *exec.Cmd) { time.Sleep(100 * time.Millisecond) } -func (s *BaseSuite) traefikCmd(args ...string) (*exec.Cmd, func(*check.C)) { +func (s *BaseSuite) traefikCmd(args ...string) *exec.Cmd { cmd, out := s.cmdTraefik(args...) - return cmd, func(c *check.C) { - if c.Failed() || *showLog { + + s.T().Cleanup(func() { + if s.T().Failed() || *showLog { s.displayLogK3S() - s.displayLogCompose(c) - s.displayTraefikLog(c, out) + s.displayLogCompose() + s.displayTraefikLog(out) } - } + }) + + return cmd } func (s *BaseSuite) displayLogK3S() { @@ -246,34 +364,33 @@ func (s *BaseSuite) displayLogK3S() { log.WithoutContext().Println() } -func (s *BaseSuite) displayLogCompose(c *check.C) { - if s.dockerComposeService == nil || s.composeProjectOptions == nil { - log.WithoutContext().Infof("%s: No docker compose logs.", c.TestName()) - return +func (s *BaseSuite) displayLogCompose() { + for name, ctn := range s.containers { + readCloser, err := ctn.Logs(context.Background()) + require.NoError(s.T(), err) + for { + b := make([]byte, 1024) + _, err := readCloser.Read(b) + if errors.Is(err, io.EOF) { + break + } + require.NoError(s.T(), err) + + trimLogs := bytes.Trim(bytes.TrimSpace(b), string([]byte{0})) + if len(trimLogs) > 0 { + log.WithoutContext().WithField("container", name).Info(string(trimLogs)) + } + } } - - log.WithoutContext().Infof("%s: docker compose logs: ", c.TestName()) - - logWriter := log.WithoutContext().WriterLevel(log.GetLevel()) - logConsumer := formatter.NewLogConsumer(context.Background(), logWriter, logWriter, false, true, true) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - err = s.dockerComposeService.Logs(context.Background(), composeProject.Name, logConsumer, composeapi.LogOptions{}) - c.Assert(err, checker.IsNil) - - log.WithoutContext().Println() - log.WithoutContext().Println("################################") - log.WithoutContext().Println() } -func (s *BaseSuite) displayTraefikLog(c *check.C, output *bytes.Buffer) { +func (s *BaseSuite) displayTraefikLog(output *bytes.Buffer) { if output == nil || output.Len() == 0 { - log.WithoutContext().Infof("%s: No Traefik logs.", c.TestName()) + log.WithoutContext().Info("No Traefik logs.") } else { - log.WithoutContext().Infof("%s: Traefik logs: ", c.TestName()) - log.WithoutContext().Infof(output.String()) + for _, line := range strings.Split(output.String(), "\n") { + log.WithoutContext().Info(line) + } } } @@ -287,73 +404,47 @@ func (s *BaseSuite) getDockerHost() string { return dockerHost } -func (s *BaseSuite) adaptFile(c *check.C, path string, tempObjects interface{}) string { +func (s *BaseSuite) adaptFile(path string, tempObjects interface{}) string { // Load file tmpl, err := template.ParseFiles(path) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) folder, prefix := filepath.Split(path) tmpFile, err := os.CreateTemp(folder, strings.TrimSuffix(prefix, filepath.Ext(prefix))+"_*"+filepath.Ext(prefix)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer tmpFile.Close() model := structs.Map(tempObjects) model["SelfFilename"] = tmpFile.Name() err = tmpl.ExecuteTemplate(tmpFile, prefix, model) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = tmpFile.Sync() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) + s.T().Cleanup(func() { + os.Remove(tmpFile.Name()) + }) return tmpFile.Name() } -func (s *BaseSuite) getComposeServiceIP(c *check.C, name string) string { - c.Assert(s.composeProjectOptions, check.NotNil) - c.Assert(s.dockerComposeService, check.NotNil) - - composeProject, err := s.composeProjectOptions.ToProject(nil) - c.Assert(err, checker.IsNil) - - filter := filters.NewArgs( - filters.Arg("label", fmt.Sprintf("%s=%s", composeapi.ProjectLabel, composeProject.Name)), - filters.Arg("label", fmt.Sprintf("%s=%s", composeapi.ServiceLabel, name)), - ) - - containers, err := s.dockerClient.ContainerList(context.Background(), dockertypes.ContainerListOptions{Filters: filter}) - c.Assert(err, checker.IsNil) - c.Assert(containers, checker.HasLen, 1) - - networkNames := composeProject.NetworkNames() - c.Assert(networkNames, checker.HasLen, 1) - - network := composeProject.Networks[networkNames[0]] - return containers[0].NetworkSettings.Networks[network.Name].IPAddress -} - -func (s *BaseSuite) getContainerIP(c *check.C, name string) string { - container, err := s.dockerClient.ContainerInspect(context.Background(), name) - c.Assert(err, checker.IsNil) - c.Assert(container.NetworkSettings.Networks, check.NotNil) - - for _, network := range container.NetworkSettings.Networks { - return network.IPAddress +func (s *BaseSuite) getComposeServiceIP(name string) string { + container, ok := s.containers[name] + if !ok { + return "" } - - // Should never happen. - c.Error("No network found") - return "" + ip, err := container.ContainerIP(context.Background()) + if err != nil { + return "" + } + return ip } func withConfigFile(file string) string { return "--configFile=" + file } -// tailscaleNotSuite includes a BaseSuite out of convenience, so we can benefit -// from composeUp et co., but it is not meant to function as a TestSuite per se. -type tailscaleNotSuite struct{ BaseSuite } - // setupVPN starts Tailscale on the corresponding container, and makes it a subnet // router, for all the other containers (whoamis, etc) subsequently started for the // integration tests. @@ -369,101 +460,35 @@ type tailscaleNotSuite struct{ BaseSuite } // "172.0.0.0/8": ["your_tailscale_identity"], // }, // }, -// -// TODO(mpl): we could maybe even move this setup to the Makefile, to start it -// and let it run (forever, or until voluntarily stopped). -func setupVPN(c *check.C, keyFile string) *tailscaleNotSuite { +func (s *BaseSuite) setupVPN(keyFile string) { data, err := os.ReadFile(keyFile) if err != nil { if !errors.Is(err, fs.ErrNotExist) { - log.Fatal(err) + log.WithoutContext().Error(err) } - return nil + + return } authKey := strings.TrimSpace(string(data)) - // TODO: copy and create versions that don't need a check.C? - vpn := &tailscaleNotSuite{} - vpn.createComposeProject(c, "tailscale") - vpn.composeUp(c) + // // TODO: copy and create versions that don't need a check.C? + s.createComposeProject("tailscale") + s.composeUp() time.Sleep(5 * time.Second) // If we ever change the docker subnet in the Makefile, // we need to change this one below correspondingly. - vpn.composeExec(c, "tailscaled", "tailscale", "up", "--authkey="+authKey, "--advertise-routes=172.31.42.0/24") - return vpn + s.composeExec("tailscaled", "tailscale", "up", "--authkey="+authKey, "--advertise-routes=172.31.42.0/24") } -type FakeDockerCLI struct { - client client.APIClient -} +// composeExec runs the command in the given args in the given compose service container. +// Already running services are not affected (i.e. not stopped). +func (s *BaseSuite) composeExec(service string, args ...string) string { + require.Contains(s.T(), s.containers, service) -func (f FakeDockerCLI) Client() client.APIClient { - return f.client -} + _, reader, err := s.containers[service].Exec(context.Background(), args) + require.NoError(s.T(), err) -func (f FakeDockerCLI) In() *streams.In { - return streams.NewIn(os.Stdin) -} + content, err := io.ReadAll(reader) + require.NoError(s.T(), err) -func (f FakeDockerCLI) Out() *streams.Out { - return streams.NewOut(os.Stdout) -} - -func (f FakeDockerCLI) Err() io.Writer { - return streams.NewOut(os.Stderr) -} - -func (f FakeDockerCLI) SetIn(in *streams.In) { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) Apply(ops ...command.DockerCliOption) error { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) ConfigFile() *configfile.ConfigFile { - return &configfile.ConfigFile{} -} - -func (f FakeDockerCLI) ServerInfo() command.ServerInfo { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error) { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) DefaultVersion() string { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) CurrentVersion() string { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) ManifestStore() manifeststore.Store { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) RegistryClient(b bool) registryclient.RegistryClient { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) ContentTrustEnabled() bool { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) BuildKitEnabled() (bool, error) { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) ContextStore() store.Store { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) CurrentContext() string { - panic("implement me if you need me") -} - -func (f FakeDockerCLI) DockerEndpoint() docker.Endpoint { - panic("implement me if you need me") + return string(content) } diff --git a/integration/k8s_test.go b/integration/k8s_test.go index 3762bf2b2..1d50b5a59 100644 --- a/integration/k8s_test.go +++ b/integration/k8s_test.go @@ -7,18 +7,21 @@ import ( "flag" "fmt" "io" + "net" "net/http" "os" "path/filepath" "regexp" + "strings" + "testing" "time" - "github.com/go-check/check" "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" "github.com/traefik/traefik/v2/pkg/log" - checker "github.com/vdemeester/shakers" ) var updateExpected = flag.Bool("update_expected", false, "Update expected files in testdata") @@ -26,25 +29,39 @@ var updateExpected = flag.Bool("update_expected", false, "Update expected files // K8sSuite tests suite. type K8sSuite struct{ BaseSuite } -func (s *K8sSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "k8s") - s.composeUp(c) +func TestK8sSuite(t *testing.T) { + suite.Run(t, new(K8sSuite)) +} + +func (s *K8sSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("k8s") + s.composeUp() abs, err := filepath.Abs("./fixtures/k8s/config.skip/kubeconfig.yaml") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Do(60*time.Second, func() error { _, err := os.Stat(abs) return err }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) + + data, err := os.ReadFile(abs) + require.NoError(s.T(), err) + + content := strings.ReplaceAll(string(data), "https://server:6443", fmt.Sprintf("https://%s", net.JoinHostPort(s.getComposeServiceIP("server"), "6443"))) + + err = os.WriteFile(abs, []byte(content), 0o644) + require.NoError(s.T(), err) err = os.Setenv("KUBECONFIG", abs) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *K8sSuite) TearDownSuite(c *check.C) { - s.composeDown(c) +func (s *K8sSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() generatedFiles := []string{ "./fixtures/k8s/config.skip/kubeconfig.yaml", @@ -62,109 +79,78 @@ func (s *K8sSuite) TearDownSuite(c *check.C) { } } -func (s *K8sSuite) TestIngressConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_default.toml")) - defer display(c) +func (s *K8sSuite) TestIngressConfiguration() { + s.traefikCmd(withConfigFile("fixtures/k8s_default.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-ingress.json", "8080") + s.testConfiguration("testdata/rawdata-ingress.json", "8080") } -func (s *K8sSuite) TestIngressLabelSelector(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_ingress_label_selector.toml")) - defer display(c) +func (s *K8sSuite) TestIngressLabelSelector() { + s.traefikCmd(withConfigFile("fixtures/k8s_ingress_label_selector.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-ingress-label-selector.json", "8080") + s.testConfiguration("testdata/rawdata-ingress-label-selector.json", "8080") } -func (s *K8sSuite) TestCRDConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_crd.toml")) - defer display(c) +func (s *K8sSuite) TestCRDConfiguration() { + s.traefikCmd(withConfigFile("fixtures/k8s_crd.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-crd.json", "8000") + s.testConfiguration("testdata/rawdata-crd.json", "8000") } -func (s *K8sSuite) TestCRDLabelSelector(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_crd_label_selector.toml")) - defer display(c) +func (s *K8sSuite) TestCRDLabelSelector() { + s.traefikCmd(withConfigFile("fixtures/k8s_crd_label_selector.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-crd-label-selector.json", "8000") + s.testConfiguration("testdata/rawdata-crd-label-selector.json", "8000") } -func (s *K8sSuite) TestGatewayConfiguration(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_gateway.toml")) - defer display(c) +func (s *K8sSuite) TestGatewayConfiguration() { + s.traefikCmd(withConfigFile("fixtures/k8s_gateway.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-gateway.json", "8080") + s.testConfiguration("testdata/rawdata-gateway.json", "8080") } -func (s *K8sSuite) TestIngressclass(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/k8s_ingressclass.toml")) - defer display(c) +func (s *K8sSuite) TestIngressclass() { + s.traefikCmd(withConfigFile("fixtures/k8s_ingressclass.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - testConfiguration(c, "testdata/rawdata-ingressclass.json", "8080") + s.testConfiguration("testdata/rawdata-ingressclass.json", "8080") } -func testConfiguration(c *check.C, path, apiPort string) { +func (s *K8sSuite) testConfiguration(path, apiPort string) { err := try.GetRequest("http://127.0.0.1:"+apiPort+"/api/entrypoints", 20*time.Second, try.BodyContains(`"name":"web"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) expectedJSON := filepath.FromSlash(path) if *updateExpected { fi, err := os.Create(expectedJSON) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = fi.Close() - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } var buf bytes.Buffer err = try.GetRequest("http://127.0.0.1:"+apiPort+"/api/rawdata", 1*time.Minute, try.StatusCodeIs(http.StatusOK), matchesConfig(expectedJSON, &buf)) if !*updateExpected { - if err != nil { - c.Error(err) - } + require.NoError(s.T(), err) return } if err != nil { - c.Logf("In file update mode, got expected error: %v", err) + log.WithoutContext().Infof("In file update mode, got expected error: %v", err) } var rtRepr api.RunTimeRepresentation err = json.Unmarshal(buf.Bytes(), &rtRepr) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) newJSON, err := json.MarshalIndent(rtRepr, "", "\t") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = os.WriteFile(expectedJSON, newJSON, 0o644) - c.Assert(err, checker.IsNil) - c.Errorf("We do not want a passing test in file update mode") + require.NoError(s.T(), err) + + s.T().Fatal("We do not want a passing test in file update mode") } func matchesConfig(wantConfig string, buf *bytes.Buffer) try.ResponseCondition { diff --git a/integration/keepalive_test.go b/integration/keepalive_test.go index df3bef575..9c08f4c14 100644 --- a/integration/keepalive_test.go +++ b/integration/keepalive_test.go @@ -5,18 +5,23 @@ import ( "net" "net/http" "net/http/httptest" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" + "github.com/traefik/traefik/v2/pkg/log" ) type KeepAliveSuite struct { BaseSuite } +func TestKeepAliveSuite(t *testing.T) { + suite.Run(t, new(KeepAliveSuite)) +} + type KeepAliveConfig struct { KeepAliveServer string IdleConnTimeout string @@ -27,7 +32,7 @@ type connStateChangeEvent struct { state http.ConnState } -func (s *KeepAliveSuite) TestShouldRespectConfiguredBackendHttpKeepAliveTime(c *check.C) { +func (s *KeepAliveSuite) TestShouldRespectConfiguredBackendHttpKeepAliveTime() { idleTimeout := time.Duration(75) * time.Millisecond connStateChanges := make(chan connStateChangeEvent) @@ -59,18 +64,18 @@ func (s *KeepAliveSuite) TestShouldRespectConfiguredBackendHttpKeepAliveTime(c * case <-noMoreRequests: moreRequestsExpected = false case <-maxWaitTimeExceeded: - c.Logf("timeout waiting for all connections to close, waited for %v, configured idle timeout was %v", maxWaitDuration, idleTimeout) - c.Fail() + log.WithoutContext().Infof("timeout waiting for all connections to close, waited for %v, configured idle timeout was %v", maxWaitDuration, idleTimeout) + s.T().Fail() close(completed) return } } - c.Check(connCount, checker.Equals, 1) + require.Equal(s.T(), 1, connCount) for _, idlePeriod := range idlePeriodLengthMap { // Our method of measuring the actual idle period is not precise, so allow some sub-ms deviation - c.Check(math.Round(idlePeriod.Seconds()), checker.LessOrEqualThan, idleTimeout.Seconds()) + require.LessOrEqual(s.T(), math.Round(idlePeriod.Seconds()), idleTimeout.Seconds()) } close(completed) @@ -87,22 +92,16 @@ func (s *KeepAliveSuite) TestShouldRespectConfiguredBackendHttpKeepAliveTime(c * defer server.Close() config := KeepAliveConfig{KeepAliveServer: server.URL, IdleConnTimeout: idleTimeout.String()} - file := s.adaptFile(c, "fixtures/timeout/keepalive.toml", config) + file := s.adaptFile("fixtures/timeout/keepalive.toml", config) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Check(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Duration(1)*time.Second, try.StatusCodeIs(200), try.BodyContains("PathPrefix(`/keepalive`)")) - c.Check(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Duration(1)*time.Second, try.StatusCodeIs(200), try.BodyContains("PathPrefix(`/keepalive`)")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/keepalive", time.Duration(1)*time.Second, try.StatusCodeIs(200)) - c.Check(err, checker.IsNil) + require.NoError(s.T(), err) close(noMoreRequests) <-completed diff --git a/integration/log_rotation_test.go b/integration/log_rotation_test.go index 27cc6f370..ebabcfd5b 100644 --- a/integration/log_rotation_test.go +++ b/integration/log_rotation_test.go @@ -9,12 +9,14 @@ import ( "os" "strings" "syscall" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/log" - checker "github.com/vdemeester/shakers" ) const ( @@ -25,13 +27,23 @@ const ( // Log rotation integration test suite. type LogRotationSuite struct{ BaseSuite } -func (s *LogRotationSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "access_log") - s.composeUp(c) +func TestLogRorationSuite(t *testing.T) { + suite.Run(t, new(LogRotationSuite)) } -func (s *LogRotationSuite) TearDownSuite(c *check.C) { - s.composeDown(c) +func (s *LogRotationSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + os.Remove(traefikTestAccessLogFile) + os.Remove(traefikTestLogFile) + os.Remove(traefikTestAccessLogFileRotated) + + s.createComposeProject("access_log") + s.composeUp() +} + +func (s *LogRotationSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() generatedFiles := []string{ traefikTestLogFile, @@ -47,126 +59,116 @@ func (s *LogRotationSuite) TearDownSuite(c *check.C) { } } -func (s *LogRotationSuite) TestAccessLogRotation(c *check.C) { +func (s *LogRotationSuite) TestAccessLogRotation() { // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/access_log_config.toml")) - defer display(c) - defer displayTraefikLogFile(c, traefikTestLogFile) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + cmd, _ := s.cmdTraefik(withConfigFile("fixtures/access_log_config.toml")) + defer s.displayTraefikLogFile(traefikTestLogFile) // Verify Traefik started ok - verifyEmptyErrorLog(c, "traefik.log") + s.verifyEmptyErrorLog("traefik.log") - waitForTraefik(c, "server1") + s.waitForTraefik("server1") // Make some requests req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "frontend1.docker.local" err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Rename access log err = os.Rename(traefikTestAccessLogFile, traefikTestAccessLogFileRotated) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // in the midst of the requests, issue SIGUSR1 signal to server process err = cmd.Process.Signal(syscall.SIGUSR1) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // continue issuing requests err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.Request(req, 500*time.Millisecond, try.StatusCodeIs(http.StatusOK), try.HasBody()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Verify access.log.rotated output as expected - logAccessLogFile(c, traefikTestAccessLogFileRotated) - lineCount := verifyLogLines(c, traefikTestAccessLogFileRotated, 0, true) - c.Assert(lineCount, checker.GreaterOrEqualThan, 1) + s.logAccessLogFile(traefikTestAccessLogFileRotated) + lineCount := s.verifyLogLines(traefikTestAccessLogFileRotated, 0, true) + assert.GreaterOrEqual(s.T(), lineCount, 1) // make sure that the access log file is at least created before we do assertions on it err = try.Do(1*time.Second, func() error { _, err := os.Stat(traefikTestAccessLogFile) return err }) - c.Assert(err, checker.IsNil, check.Commentf("access log file was not created in time")) + assert.NoError(s.T(), err, "access log file was not created in time") // Verify access.log output as expected - logAccessLogFile(c, traefikTestAccessLogFile) - lineCount = verifyLogLines(c, traefikTestAccessLogFile, lineCount, true) - c.Assert(lineCount, checker.Equals, 3) + s.logAccessLogFile(traefikTestAccessLogFile) + lineCount = s.verifyLogLines(traefikTestAccessLogFile, lineCount, true) + assert.Equal(s.T(), 3, lineCount) - verifyEmptyErrorLog(c, traefikTestLogFile) + s.verifyEmptyErrorLog(traefikTestLogFile) } -func (s *LogRotationSuite) TestTraefikLogRotation(c *check.C) { +func (s *LogRotationSuite) TestTraefikLogRotation() { // Start Traefik - cmd, display := s.traefikCmd(withConfigFile("fixtures/traefik_log_config.toml")) - defer display(c) - defer displayTraefikLogFile(c, traefikTestLogFile) + cmd := s.traefikCmd(withConfigFile("fixtures/traefik_log_config.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - waitForTraefik(c, "server1") + s.waitForTraefik("server1") // Rename traefik log - err = os.Rename(traefikTestLogFile, traefikTestLogFileRotated) - c.Assert(err, checker.IsNil) + err := os.Rename(traefikTestLogFile, traefikTestLogFileRotated) + require.NoError(s.T(), err) // issue SIGUSR1 signal to server process err = cmd.Process.Signal(syscall.SIGUSR1) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = cmd.Process.Signal(syscall.SIGTERM) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Allow time for switch to be processed err = try.Do(3*time.Second, func() error { _, err = os.Stat(traefikTestLogFile) return err }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // we have at least 6 lines in traefik.log.rotated - lineCount := verifyLogLines(c, traefikTestLogFileRotated, 0, false) + lineCount := s.verifyLogLines(traefikTestLogFileRotated, 0, false) // GreaterOrEqualThan used to ensure test doesn't break // If more log entries are output on startup - c.Assert(lineCount, checker.GreaterOrEqualThan, 5) + assert.GreaterOrEqual(s.T(), lineCount, 5) // Verify traefik.log output as expected - lineCount = verifyLogLines(c, traefikTestLogFile, lineCount, false) - c.Assert(lineCount, checker.GreaterOrEqualThan, 7) + lineCount = s.verifyLogLines(traefikTestLogFile, lineCount, false) + assert.GreaterOrEqual(s.T(), lineCount, 7) } -func logAccessLogFile(c *check.C, fileName string) { +func (s *LogRotationSuite) logAccessLogFile(fileName string) { output, err := os.ReadFile(fileName) - c.Assert(err, checker.IsNil) - c.Logf("Contents of file %s\n%s", fileName, string(output)) + require.NoError(s.T(), err) + log.WithoutContext().Infof("Contents of file %s\n%s", fileName, string(output)) } -func verifyEmptyErrorLog(c *check.C, name string) { +func (s *LogRotationSuite) verifyEmptyErrorLog(name string) { err := try.Do(5*time.Second, func() error { traefikLog, e2 := os.ReadFile(name) if e2 != nil { return e2 } - c.Assert(string(traefikLog), checker.HasLen, 0) + assert.Empty(s.T(), string(traefikLog)) + return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func verifyLogLines(c *check.C, fileName string, countInit int, accessLog bool) int { +func (s *LogRotationSuite) verifyLogLines(fileName string, countInit int, accessLog bool) int { rotated, err := os.Open(fileName) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) rotatedLog := bufio.NewScanner(rotated) count := countInit for rotatedLog.Scan() { @@ -174,7 +176,7 @@ func verifyLogLines(c *check.C, fileName string, countInit int, accessLog bool) if accessLog { if len(line) > 0 { if !strings.Contains(line, "/api/rawdata") { - CheckAccessLogFormat(c, line, count) + s.CheckAccessLogFormat(line, count) count++ } } diff --git a/integration/marathon15_test.go b/integration/marathon15_test.go index 1f559addb..255aba819 100644 --- a/integration/marathon15_test.go +++ b/integration/marathon15_test.go @@ -2,13 +2,13 @@ package integration import ( "net/http" - "os" + "testing" "time" "github.com/gambol99/go-marathon" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) // Marathon test suites. @@ -17,42 +17,46 @@ type MarathonSuite15 struct { marathonURL string } -func (s *MarathonSuite15) SetUpSuite(c *check.C) { - s.createComposeProject(c, "marathon15") - s.composeUp(c) +func TestMarathonSuite15(t *testing.T) { + suite.Run(t, new(MarathonSuite)) +} - s.marathonURL = "http://" + s.getComposeServiceIP(c, containerNameMarathon) + ":8080" +func (s *MarathonSuite15) SetUpSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("marathon15") + s.composeUp() + + s.marathonURL = "http://" + s.getComposeServiceIP(containerNameMarathon) + ":8080" // Wait for Marathon readiness prior to creating the client so that we // don't run into the "all cluster members down" state right from the // start. err := try.GetRequest(s.marathonURL+"/v2/leader", 1*time.Minute, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *MarathonSuite15) TestConfigurationUpdate(c *check.C) { - c.Skip("doesn't work") +func (s *MarathonSuite15) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *MarathonSuite15) TestConfigurationUpdate() { + s.T().Skip("doesn't work") // Start Traefik. - file := s.adaptFile(c, "fixtures/marathon/simple.toml", struct { + file := s.adaptFile("fixtures/marathon/simple.toml", struct { MarathonURL string }{s.marathonURL}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Wait for Traefik to turn ready. - err = try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Prepare Marathon client. config := marathon.NewDefaultConfig() config.URL = s.marathonURL client, err := marathon.NewClient(config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Create test application to be deployed. app := marathon.NewDockerApplication(). @@ -68,11 +72,11 @@ func (s *MarathonSuite15) TestConfigurationUpdate(c *check.C) { *app.Networks = append(*app.Networks, *marathon.NewBridgePodNetwork()) // Deploy the test application. - deployApplication(c, client, app) + s.deployApplication(client, app) // Query application via Traefik. err = try.GetRequest("http://127.0.0.1:8000/service", 30*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Create test application with services to be deployed. app = marathon.NewDockerApplication(). @@ -88,9 +92,9 @@ func (s *MarathonSuite15) TestConfigurationUpdate(c *check.C) { *app.Networks = append(*app.Networks, *marathon.NewBridgePodNetwork()) // Deploy the test application. - deployApplication(c, client, app) + s.deployApplication(client, app) // Query application via Traefik. err = try.GetRequest("http://127.0.0.1:8000/app", 30*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/marathon_test.go b/integration/marathon_test.go index 91ff4519d..c26c01780 100644 --- a/integration/marathon_test.go +++ b/integration/marathon_test.go @@ -2,13 +2,13 @@ package integration import ( "net/http" - "os" + "testing" "time" "github.com/gambol99/go-marathon" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) const containerNameMarathon = "marathon" @@ -19,50 +19,55 @@ type MarathonSuite struct { marathonURL string } -func (s *MarathonSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "marathon") - s.composeUp(c) +func TestMarathonSuite(t *testing.T) { + suite.Run(t, new(MarathonSuite)) +} - s.marathonURL = "http://" + s.getComposeServiceIP(c, containerNameMarathon) + ":8080" +func (s *MarathonSuite) SetUpSuite() { + s.BaseSuite.SetupSuite() + s.createComposeProject("marathon") + s.composeUp() + + s.marathonURL = "http://" + s.getComposeServiceIP(containerNameMarathon) + ":8080" // Wait for Marathon readiness prior to creating the client so that we // don't run into the "all cluster members down" state right from the // start. err := try.GetRequest(s.marathonURL+"/v2/leader", 1*time.Minute, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func deployApplication(c *check.C, client marathon.Marathon, application *marathon.Application) { +func (s *MarathonSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *BaseSuite) deployApplication(client marathon.Marathon, application *marathon.Application) { deploy, err := client.UpdateApplication(application, false) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Wait for deployment to complete. - c.Assert(client.WaitOnDeployment(deploy.DeploymentID, 1*time.Minute), checker.IsNil) + err = client.WaitOnDeployment(deploy.DeploymentID, 1*time.Minute) + require.NoError(s.T(), err) } -func (s *MarathonSuite) TestConfigurationUpdate(c *check.C) { - c.Skip("doesn't work") +func (s *MarathonSuite) TestConfigurationUpdate() { + s.T().Skip("doesn't work") // Start Traefik. - file := s.adaptFile(c, "fixtures/marathon/simple.toml", struct { + file := s.adaptFile("fixtures/marathon/simple.toml", struct { MarathonURL string }{s.marathonURL}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Wait for Traefik to turn ready. - err = try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Prepare Marathon client. config := marathon.NewDefaultConfig() config.URL = s.marathonURL client, err := marathon.NewClient(config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Create test application to be deployed. app := marathon.NewDockerApplication(). @@ -75,11 +80,11 @@ func (s *MarathonSuite) TestConfigurationUpdate(c *check.C) { Container("traefik/whoami") // Deploy the test application. - deployApplication(c, client, app) + s.deployApplication(client, app) // Query application via Traefik. err = try.GetRequest("http://127.0.0.1:8000/service", 30*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Create test application with services to be deployed. app = marathon.NewDockerApplication(). @@ -92,9 +97,9 @@ func (s *MarathonSuite) TestConfigurationUpdate(c *check.C) { Container("traefik/whoami") // Deploy the test application. - deployApplication(c, client, app) + s.deployApplication(client, app) // Query application via Traefik. err = try.GetRequest("http://127.0.0.1:8000/app", 30*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/proxy_protocol_test.go b/integration/proxy_protocol_test.go index 7ed8300af..35d694f65 100644 --- a/integration/proxy_protocol_test.go +++ b/integration/proxy_protocol_test.go @@ -1,103 +1,138 @@ package integration import ( - "net/http" - "os" + "bufio" + "net" + "testing" "time" - "github.com/go-check/check" + "github.com/pires/go-proxyproto" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type ProxyProtocolSuite struct { BaseSuite - gatewayIP string - haproxyIP string - whoamiIP string + whoamiIP string } -func (s *ProxyProtocolSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "proxy-protocol") - s.composeUp(c) - - s.gatewayIP = s.getContainerIP(c, "traefik") - s.haproxyIP = s.getComposeServiceIP(c, "haproxy") - s.whoamiIP = s.getComposeServiceIP(c, "whoami") +func TestProxyProtocolSuite(t *testing.T) { + suite.Run(t, new(ProxyProtocolSuite)) } -func (s *ProxyProtocolSuite) TestProxyProtocolTrusted(c *check.C) { - file := s.adaptFile(c, "fixtures/proxy-protocol/with.toml", struct { +func (s *ProxyProtocolSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("proxy-protocol") + s.composeUp() + + s.whoamiIP = s.getComposeServiceIP("whoami") +} + +func (s *ProxyProtocolSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *ProxyProtocolSuite) TestProxyProtocolTrusted() { + file := s.adaptFile("fixtures/proxy-protocol/proxy-protocol.toml", struct { HaproxyIP string WhoamiIP string - }{HaproxyIP: s.haproxyIP, WhoamiIP: s.whoamiIP}) - defer os.Remove(file) + }{WhoamiIP: s.whoamiIP}) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://"+s.haproxyIP+"/whoami", 1*time.Second, - try.StatusCodeIs(http.StatusOK), - try.BodyContains("X-Forwarded-For: "+s.gatewayIP)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/whoami", 10*time.Second) + require.NoError(s.T(), err) + + content, err := proxyProtoRequest("127.0.0.1:8000", 1) + require.NoError(s.T(), err) + assert.Contains(s.T(), content, "X-Forwarded-For: 1.2.3.4") + + content, err = proxyProtoRequest("127.0.0.1:8000", 2) + require.NoError(s.T(), err) + assert.Contains(s.T(), content, "X-Forwarded-For: 1.2.3.4") } -func (s *ProxyProtocolSuite) TestProxyProtocolV2Trusted(c *check.C) { - file := s.adaptFile(c, "fixtures/proxy-protocol/with.toml", struct { +func (s *ProxyProtocolSuite) TestProxyProtocolNotTrusted() { + file := s.adaptFile("fixtures/proxy-protocol/proxy-protocol.toml", struct { HaproxyIP string WhoamiIP string - }{HaproxyIP: s.haproxyIP, WhoamiIP: s.whoamiIP}) - defer os.Remove(file) + }{WhoamiIP: s.whoamiIP}) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://"+s.haproxyIP+":81/whoami", 1*time.Second, - try.StatusCodeIs(http.StatusOK), - try.BodyContains("X-Forwarded-For: "+s.gatewayIP)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:9000/whoami", 10*time.Second) + require.NoError(s.T(), err) + + content, err := proxyProtoRequest("127.0.0.1:9000", 1) + require.NoError(s.T(), err) + assert.Contains(s.T(), content, "X-Forwarded-For: 127.0.0.1") + + content, err = proxyProtoRequest("127.0.0.1:9000", 2) + require.NoError(s.T(), err) + assert.Contains(s.T(), content, "X-Forwarded-For: 127.0.0.1") } -func (s *ProxyProtocolSuite) TestProxyProtocolNotTrusted(c *check.C) { - file := s.adaptFile(c, "fixtures/proxy-protocol/without.toml", struct { - HaproxyIP string - WhoamiIP string - }{HaproxyIP: s.haproxyIP, WhoamiIP: s.whoamiIP}) - defer os.Remove(file) +func proxyProtoRequest(address string, version byte) (string, error) { + // Open a TCP connection to the server + conn, err := net.Dial("tcp", address) + if err != nil { + return "", err + } + defer conn.Close() - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + // Create a Proxy Protocol header with v1 + proxyHeader := &proxyproto.Header{ + Version: version, + Command: proxyproto.PROXY, + TransportProtocol: proxyproto.TCPv4, + DestinationAddr: &net.TCPAddr{ + IP: net.ParseIP("127.0.0.1"), + Port: 8000, + }, + SourceAddr: &net.TCPAddr{ + IP: net.ParseIP("1.2.3.4"), + Port: 62541, + }, + } - err = try.GetRequest("http://"+s.haproxyIP+"/whoami", 1*time.Second, - try.StatusCodeIs(http.StatusOK), - try.BodyContains("X-Forwarded-For: "+s.haproxyIP)) - c.Assert(err, checker.IsNil) -} - -func (s *ProxyProtocolSuite) TestProxyProtocolV2NotTrusted(c *check.C) { - file := s.adaptFile(c, "fixtures/proxy-protocol/without.toml", struct { - HaproxyIP string - WhoamiIP string - }{HaproxyIP: s.haproxyIP, WhoamiIP: s.whoamiIP}) - defer os.Remove(file) - - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://"+s.haproxyIP+":81/whoami", 1*time.Second, - try.StatusCodeIs(http.StatusOK), - try.BodyContains("X-Forwarded-For: "+s.haproxyIP)) - c.Assert(err, checker.IsNil) + // After the connection was created write the proxy headers first + _, err = proxyHeader.WriteTo(conn) + if err != nil { + return "", err + } + + // Create an HTTP request + request := "GET /whoami HTTP/1.1\r\n" + + "Host: 127.0.0.1\r\n" + + "Connection: close\r\n" + + "\r\n" + + // Write the HTTP request to the TCP connection + writer := bufio.NewWriter(conn) + _, err = writer.WriteString(request) + if err != nil { + return "", err + } + + // Flush the buffer to ensure the request is sent + err = writer.Flush() + if err != nil { + return "", err + } + + // Read the response from the server + var content string + scanner := bufio.NewScanner(conn) + for scanner.Scan() { + content += scanner.Text() + "\n" + } + + if scanner.Err() != nil { + return "", err + } + + return content, nil } diff --git a/integration/ratelimit_test.go b/integration/ratelimit_test.go index 5d45e8086..95aa3b297 100644 --- a/integration/ratelimit_test.go +++ b/integration/ratelimit_test.go @@ -2,12 +2,12 @@ package integration import ( "net/http" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type RateLimitSuite struct { @@ -15,33 +15,38 @@ type RateLimitSuite struct { ServerIP string } -func (s *RateLimitSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "ratelimit") - s.composeUp(c) - - s.ServerIP = s.getComposeServiceIP(c, "whoami1") +func TestRateLimitSuite(t *testing.T) { + suite.Run(t, new(RateLimitSuite)) } -func (s *RateLimitSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/ratelimit/simple.toml", struct { +func (s *RateLimitSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("ratelimit") + s.composeUp() + + s.ServerIP = s.getComposeServiceIP("whoami1") +} + +func (s *RateLimitSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *RateLimitSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/ratelimit/simple.toml", struct { Server1 string }{s.ServerIP}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("ratelimit")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("ratelimit")) + require.NoError(s.T(), err) start := time.Now() count := 0 for { err = try.GetRequest("http://127.0.0.1:8081/", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) count++ if count > 100 { break @@ -50,6 +55,6 @@ func (s *RateLimitSuite) TestSimpleConfiguration(c *check.C) { stop := time.Now() elapsed := stop.Sub(start) if elapsed < time.Second*99/100 { - c.Fatalf("requests throughput was too fast wrt to rate limiting: 100 requests in %v", elapsed) + s.T().Fatalf("requests throughput was too fast wrt to rate limiting: 100 requests in %v", elapsed) } } diff --git a/integration/redis_sentinel_test.go b/integration/redis_sentinel_test.go new file mode 100644 index 000000000..2dfc1d72f --- /dev/null +++ b/integration/redis_sentinel_test.go @@ -0,0 +1,201 @@ +package integration + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "net" + "net/http" + "os" + "path/filepath" + "strings" + "testing" + "text/template" + "time" + + "github.com/fatih/structs" + "github.com/kvtools/redis" + "github.com/kvtools/valkeyrie" + "github.com/kvtools/valkeyrie/store" + "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" + "github.com/traefik/traefik/v2/integration/try" + "github.com/traefik/traefik/v2/pkg/api" + "github.com/traefik/traefik/v2/pkg/log" +) + +// Redis test suites. +type RedisSentinelSuite struct { + BaseSuite + kvClient store.Store + redisEndpoints []string +} + +func TestRedisSentinelSuite(t *testing.T) { + suite.Run(t, new(RedisSentinelSuite)) +} + +func (s *RedisSentinelSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.setupSentinelConfiguration([]string{"26379", "26379", "26379"}) + + s.createComposeProject("redis_sentinel") + s.composeUp() + + s.redisEndpoints = []string{ + net.JoinHostPort(s.getComposeServiceIP("sentinel1"), "26379"), + net.JoinHostPort(s.getComposeServiceIP("sentinel2"), "26379"), + net.JoinHostPort(s.getComposeServiceIP("sentinel3"), "26379"), + } + kv, err := valkeyrie.NewStore( + context.Background(), + redis.StoreName, + s.redisEndpoints, + &redis.Config{ + Sentinel: &redis.Sentinel{ + MasterName: "mymaster", + }, + }, + ) + require.NoError(s.T(), err, "Cannot create store redis") + s.kvClient = kv + + // wait for redis + err = try.Do(60*time.Second, try.KVExists(kv, "test")) + require.NoError(s.T(), err) +} + +func (s *RedisSentinelSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() + + for _, filename := range []string{"sentinel1.conf", "sentinel2.conf", "sentinel3.conf"} { + _ = os.Remove(filepath.Join(".", "resources", "compose", "config", filename)) + } +} + +func (s *RedisSentinelSuite) setupSentinelConfiguration(ports []string) { + for i, port := range ports { + templateValue := struct{ SentinelPort string }{SentinelPort: port} + + // Load file + templateFile := "resources/compose/config/sentinel_template.conf" + tmpl, err := template.ParseFiles(templateFile) + require.NoError(s.T(), err) + + folder, prefix := filepath.Split(templateFile) + + fileName := fmt.Sprintf("%s/sentinel%d.conf", folder, i+1) + tmpFile, err := os.Create(fileName) + require.NoError(s.T(), err) + defer tmpFile.Close() + + model := structs.Map(templateValue) + model["SelfFilename"] = tmpFile.Name() + + err = tmpl.ExecuteTemplate(tmpFile, prefix, model) + require.NoError(s.T(), err) + + err = tmpFile.Sync() + require.NoError(s.T(), err) + } +} + +func (s *RedisSentinelSuite) TestSentinelConfiguration() { + file := s.adaptFile("fixtures/redis/sentinel.toml", struct{ RedisAddress string }{ + RedisAddress: strings.Join(s.redisEndpoints, `","`), + }) + + data := map[string]string{ + "traefik/http/routers/Router0/entryPoints/0": "web", + "traefik/http/routers/Router0/middlewares/0": "compressor", + "traefik/http/routers/Router0/middlewares/1": "striper", + "traefik/http/routers/Router0/service": "simplesvc", + "traefik/http/routers/Router0/rule": "Host(`kv1.localhost`)", + "traefik/http/routers/Router0/priority": "42", + "traefik/http/routers/Router0/tls": "true", + + "traefik/http/routers/Router1/rule": "Host(`kv2.localhost`)", + "traefik/http/routers/Router1/priority": "42", + "traefik/http/routers/Router1/tls/domains/0/main": "aaa.localhost", + "traefik/http/routers/Router1/tls/domains/0/sans/0": "aaa.aaa.localhost", + "traefik/http/routers/Router1/tls/domains/0/sans/1": "bbb.aaa.localhost", + "traefik/http/routers/Router1/tls/domains/1/main": "bbb.localhost", + "traefik/http/routers/Router1/tls/domains/1/sans/0": "aaa.bbb.localhost", + "traefik/http/routers/Router1/tls/domains/1/sans/1": "bbb.bbb.localhost", + "traefik/http/routers/Router1/entryPoints/0": "web", + "traefik/http/routers/Router1/service": "simplesvc", + + "traefik/http/services/simplesvc/loadBalancer/servers/0/url": "http://10.0.1.1:8888", + "traefik/http/services/simplesvc/loadBalancer/servers/1/url": "http://10.0.1.1:8889", + + "traefik/http/services/srvcA/loadBalancer/servers/0/url": "http://10.0.1.2:8888", + "traefik/http/services/srvcA/loadBalancer/servers/1/url": "http://10.0.1.2:8889", + + "traefik/http/services/srvcB/loadBalancer/servers/0/url": "http://10.0.1.3:8888", + "traefik/http/services/srvcB/loadBalancer/servers/1/url": "http://10.0.1.3:8889", + + "traefik/http/services/mirror/mirroring/service": "simplesvc", + "traefik/http/services/mirror/mirroring/mirrors/0/name": "srvcA", + "traefik/http/services/mirror/mirroring/mirrors/0/percent": "42", + "traefik/http/services/mirror/mirroring/mirrors/1/name": "srvcB", + "traefik/http/services/mirror/mirroring/mirrors/1/percent": "42", + + "traefik/http/services/Service03/weighted/services/0/name": "srvcA", + "traefik/http/services/Service03/weighted/services/0/weight": "42", + "traefik/http/services/Service03/weighted/services/1/name": "srvcB", + "traefik/http/services/Service03/weighted/services/1/weight": "42", + + "traefik/http/middlewares/compressor/compress": "true", + "traefik/http/middlewares/striper/stripPrefix/prefixes/0": "foo", + "traefik/http/middlewares/striper/stripPrefix/prefixes/1": "bar", + } + + for k, v := range data { + err := s.kvClient.Put(context.Background(), k, []byte(v), nil) + require.NoError(s.T(), err) + } + + s.traefikCmd(withConfigFile(file)) + + // wait for traefik + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + try.BodyContains(`"striper@redis":`, `"compressor@redis":`, `"srvcA@redis":`, `"srvcB@redis":`), + ) + require.NoError(s.T(), err) + + resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") + require.NoError(s.T(), err) + + var obtained api.RunTimeRepresentation + err = json.NewDecoder(resp.Body).Decode(&obtained) + require.NoError(s.T(), err) + got, err := json.MarshalIndent(obtained, "", " ") + require.NoError(s.T(), err) + + expectedJSON := filepath.FromSlash("testdata/rawdata-redis.json") + + if *updateExpected { + err = os.WriteFile(expectedJSON, got, 0o666) + require.NoError(s.T(), err) + } + + expected, err := os.ReadFile(expectedJSON) + require.NoError(s.T(), err) + + if !bytes.Equal(expected, got) { + diff := difflib.UnifiedDiff{ + FromFile: "Expected", + A: difflib.SplitLines(string(expected)), + ToFile: "Got", + B: difflib.SplitLines(string(got)), + Context: 3, + } + + text, err := difflib.GetUnifiedDiffString(diff) + require.NoError(s.T(), err) + log.WithoutContext().Info(text) + } +} diff --git a/integration/redis_test.go b/integration/redis_test.go index 6407a3a35..3faaffec3 100644 --- a/integration/redis_test.go +++ b/integration/redis_test.go @@ -4,26 +4,22 @@ import ( "bytes" "context" "encoding/json" - "errors" - "fmt" - "io/fs" "net" "net/http" "os" "path/filepath" "strings" - "text/template" + "testing" "time" - "github.com/fatih/structs" - "github.com/go-check/check" "github.com/kvtools/redis" "github.com/kvtools/valkeyrie" "github.com/kvtools/valkeyrie/store" "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" - checker "github.com/vdemeester/shakers" ) // Redis test suites. @@ -33,23 +29,18 @@ type RedisSuite struct { redisEndpoints []string } -func (s *RedisSuite) TearDownSuite(c *check.C) { - s.composeDown(c) - - for _, filename := range []string{"sentinel1.conf", "sentinel2.conf", "sentinel3.conf"} { - err := os.Remove(filepath.Join(".", "resources", "compose", "config", filename)) - if err != nil && !errors.Is(err, fs.ErrNotExist) { - c.Fatal("unable to clean configuration file for sentinel: ", err) - } - } +func TestRedisSuite(t *testing.T) { + suite.Run(t, new(RedisSuite)) } -func (s *RedisSuite) setupStore(c *check.C) { - s.createComposeProject(c, "redis") - s.composeUp(c) +func (s *RedisSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("redis") + s.composeUp() s.redisEndpoints = []string{} - s.redisEndpoints = append(s.redisEndpoints, net.JoinHostPort(s.getComposeServiceIP(c, "redis"), "6379")) + s.redisEndpoints = append(s.redisEndpoints, net.JoinHostPort(s.getComposeServiceIP("redis"), "6379")) kv, err := valkeyrie.NewStore( context.Background(), @@ -57,23 +48,23 @@ func (s *RedisSuite) setupStore(c *check.C) { s.redisEndpoints, &redis.Config{}, ) - if err != nil { - c.Fatal("Cannot create store redis: ", err) - } + require.NoError(s.T(), err, "Cannot create store redis") + s.kvClient = kv // wait for redis err = try.Do(60*time.Second, try.KVExists(kv, "test")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *RedisSuite) TestSimpleConfiguration(c *check.C) { - s.setupStore(c) +func (s *RedisSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} - file := s.adaptFile(c, "fixtures/redis/simple.toml", struct{ RedisAddress string }{ +func (s *RedisSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/redis/simple.toml", struct{ RedisAddress string }{ RedisAddress: strings.Join(s.redisEndpoints, ","), }) - defer os.Remove(file) data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", @@ -123,39 +114,35 @@ func (s *RedisSuite) TestSimpleConfiguration(c *check.C) { for k, v := range data { err := s.kvClient.Put(context.Background(), k, []byte(v), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains(`"striper@redis":`, `"compressor@redis":`, `"srvcA@redis":`, `"srvcB@redis":`), ) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var obtained api.RunTimeRepresentation err = json.NewDecoder(resp.Body).Decode(&obtained) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) got, err := json.MarshalIndent(obtained, "", " ") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) expectedJSON := filepath.FromSlash("testdata/rawdata-redis.json") if *updateExpected { err = os.WriteFile(expectedJSON, got, 0o666) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } expected, err := os.ReadFile(expectedJSON) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if !bytes.Equal(expected, got) { diff := difflib.UnifiedDiff{ @@ -167,171 +154,6 @@ func (s *RedisSuite) TestSimpleConfiguration(c *check.C) { } text, err := difflib.GetUnifiedDiffString(diff) - c.Assert(err, checker.IsNil) - c.Error(text) - } -} - -func (s *RedisSuite) setupSentinelStore(c *check.C) { - s.setupSentinelConfiguration(c, []string{"26379", "36379", "46379"}) - - s.createComposeProject(c, "redis_sentinel") - s.composeUp(c) - - s.redisEndpoints = []string{ - net.JoinHostPort(s.getComposeServiceIP(c, "sentinel1"), "26379"), - net.JoinHostPort(s.getComposeServiceIP(c, "sentinel2"), "36379"), - net.JoinHostPort(s.getComposeServiceIP(c, "sentinel3"), "46379"), - } - - kv, err := valkeyrie.NewStore( - context.Background(), - redis.StoreName, - s.redisEndpoints, - &redis.Config{ - Sentinel: &redis.Sentinel{ - MasterName: "mymaster", - }, - }, - ) - if err != nil { - c.Fatal("Cannot create store redis sentinel") - } - s.kvClient = kv - - // wait for redis - err = try.Do(60*time.Second, try.KVExists(kv, "test")) - c.Assert(err, checker.IsNil) -} - -func (s *RedisSuite) setupSentinelConfiguration(c *check.C, ports []string) { - for i, port := range ports { - templateValue := struct{ SentinelPort string }{SentinelPort: port} - - // Load file - templateFile := "resources/compose/config/sentinel_template.conf" - tmpl, err := template.ParseFiles(templateFile) - c.Assert(err, checker.IsNil) - - folder, prefix := filepath.Split(templateFile) - - fileName := fmt.Sprintf("%s/sentinel%d.conf", folder, i+1) - tmpFile, err := os.Create(fileName) - c.Assert(err, checker.IsNil) - defer tmpFile.Close() - - model := structs.Map(templateValue) - model["SelfFilename"] = tmpFile.Name() - - err = tmpl.ExecuteTemplate(tmpFile, prefix, model) - c.Assert(err, checker.IsNil) - - err = tmpFile.Sync() - c.Assert(err, checker.IsNil) - } -} - -func (s *RedisSuite) TestSentinelConfiguration(c *check.C) { - s.setupSentinelStore(c) - - file := s.adaptFile(c, "fixtures/redis/sentinel.toml", struct{ RedisAddress string }{ - RedisAddress: strings.Join(s.redisEndpoints, `","`), - }) - defer os.Remove(file) - - data := map[string]string{ - "traefik/http/routers/Router0/entryPoints/0": "web", - "traefik/http/routers/Router0/middlewares/0": "compressor", - "traefik/http/routers/Router0/middlewares/1": "striper", - "traefik/http/routers/Router0/service": "simplesvc", - "traefik/http/routers/Router0/rule": "Host(`kv1.localhost`)", - "traefik/http/routers/Router0/priority": "42", - "traefik/http/routers/Router0/tls": "true", - - "traefik/http/routers/Router1/rule": "Host(`kv2.localhost`)", - "traefik/http/routers/Router1/priority": "42", - "traefik/http/routers/Router1/tls/domains/0/main": "aaa.localhost", - "traefik/http/routers/Router1/tls/domains/0/sans/0": "aaa.aaa.localhost", - "traefik/http/routers/Router1/tls/domains/0/sans/1": "bbb.aaa.localhost", - "traefik/http/routers/Router1/tls/domains/1/main": "bbb.localhost", - "traefik/http/routers/Router1/tls/domains/1/sans/0": "aaa.bbb.localhost", - "traefik/http/routers/Router1/tls/domains/1/sans/1": "bbb.bbb.localhost", - "traefik/http/routers/Router1/entryPoints/0": "web", - "traefik/http/routers/Router1/service": "simplesvc", - - "traefik/http/services/simplesvc/loadBalancer/servers/0/url": "http://10.0.1.1:8888", - "traefik/http/services/simplesvc/loadBalancer/servers/1/url": "http://10.0.1.1:8889", - - "traefik/http/services/srvcA/loadBalancer/servers/0/url": "http://10.0.1.2:8888", - "traefik/http/services/srvcA/loadBalancer/servers/1/url": "http://10.0.1.2:8889", - - "traefik/http/services/srvcB/loadBalancer/servers/0/url": "http://10.0.1.3:8888", - "traefik/http/services/srvcB/loadBalancer/servers/1/url": "http://10.0.1.3:8889", - - "traefik/http/services/mirror/mirroring/service": "simplesvc", - "traefik/http/services/mirror/mirroring/mirrors/0/name": "srvcA", - "traefik/http/services/mirror/mirroring/mirrors/0/percent": "42", - "traefik/http/services/mirror/mirroring/mirrors/1/name": "srvcB", - "traefik/http/services/mirror/mirroring/mirrors/1/percent": "42", - - "traefik/http/services/Service03/weighted/services/0/name": "srvcA", - "traefik/http/services/Service03/weighted/services/0/weight": "42", - "traefik/http/services/Service03/weighted/services/1/name": "srvcB", - "traefik/http/services/Service03/weighted/services/1/weight": "42", - - "traefik/http/middlewares/compressor/compress": "true", - "traefik/http/middlewares/striper/stripPrefix/prefixes/0": "foo", - "traefik/http/middlewares/striper/stripPrefix/prefixes/1": "bar", - "traefik/http/middlewares/striper/stripPrefix/forceSlash": "true", - } - - for k, v := range data { - err := s.kvClient.Put(context.Background(), k, []byte(v), nil) - c.Assert(err, checker.IsNil) - } - - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, - try.BodyContains(`"striper@redis":`, `"compressor@redis":`, `"srvcA@redis":`, `"srvcB@redis":`), - ) - c.Assert(err, checker.IsNil) - - resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) - - var obtained api.RunTimeRepresentation - err = json.NewDecoder(resp.Body).Decode(&obtained) - c.Assert(err, checker.IsNil) - got, err := json.MarshalIndent(obtained, "", " ") - c.Assert(err, checker.IsNil) - - expectedJSON := filepath.FromSlash("testdata/rawdata-redis.json") - - if *updateExpected { - err = os.WriteFile(expectedJSON, got, 0o666) - c.Assert(err, checker.IsNil) - } - - expected, err := os.ReadFile(expectedJSON) - c.Assert(err, checker.IsNil) - - if !bytes.Equal(expected, got) { - diff := difflib.UnifiedDiff{ - FromFile: "Expected", - A: difflib.SplitLines(string(expected)), - ToFile: "Got", - B: difflib.SplitLines(string(got)), - Context: 3, - } - - text, err := difflib.GetUnifiedDiffString(diff) - c.Assert(err, checker.IsNil) - c.Error(text) + require.NoError(s.T(), err, text) } } diff --git a/integration/resources/compose/access_log.yml b/integration/resources/compose/access_log.yml index 3ae761c4a..be5f5a9a3 100644 --- a/integration/resources/compose/access_log.yml +++ b/integration/resources/compose/access_log.yml @@ -40,7 +40,7 @@ services: traefik.http.routers.rt-authFrontend.entryPoints: httpFrontendAuth traefik.http.routers.rt-authFrontend.rule: Host(`frontend.auth.docker.local`) traefik.http.routers.rt-authFrontend.middlewares: basicauth - traefik.http.middlewares.basicauth.basicauth.users: test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/ + traefik.http.middlewares.basicauth.basicauth.users: "test:$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/" traefik.http.services.service3.loadbalancer.server.port: 80 digestAuthMiddleware: @@ -94,8 +94,3 @@ services: traefik.http.routers.rt-preflightCORS.middlewares: preflightCORS traefik.http.middlewares.preflightCORS.headers.accessControlAllowMethods: OPTIONS, GET traefik.http.services.preflightCORS.loadbalancer.server.port: 80 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/allowlist.yml b/integration/resources/compose/allowlist.yml index 02e3761ca..0fd241322 100644 --- a/integration/resources/compose/allowlist.yml +++ b/integration/resources/compose/allowlist.yml @@ -34,8 +34,3 @@ services: traefik.http.routers.rt4.middlewares: wl4 traefik.http.middlewares.wl4.ipallowlist.sourceRange: 8.8.8.8 traefik.http.middlewares.wl4.ipallowlist.ipStrategy.excludedIPs: 10.0.0.1,10.0.0.2 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/base.yml b/integration/resources/compose/base.yml index 795f2a214..2d6380051 100644 --- a/integration/resources/compose/base.yml +++ b/integration/resources/compose/base.yml @@ -11,8 +11,3 @@ services: image: traefik/whoami labels: traefik.enable: false - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/consul.yml b/integration/resources/compose/consul.yml index 96860e10c..041ba0b45 100644 --- a/integration/resources/compose/consul.yml +++ b/integration/resources/compose/consul.yml @@ -4,8 +4,3 @@ services: image: consul:1.6 whoami: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/consul_catalog.yml b/integration/resources/compose/consul_catalog.yml index 3c9dd9f3e..6a0fd279c 100644 --- a/integration/resources/compose/consul_catalog.yml +++ b/integration/resources/compose/consul_catalog.yml @@ -2,11 +2,24 @@ version: "3.8" services: consul: image: consul:1.6.2 - command: agent -server -bootstrap -ui -client 0.0.0.0 -hcl 'connect { enabled = true }' + command: + - agent + - -server + - -bootstrap + - -ui + - -client + - 0.0.0.0 + - -hcl + - 'connect { enabled = true }' consul-agent: image: consul:1.6.2 - command: agent -retry-join consul -client 0.0.0.0 + command: + - agent + - -retry-join + - consul + - -client + - 0.0.0.0 whoami1: image: traefik/whoami @@ -30,8 +43,3 @@ services: PORT: 443 BIND: 0.0.0.0 CONSUL_HTTP_ADDR: http://consul:8500 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/docker.yml b/integration/resources/compose/docker.yml index 734e76b25..e594ec87c 100644 --- a/integration/resources/compose/docker.yml +++ b/integration/resources/compose/docker.yml @@ -36,8 +36,3 @@ services: labels: traefik.http.Routers.Super.Rule: Host(`my.super.host`) traefik.http.Services.powpow.LoadBalancer.server.Port: 2375 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/error_pages.yml b/integration/resources/compose/error_pages.yml index 6d6ab1389..03cc13f80 100644 --- a/integration/resources/compose/error_pages.yml +++ b/integration/resources/compose/error_pages.yml @@ -1,12 +1,7 @@ version: "3.8" services: nginx1: - image: nginx:1.13.8-alpine + image: nginx:1.25.3-alpine3.18 nginx2: - image: nginx:1.13.8-alpine - -networks: - default: - name: traefik-test-network - external: true + image: nginx:1.25.3-alpine3.18 diff --git a/integration/resources/compose/etcd.yml b/integration/resources/compose/etcd.yml index 72c0b3698..fb1f3f7ec 100644 --- a/integration/resources/compose/etcd.yml +++ b/integration/resources/compose/etcd.yml @@ -2,9 +2,9 @@ version: "3.8" services: etcd: image: quay.io/coreos/etcd:v3.3.18 - command: etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2380 - -networks: - default: - name: traefik-test-network - external: true + command: + - etcd + - --listen-client-urls + - http://0.0.0.0:2379 + - --advertise-client-urls + - http://0.0.0.0:2380 diff --git a/integration/resources/compose/file.yml b/integration/resources/compose/file.yml index c5f2d696f..52e973e53 100644 --- a/integration/resources/compose/file.yml +++ b/integration/resources/compose/file.yml @@ -14,8 +14,3 @@ services: whoami5: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/healthcheck.yml b/integration/resources/compose/healthcheck.yml index ba130fcf3..9419f4bce 100644 --- a/integration/resources/compose/healthcheck.yml +++ b/integration/resources/compose/healthcheck.yml @@ -11,8 +11,3 @@ services: whoami4: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/hostresolver.yml b/integration/resources/compose/hostresolver.yml index 44d19df57..680962006 100644 --- a/integration/resources/compose/hostresolver.yml +++ b/integration/resources/compose/hostresolver.yml @@ -6,8 +6,3 @@ services: traefik.enable: true traefik.http.services.service1.loadbalancer.server.port: 80 traefik.http.routers.router1.rule: Host(`github.com`) - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/k8s.yml b/integration/resources/compose/k8s.yml index 7b15d5ed4..a34f72bd7 100644 --- a/integration/resources/compose/k8s.yml +++ b/integration/resources/compose/k8s.yml @@ -2,9 +2,23 @@ version: "3.8" services: server: image: rancher/k3s:v1.20.15-k3s1 - command: server --disable-agent --no-deploy coredns --no-deploy servicelb --no-deploy traefik --no-deploy local-storage --no-deploy metrics-server --log /output/k3s.log --bind-address=server --tls-san=server + privileged: true + command: + - server + - --disable-agent + - --disable=coredns + - --disable=servicelb + - --disable=traefik + - --disable=local-storage + - --disable=metrics-server + - --log=/output/k3s.log + - --bind-address=server + - --tls-san=server + - --tls-san=172.31.42.3 + - --tls-san=172.31.42.4 environment: K3S_CLUSTER_SECRET: somethingtotallyrandom + K3S_TOKEN: somethingtotallyrandom K3S_KUBECONFIG_OUTPUT: /output/kubeconfig.yaml K3S_KUBECONFIG_MODE: 666 volumes: @@ -15,10 +29,6 @@ services: image: rancher/k3s:v1.20.15-k3s1 privileged: true environment: + K3S_TOKEN: somethingtotallyrandom K3S_URL: https://server:6443 K3S_CLUSTER_SECRET: somethingtotallyrandom - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/minimal.yml b/integration/resources/compose/minimal.yml index c6de60515..acb12804e 100644 --- a/integration/resources/compose/minimal.yml +++ b/integration/resources/compose/minimal.yml @@ -3,12 +3,9 @@ services: whoami1: image: traefik/whoami labels: - traefik.http.Routers.RouterMini.Rule: PathPrefix(`/whoami`) + traefik.http.routers.router-mini.Rule: PathPrefix(`/whoami`) + traefik.http.routers.router-mini.service: service-mini + traefik.http.services.service-mini.loadbalancer.server.port: 80 traefik.enable: true deploy: replicas: 2 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/pebble.yml b/integration/resources/compose/pebble.yml index 0f8c18b1f..f39dc1378 100644 --- a/integration/resources/compose/pebble.yml +++ b/integration/resources/compose/pebble.yml @@ -2,14 +2,12 @@ version: "3.8" services: pebble: image: letsencrypt/pebble:v2.3.1 - command: pebble --dnsserver traefik:5053 + command: + - pebble + - --dnsserver + - host.docker.internal:5053 environment: # https://github.com/letsencrypt/pebble#testing-at-full-speed PEBBLE_VA_NOSLEEP: 1 # https://github.com/letsencrypt/pebble#invalid-anti-replay-nonce-errors PEBBLE_WFE_NONCEREJECT: 0 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/proxy-protocol.yml b/integration/resources/compose/proxy-protocol.yml index 5fa8b101c..8fa69a9ba 100644 --- a/integration/resources/compose/proxy-protocol.yml +++ b/integration/resources/compose/proxy-protocol.yml @@ -1,14 +1,4 @@ version: "3.8" services: - haproxy: - image: haproxy:2.2 - volumes: - - ./resources/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg - whoami: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/ratelimit.yml b/integration/resources/compose/ratelimit.yml index 0f4d4673b..251568165 100644 --- a/integration/resources/compose/ratelimit.yml +++ b/integration/resources/compose/ratelimit.yml @@ -2,8 +2,3 @@ version: "3.8" services: whoami1: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/redis.yml b/integration/resources/compose/redis.yml index cf859c268..09bbeacad 100644 --- a/integration/resources/compose/redis.yml +++ b/integration/resources/compose/redis.yml @@ -2,8 +2,3 @@ version: "3.8" services: redis: image: redis:5.0 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/redis_sentinel.yml b/integration/resources/compose/redis_sentinel.yml index 261e694e5..1737c2a1a 100644 --- a/integration/resources/compose/redis_sentinel.yml +++ b/integration/resources/compose/redis_sentinel.yml @@ -3,59 +3,51 @@ services: master: image: redis container_name: redis-master - command: redis-server --port 6380 - ports: - - 6380:6380 - healthcheck: - test: redis-cli -p 6380 ping + command: + - redis-server + - --port + - 6380 node1: image: redis container_name: redis-node-1 - ports: - - 6381:6381 - command: redis-server --port 6381 --slaveof redis-master 6380 - healthcheck: - test: redis-cli -p 6381 ping + command: + - redis-server + - --port + - 6381 + - --slaveof + - redis-master + - 6380 node2: image: redis container_name: redis-node-2 - ports: - - 6382:6382 - command: redis-server --port 6382 --slaveof redis-master 6380 - healthcheck: - test: redis-cli -p 6382 ping + command: + - redis-server + - --port + - 6382 + - --slaveof + - redis-master + - 6380 sentinel1: image: redis container_name: redis-sentinel-1 - ports: - - 26379:26379 - command: redis-sentinel /usr/local/etc/redis/conf/sentinel1.conf - healthcheck: - test: redis-cli -p 26379 ping + command: + - redis-sentinel + - /usr/local/etc/redis/conf/sentinel1.conf volumes: - ./resources/compose/config:/usr/local/etc/redis/conf sentinel2: image: redis container_name: redis-sentinel-2 - ports: - - 36379:26379 - command: redis-sentinel /usr/local/etc/redis/conf/sentinel2.conf - healthcheck: - test: redis-cli -p 36379 ping + command: + - redis-sentinel + - /usr/local/etc/redis/conf/sentinel2.conf volumes: - ./resources/compose/config:/usr/local/etc/redis/conf sentinel3: image: redis container_name: redis-sentinel-3 - ports: - - 46379:26379 - command: redis-sentinel /usr/local/etc/redis/conf/sentinel3.conf - healthcheck: - test: redis-cli -p 46379 ping + command: + - redis-sentinel + - /usr/local/etc/redis/conf/sentinel3.conf volumes: - ./resources/compose/config:/usr/local/etc/redis/conf - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/reqacceptgrace.yml b/integration/resources/compose/reqacceptgrace.yml index ce50efd8c..8fa69a9ba 100644 --- a/integration/resources/compose/reqacceptgrace.yml +++ b/integration/resources/compose/reqacceptgrace.yml @@ -2,8 +2,3 @@ version: "3.8" services: whoami: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/rest.yml b/integration/resources/compose/rest.yml index 0f4d4673b..251568165 100644 --- a/integration/resources/compose/rest.yml +++ b/integration/resources/compose/rest.yml @@ -2,8 +2,3 @@ version: "3.8" services: whoami1: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/retry.yml b/integration/resources/compose/retry.yml index ce50efd8c..8fa69a9ba 100644 --- a/integration/resources/compose/retry.yml +++ b/integration/resources/compose/retry.yml @@ -2,8 +2,3 @@ version: "3.8" services: whoami: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/stats.yml b/integration/resources/compose/stats.yml index 15a2813ca..599fed311 100644 --- a/integration/resources/compose/stats.yml +++ b/integration/resources/compose/stats.yml @@ -5,8 +5,3 @@ services: whoami2: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/tailscale.yml b/integration/resources/compose/tailscale.yml index 82b033ebf..dbad56561 100644 --- a/integration/resources/compose/tailscale.yml +++ b/integration/resources/compose/tailscale.yml @@ -9,9 +9,5 @@ services: cap_add: # Required for tailscale to work - net_admin - sys_module - command: tailscaled - -networks: - default: - name: traefik-test-network - external: true + command: + - tailscaled diff --git a/integration/resources/compose/tcp.yml b/integration/resources/compose/tcp.yml index 518f70ddd..cd7fc0627 100644 --- a/integration/resources/compose/tcp.yml +++ b/integration/resources/compose/tcp.yml @@ -2,38 +2,58 @@ version: "3.8" services: whoami-a: image: traefik/whoamitcp - command: -name whoami-a -certFile /certs/whoami-a.crt -keyFile /certs/whoami-a.key + command: + - -name + - whoami-a + - -certFile + - /certs/whoami-a.crt + - -keyFile + - /certs/whoami-a.key volumes: - ./fixtures/tcp:/certs whoami-b: image: traefik/whoamitcp - command: -name whoami-b -certFile /certs/whoami-b.crt -keyFile /certs/whoami-b.key + command: + - -name + - whoami-b + - -certFile + - /certs/whoami-b.crt + - -keyFile + - /certs/whoami-b.key volumes: - ./fixtures/tcp:/certs whoami-ab: image: traefik/whoamitcp - command: -name whoami-ab -certFile /certs/whoami-b.crt -keyFile /certs/whoami-b.key + command: + - -name + - whoami-ab + - -certFile + - /certs/whoami-b.crt + - -keyFile + - /certs/whoami-b.key volumes: - ./fixtures/tcp:/certs whoami-no-cert: image: traefik/whoamitcp - command: -name whoami-no-cert + command: + - -name + - whoami-no-cert whoami-no-tls: image: traefik/whoamitcp - command: -name whoami-no-tls + command: + - -name + - whoami-no-tls whoami: image: traefik/whoami whoami-banner: image: traefik/whoamitcp - command: -name whoami-banner --banner - -networks: - default: - name: traefik-test-network - external: true + command: + - -name + - whoami-banner + - --banner diff --git a/integration/resources/compose/timeout.yml b/integration/resources/compose/timeout.yml index 727f2e567..6e415b9b0 100644 --- a/integration/resources/compose/timeout.yml +++ b/integration/resources/compose/timeout.yml @@ -5,8 +5,3 @@ services: environment: PROTO: http PORT: 9000 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/tlsclientheaders.yml b/integration/resources/compose/tlsclientheaders.yml index 5bb836607..ef16f5f36 100644 --- a/integration/resources/compose/tlsclientheaders.yml +++ b/integration/resources/compose/tlsclientheaders.yml @@ -7,8 +7,3 @@ services: traefik.http.routers.route1.middlewares: passtls traefik.http.routers.route1.tls: true traefik.http.middlewares.passtls.passtlsclientcert.pem: true - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/tracing.yml b/integration/resources/compose/tracing.yml index aeea9b378..c7b1e165f 100644 --- a/integration/resources/compose/tracing.yml +++ b/integration/resources/compose/tracing.yml @@ -13,8 +13,3 @@ services: whoami: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/udp.yml b/integration/resources/compose/udp.yml index d3018fae9..ce2633199 100644 --- a/integration/resources/compose/udp.yml +++ b/integration/resources/compose/udp.yml @@ -2,20 +2,21 @@ version: "3.8" services: whoami-a: image: traefik/whoamiudp:latest - command: -name whoami-a + command: + - -name + - whoami-a whoami-b: image: traefik/whoamiudp:latest - command: -name whoami-b + command: + - -name + - whoami-b whoami-c: image: traefik/whoamiudp:latest - command: -name whoami-c + command: + - -name + - whoami-c whoami-d: image: traefik/whoami - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/compose/zookeeper.yml b/integration/resources/compose/zookeeper.yml index c75424e8d..9861c1437 100644 --- a/integration/resources/compose/zookeeper.yml +++ b/integration/resources/compose/zookeeper.yml @@ -2,8 +2,3 @@ version: "3.8" services: zookeeper: image: zookeeper:3.5 - -networks: - default: - name: traefik-test-network - external: true diff --git a/integration/resources/haproxy/haproxy.cfg b/integration/resources/haproxy/haproxy.cfg deleted file mode 100644 index 22b3fbd62..000000000 --- a/integration/resources/haproxy/haproxy.cfg +++ /dev/null @@ -1,30 +0,0 @@ -global - maxconn 4096 - -defaults - log global - mode http - retries 3 - option redispatch - maxconn 2000 - timeout connect 5000 - timeout client 50000 - timeout server 50000 - -frontend TestServerTest - bind 0.0.0.0:80 - mode tcp - default_backend TestServerNodes - -frontend TestServerTestV2 - bind 0.0.0.0:81 - mode tcp - default_backend TestServerNodesV2 - -backend TestServerNodes - mode tcp - server TestServer01 traefik:8000 send-proxy - - backend TestServerNodesV2 - mode tcp - server TestServer01 traefik:8000 send-proxy-v2 diff --git a/integration/rest_test.go b/integration/rest_test.go index d72f16314..b1034955f 100644 --- a/integration/rest_test.go +++ b/integration/rest_test.go @@ -5,14 +5,15 @@ import ( "encoding/json" "net" "net/http" - "os" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/dynamic" - checker "github.com/vdemeester/shakers" ) type RestSuite struct { @@ -20,28 +21,33 @@ type RestSuite struct { whoamiAddr string } -func (s *RestSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "rest") - s.composeUp(c) - - s.whoamiAddr = net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") +func TestRestSuite(t *testing.T) { + suite.Run(t, new(RestSuite)) } -func (s *RestSuite) TestSimpleConfigurationInsecure(c *check.C) { - cmd, display := s.traefikCmd(withConfigFile("fixtures/rest/simple.toml")) +func (s *RestSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.createComposeProject("rest") + s.composeUp() + + s.whoamiAddr = net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") +} + +func (s *RestSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *RestSuite) TestSimpleConfigurationInsecure() { + s.traefikCmd(withConfigFile("fixtures/rest/simple.toml")) // wait for Traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("rest@internal")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("rest@internal")) + require.NoError(s.T(), err) // Expected a 404 as we did not configure anything. err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) testCase := []struct { desc string @@ -105,47 +111,41 @@ func (s *RestSuite) TestSimpleConfigurationInsecure(c *check.C) { for _, test := range testCase { data, err := json.Marshal(test.config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodPut, "http://127.0.0.1:8080/api/providers/rest", bytes.NewReader(data)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 3*time.Second, try.BodyContains(test.ruleMatch)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } -func (s *RestSuite) TestSimpleConfiguration(c *check.C) { - file := s.adaptFile(c, "fixtures/rest/simple_secure.toml", struct{}{}) - defer os.Remove(file) +func (s *RestSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/rest/simple_secure.toml", struct{}{}) - cmd, display := s.traefikCmd(withConfigFile(file)) - - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // Expected a 404 as we did not configure anything. - err = try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 1000*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2000*time.Millisecond, try.BodyContains("PathPrefix(`/secure`)")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodPut, "http://127.0.0.1:8080/api/providers/rest", strings.NewReader("{}")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusNotFound) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusNotFound, response.StatusCode) testCase := []struct { desc string @@ -209,19 +209,19 @@ func (s *RestSuite) TestSimpleConfiguration(c *check.C) { for _, test := range testCase { data, err := json.Marshal(test.config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodPut, "http://127.0.0.1:8000/secure/api/providers/rest", bytes.NewReader(data)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains(test.ruleMatch)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/", time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } } diff --git a/integration/retry_test.go b/integration/retry_test.go index a86ba70ab..6804bbeba 100644 --- a/integration/retry_test.go +++ b/integration/retry_test.go @@ -3,13 +3,14 @@ package integration import ( "io" "net/http" - "os" + "testing" "time" - "github.com/go-check/check" "github.com/gorilla/websocket" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type RetrySuite struct { @@ -17,96 +18,86 @@ type RetrySuite struct { whoamiIP string } -func (s *RetrySuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "retry") - s.composeUp(c) - - s.whoamiIP = s.getComposeServiceIP(c, "whoami") +func TestRetrySuite(t *testing.T) { + suite.Run(t, new(RetrySuite)) } -func (s *RetrySuite) TestRetry(c *check.C) { - file := s.adaptFile(c, "fixtures/retry/simple.toml", struct{ WhoamiIP string }{s.whoamiIP}) - defer os.Remove(file) +func (s *RetrySuite) SetupSuite() { + s.BaseSuite.SetupSuite() - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.createComposeProject("retry") + s.composeUp() - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) - c.Assert(err, checker.IsNil) + s.whoamiIP = s.getComposeServiceIP("whoami") +} + +func (s *RetrySuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *RetrySuite) TestRetry() { + file := s.adaptFile("fixtures/retry/simple.toml", struct{ WhoamiIP string }{s.whoamiIP}) + + s.traefikCmd(withConfigFile(file)) + + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) + require.NoError(s.T(), err) response, err := http.Get("http://127.0.0.1:8000/") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // The test only verifies that the retry middleware makes sure that the working service is eventually reached. - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } -func (s *RetrySuite) TestRetryBackoff(c *check.C) { - file := s.adaptFile(c, "fixtures/retry/backoff.toml", struct{ WhoamiIP string }{s.whoamiIP}) - defer os.Remove(file) +func (s *RetrySuite) TestRetryBackoff() { + file := s.adaptFile("fixtures/retry/backoff.toml", struct{ WhoamiIP string }{s.whoamiIP}) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) + require.NoError(s.T(), err) response, err := http.Get("http://127.0.0.1:8000/") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // The test only verifies that the retry middleware allows finally to reach the working service. - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } -func (s *RetrySuite) TestRetryWebsocket(c *check.C) { - file := s.adaptFile(c, "fixtures/retry/simple.toml", struct{ WhoamiIP string }{s.whoamiIP}) - defer os.Remove(file) +func (s *RetrySuite) TestRetryWebsocket() { + file := s.adaptFile("fixtures/retry/simple.toml", struct{ WhoamiIP string }{s.whoamiIP}) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) + require.NoError(s.T(), err) // The test only verifies that the retry middleware makes sure that the working service is eventually reached. _, response, err := websocket.DefaultDialer.Dial("ws://127.0.0.1:8000/echo", nil) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusSwitchingProtocols) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusSwitchingProtocols, response.StatusCode) // The test verifies a second time that the working service is eventually reached. _, response, err = websocket.DefaultDialer.Dial("ws://127.0.0.1:8000/echo", nil) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusSwitchingProtocols) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusSwitchingProtocols, response.StatusCode) } -func (s *RetrySuite) TestRetryWithStripPrefix(c *check.C) { - file := s.adaptFile(c, "fixtures/retry/strip_prefix.toml", struct{ WhoamiIP string }{s.whoamiIP}) - defer os.Remove(file) +func (s *RetrySuite) TestRetryWithStripPrefix() { + file := s.adaptFile("fixtures/retry/strip_prefix.toml", struct{ WhoamiIP string }{s.whoamiIP}) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("PathPrefix(`/`)")) + require.NoError(s.T(), err) response, err := http.Get("http://127.0.0.1:8000/test") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body, err := io.ReadAll(response.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - c.Assert(string(body), checker.Contains, "GET / HTTP/1.1") - c.Assert(string(body), checker.Contains, "X-Forwarded-Prefix: /test") + assert.Contains(s.T(), string(body), "GET / HTTP/1.1") + assert.Contains(s.T(), string(body), "X-Forwarded-Prefix: /test") } diff --git a/integration/simple_test.go b/integration/simple_test.go index 3284a5a81..76305bbbc 100644 --- a/integration/simple_test.go +++ b/integration/simple_test.go @@ -15,25 +15,36 @@ import ( "strings" "sync/atomic" "syscall" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/config/dynamic" - checker "github.com/vdemeester/shakers" + "github.com/traefik/traefik/v2/pkg/log" ) // SimpleSuite tests suite. type SimpleSuite struct{ BaseSuite } -func (s *SimpleSuite) TestInvalidConfigShouldFail(c *check.C) { - cmd, output := s.cmdTraefik(withConfigFile("fixtures/invalid_configuration.toml")) +func TestSimpleSuite(t *testing.T) { + suite.Run(t, new(SimpleSuite)) +} - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *SimpleSuite) SetupSuite() { + s.BaseSuite.SetupSuite() +} - err = try.Do(500*time.Millisecond, func() error { +func (s *SimpleSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *SimpleSuite) TestInvalidConfigShouldFail() { + _, output := s.cmdTraefik(withConfigFile("fixtures/invalid_configuration.toml")) + + err := try.Do(500*time.Millisecond, func() error { expected := "expected '.' or '=', but got '{' instead" actual := output.String() @@ -43,40 +54,28 @@ func (s *SimpleSuite) TestInvalidConfigShouldFail(c *check.C) { return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestSimpleDefaultConfig(c *check.C) { - cmd, _ := s.cmdTraefik(withConfigFile("fixtures/simple_default.toml")) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *SimpleSuite) TestSimpleDefaultConfig() { + s.cmdTraefik(withConfigFile("fixtures/simple_default.toml")) // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestWithWebConfig(c *check.C) { - cmd, _ := s.cmdTraefik(withConfigFile("fixtures/simple_web.toml")) +func (s *SimpleSuite) TestWithWebConfig() { + s.cmdTraefik(withConfigFile("fixtures/simple_web.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestPrintHelp(c *check.C) { - cmd, output := s.cmdTraefik("--help") +func (s *SimpleSuite) TestPrintHelp() { + _, output := s.cmdTraefik("--help") - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.Do(500*time.Millisecond, func() error { + err := try.Do(500*time.Millisecond, func() error { expected := "Usage:" notExpected := "panic:" actual := output.String() @@ -90,61 +89,55 @@ func (s *SimpleSuite) TestPrintHelp(c *check.C) { return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestRequestAcceptGraceTimeout(c *check.C) { - s.createComposeProject(c, "reqacceptgrace") +func (s *SimpleSuite) TestRequestAcceptGraceTimeout() { + s.createComposeProject("reqacceptgrace") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami"), "80") + whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami"), "80") - file := s.adaptFile(c, "fixtures/reqacceptgrace.toml", struct { + file := s.adaptFile("fixtures/reqacceptgrace.toml", struct { Server string }{whoamiURL}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + cmd, _ := s.cmdTraefik(withConfigFile(file)) // Wait for Traefik to turn ready. - err = try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Make sure exposed service is ready. err = try.GetRequest("http://127.0.0.1:8000/service", 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Check that /ping endpoint is responding with 200. err = try.GetRequest("http://127.0.0.1:8001/ping", 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Send SIGTERM to Traefik. proc, err := os.FindProcess(cmd.Process.Pid) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = proc.Signal(syscall.SIGTERM) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Give Traefik time to process the SIGTERM and send a request half-way // into the request accepting grace period, by which requests should // still get served. time.Sleep(5 * time.Second) resp, err := http.Get("http://127.0.0.1:8000/service") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer resp.Body.Close() - c.Assert(resp.StatusCode, checker.Equals, http.StatusOK) + assert.Equal(s.T(), http.StatusOK, resp.StatusCode) // ping endpoint should now return a Service Unavailable. resp, err = http.Get("http://127.0.0.1:8001/ping") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) defer resp.Body.Close() - c.Assert(resp.StatusCode, checker.Equals, http.StatusServiceUnavailable) + assert.Equal(s.T(), http.StatusServiceUnavailable, resp.StatusCode) // Expect Traefik to shut down gracefully once the request accepting grace // period has elapsed. @@ -155,229 +148,192 @@ func (s *SimpleSuite) TestRequestAcceptGraceTimeout(c *check.C) { select { case err := <-waitErr: - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) case <-time.After(10 * time.Second): // By now we are ~5 seconds out of the request accepting grace period // (start + 5 seconds sleep prior to the mid-grace period request + // 10 seconds timeout = 15 seconds > 10 seconds grace period). // Something must have gone wrong if we still haven't terminated at // this point. - c.Fatal("Traefik did not terminate in time") + s.T().Fatal("Traefik did not terminate in time") } } -func (s *SimpleSuite) TestCustomPingTerminationStatusCode(c *check.C) { - file := s.adaptFile(c, "fixtures/custom_ping_termination_status_code.toml", struct{}{}) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) +func (s *SimpleSuite) TestCustomPingTerminationStatusCode() { + file := s.adaptFile("fixtures/custom_ping_termination_status_code.toml", struct{}{}) + cmd, _ := s.cmdTraefik(withConfigFile(file)) // Wait for Traefik to turn ready. - err = try.GetRequest("http://127.0.0.1:8001/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8001/", 2*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) // Check that /ping endpoint is responding with 200. err = try.GetRequest("http://127.0.0.1:8001/ping", 3*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Send SIGTERM to Traefik. proc, err := os.FindProcess(cmd.Process.Pid) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = proc.Signal(syscall.SIGTERM) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // ping endpoint should now return a Service Unavailable. err = try.GetRequest("http://127.0.0.1:8001/ping", 2*time.Second, try.StatusCodeIs(http.StatusNoContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestStatsWithMultipleEntryPoint(c *check.C) { - c.Skip("Stats is missing") - s.createComposeProject(c, "stats") +func (s *SimpleSuite) TestStatsWithMultipleEntryPoint() { + s.T().Skip("Stats is missing") + s.createComposeProject("stats") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") - whoami2URL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami2"), "80") + whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") + whoami2URL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami2"), "80") - file := s.adaptFile(c, "fixtures/simple_stats.toml", struct { + file := s.adaptFile("fixtures/simple_stats.toml", struct { Server1 string Server2 string }{whoami1URL, whoami2URL}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api", 1*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/health", 1*time.Second, try.BodyContains(`"total_status_code_count":{"200":2}`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestNoAuthOnPing(c *check.C) { - c.Skip("Waiting for new api handler implementation") +func (s *SimpleSuite) TestNoAuthOnPing() { + s.T().Skip("Waiting for new api handler implementation") - s.createComposeProject(c, "base") + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - file := s.adaptFile(c, "./fixtures/simple_auth.toml", struct{}{}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + file := s.adaptFile("./fixtures/simple_auth.toml", struct{}{}) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8001/api/rawdata", 2*time.Second, try.StatusCodeIs(http.StatusUnauthorized)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8001/api/rawdata", 2*time.Second, try.StatusCodeIs(http.StatusUnauthorized)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8001/ping", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestDefaultEntryPointHTTP(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestDefaultEntryPointHTTP() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd("--entryPoints.http.Address=:8000", "--log.level=DEBUG", "--providers.docker", "--api.insecure") - defer output(c) + s.traefikCmd("--entryPoints.http.Address=:8000", "--log.level=DEBUG", "--providers.docker", "--api.insecure") - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestWithNonExistingEntryPoint(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestWithNonExistingEntryPoint() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd("--entryPoints.http.Address=:8000", "--log.level=DEBUG", "--providers.docker", "--api.insecure") - defer output(c) + s.traefikCmd("--entryPoints.http.Address=:8000", "--log.level=DEBUG", "--providers.docker", "--api.insecure") - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestMetricsPrometheusDefaultEntryPoint(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMetricsPrometheusDefaultEntryPoint() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd("--entryPoints.http.Address=:8000", "--api.insecure", "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0", "--providers.docker", "--metrics.prometheus.addrouterslabels=true", "--log.level=DEBUG") - defer output(c) + s.traefikCmd("--entryPoints.http.Address=:8000", "--api.insecure", "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0", "--providers.docker", "--metrics.prometheus.addrouterslabels=true", "--log.level=DEBUG") - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/whoami`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/whoami`)")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/metrics", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/metrics", 1*time.Second, try.BodyContains("_router_")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/metrics", 1*time.Second, try.BodyContains("_entrypoint_")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/metrics", 1*time.Second, try.BodyContains("_service_")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestMetricsPrometheusTwoRoutersOneService(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMetricsPrometheusTwoRoutersOneService() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd("--entryPoints.http.Address=:8000", "--api.insecure", "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0", "--providers.docker", "--metrics.prometheus.addentrypointslabels=false", "--metrics.prometheus.addrouterslabels=true", "--log.level=DEBUG") - defer output(c) + s.traefikCmd("--entryPoints.http.Address=:8000", "--api.insecure", "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0", "--providers.docker", "--metrics.prometheus.addentrypointslabels=false", "--metrics.prometheus.addrouterslabels=true", "--log.level=DEBUG") - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami2", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // adding a loop to test if metrics are not deleted for i := 0; i < 10; i++ { request, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/metrics", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) body, err := io.ReadAll(response.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // Reqs count of 1 for both routers - c.Assert(string(body), checker.Contains, "traefik_router_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",router=\"router1@docker\",service=\"whoami1-traefik-integration-test-base@docker\"} 1") - c.Assert(string(body), checker.Contains, "traefik_router_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",router=\"router2@docker\",service=\"whoami1-traefik-integration-test-base@docker\"} 1") + assert.Contains(s.T(), string(body), "traefik_router_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",router=\"router1@docker\",service=\"whoami1@docker\"} 1") + assert.Contains(s.T(), string(body), "traefik_router_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",router=\"router2@docker\",service=\"whoami1@docker\"} 1") // Reqs count of 2 for service behind both routers - c.Assert(string(body), checker.Contains, "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"whoami1-traefik-integration-test-base@docker\"} 2") + assert.Contains(s.T(), string(body), "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"whoami1@docker\"} 2") } } // TestMetricsWithBufferingMiddleware checks that the buffering middleware // (which introduces its own response writer in the chain), does not interfere with // the capture middleware on which the metrics mechanism relies. -func (s *SimpleSuite) TestMetricsWithBufferingMiddleware(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMetricsWithBufferingMiddleware() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) @@ -387,113 +343,96 @@ func (s *SimpleSuite) TestMetricsWithBufferingMiddleware(c *check.C) { server.Start() defer server.Close() - file := s.adaptFile(c, "fixtures/simple_metrics_with_buffer_middleware.toml", struct{ IP string }{IP: strings.TrimPrefix(server.URL, "http://")}) - defer os.Remove(file) + file := s.adaptFile("fixtures/simple_metrics_with_buffer_middleware.toml", struct{ IP string }{IP: strings.TrimPrefix(server.URL, "http://")}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/without`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/without`)")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8001/without", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8002/with-req", strings.NewReader("MORE THAN TEN BYTES IN REQUEST")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // The request should fail because the body is too large. err = try.Request(req, 1*time.Second, try.StatusCodeIs(http.StatusRequestEntityTooLarge)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // The request should fail because the response exceeds the configured limit. err = try.GetRequest("http://127.0.0.1:8003/with-resp", 1*time.Second, try.StatusCodeIs(http.StatusInternalServerError)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8080/metrics", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) body, err := io.ReadAll(response.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // For allowed requests and responses, the entrypoint and service metrics have the same status code. - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 1") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_bytes_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 0") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_responses_bytes_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 31") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 1") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_bytes_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 0") + assert.Contains(s.T(), string(body), "traefik_entrypoint_responses_bytes_total{code=\"200\",entrypoint=\"webA\",method=\"GET\",protocol=\"http\"} 31") - c.Assert(string(body), checker.Contains, "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 1") - c.Assert(string(body), checker.Contains, "traefik_service_requests_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 0") - c.Assert(string(body), checker.Contains, "traefik_service_responses_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 31") + assert.Contains(s.T(), string(body), "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 1") + assert.Contains(s.T(), string(body), "traefik_service_requests_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 0") + assert.Contains(s.T(), string(body), "traefik_service_responses_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-without@file\"} 31") // For forbidden requests, the entrypoints have metrics, the services don't. - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 1") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_bytes_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 0") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_responses_bytes_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 24") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 1") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_bytes_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 0") + assert.Contains(s.T(), string(body), "traefik_entrypoint_responses_bytes_total{code=\"413\",entrypoint=\"webB\",method=\"GET\",protocol=\"http\"} 24") // For disallowed responses, the entrypoint and service metrics don't have the same status code. - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_bytes_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 0") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_requests_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 1") - c.Assert(string(body), checker.Contains, "traefik_entrypoint_responses_bytes_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 21") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_bytes_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 0") + assert.Contains(s.T(), string(body), "traefik_entrypoint_requests_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 1") + assert.Contains(s.T(), string(body), "traefik_entrypoint_responses_bytes_total{code=\"500\",entrypoint=\"webC\",method=\"GET\",protocol=\"http\"} 21") - c.Assert(string(body), checker.Contains, "traefik_service_requests_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 0") - c.Assert(string(body), checker.Contains, "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 1") - c.Assert(string(body), checker.Contains, "traefik_service_responses_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 31") + assert.Contains(s.T(), string(body), "traefik_service_requests_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 0") + assert.Contains(s.T(), string(body), "traefik_service_requests_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 1") + assert.Contains(s.T(), string(body), "traefik_service_responses_bytes_total{code=\"200\",method=\"GET\",protocol=\"http\",service=\"service-resp@file\"} 31") } -func (s *SimpleSuite) TestMultipleProviderSameBackendName(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMultipleProviderSameBackendName() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1IP := s.getComposeServiceIP(c, "whoami1") - whoami2IP := s.getComposeServiceIP(c, "whoami2") - file := s.adaptFile(c, "fixtures/multiple_provider.toml", struct{ IP string }{IP: whoami2IP}) - defer os.Remove(file) + whoami1IP := s.getComposeServiceIP("whoami1") + whoami2IP := s.getComposeServiceIP("whoami2") + file := s.adaptFile("fixtures/multiple_provider.toml", struct{ IP string }{IP: whoami2IP}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/whoami", 1*time.Second, try.BodyContains(whoami1IP)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/file", 1*time.Second, try.BodyContains(whoami2IP)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestIPStrategyWhitelist(c *check.C) { - s.createComposeProject(c, "whitelist") +func (s *SimpleSuite) TestIPStrategyWhitelist() { + s.createComposeProject("whitelist") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd(withConfigFile("fixtures/simple_whitelist.toml")) - defer output(c) + s.traefikCmd(withConfigFile("fixtures/simple_whitelist.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override.remoteaddr.whitelist.docker.local")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -541,29 +480,24 @@ func (s *SimpleSuite) TestIPStrategyWhitelist(c *check.C) { err = try.Request(req, 1*time.Second, try.StatusCodeIs(test.expectedStatusCode)) if err != nil { - c.Fatalf("Error while %s: %v", test.desc, err) + s.T().Fatalf("Error while %s: %v", test.desc, err) } } } -func (s *SimpleSuite) TestIPStrategyAllowlist(c *check.C) { - s.createComposeProject(c, "allowlist") +func (s *SimpleSuite) TestIPStrategyAllowlist() { + s.createComposeProject("allowlist") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd(withConfigFile("fixtures/simple_allowlist.toml")) - defer output(c) + s.traefikCmd(withConfigFile("fixtures/simple_allowlist.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override.remoteaddr.allowlist.docker.local")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -610,31 +544,24 @@ func (s *SimpleSuite) TestIPStrategyAllowlist(c *check.C) { req.RequestURI = "" err = try.Request(req, 1*time.Second, try.StatusCodeIs(test.expectedStatusCode)) - if err != nil { - c.Fatalf("Error while %s: %v", test.desc, err) - } + require.NoErrorf(s.T(), err, "Error during %s: %v", test.desc, err) } } -func (s *SimpleSuite) TestXForwardedHeaders(c *check.C) { - s.createComposeProject(c, "whitelist") +func (s *SimpleSuite) TestXForwardedHeaders() { + s.createComposeProject("whitelist") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd(withConfigFile("fixtures/simple_whitelist.toml")) - defer output(c) + s.traefikCmd(withConfigFile("fixtures/simple_whitelist.toml")) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("override.remoteaddr.whitelist.docker.local")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = "override.depth.whitelist.docker.local" req.Header.Set("X-Forwarded-For", "8.8.8.8,10.0.0.1,127.0.0.1") @@ -643,29 +570,23 @@ func (s *SimpleSuite) TestXForwardedHeaders(c *check.C) { try.StatusCodeIs(http.StatusOK), try.BodyContains("X-Forwarded-Proto", "X-Forwarded-For", "X-Forwarded-Host", "X-Forwarded-Host", "X-Forwarded-Port", "X-Forwarded-Server", "X-Real-Ip")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestMultiProvider(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMultiProvider() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") + whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") - file := s.adaptFile(c, "fixtures/multiprovider.toml", struct{ Server string }{Server: whoamiURL}) - defer os.Remove(file) + file := s.adaptFile("fixtures/multiprovider.toml", struct{ Server string }{Server: whoamiURL}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("service")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("service")) + require.NoError(s.T(), err) config := dynamic.Configuration{ HTTP: &dynamic.HTTPConfiguration{ @@ -681,39 +602,33 @@ func (s *SimpleSuite) TestMultiProvider(c *check.C) { } jsonContent, err := json.Marshal(config) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodPut, "http://127.0.0.1:8080/api/providers/rest", bytes.NewReader(jsonContent)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(request) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1000*time.Millisecond, try.BodyContains("PathPrefix(`/`)")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/", 1*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("CustomValue")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestSimpleConfigurationHostRequestTrailingPeriod(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestSimpleConfigurationHostRequestTrailingPeriod() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") + whoamiURL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") - file := s.adaptFile(c, "fixtures/file/simple-hosts.toml", struct{ Server string }{Server: whoamiURL}) - defer os.Remove(file) + file := s.adaptFile("fixtures/file/simple-hosts.toml", struct{ Server string }{Server: whoamiURL}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) testCases := []struct { desc string @@ -739,177 +654,133 @@ func (s *SimpleSuite) TestSimpleConfigurationHostRequestTrailingPeriod(c *check. for _, test := range testCases { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Host = test.requestHost err = try.Request(req, 1*time.Second, try.StatusCodeIs(http.StatusOK)) - if err != nil { - c.Fatalf("Error while testing %s: %v", test.desc, err) - } + require.NoErrorf(s.T(), err, "Error while testing %s: %v", test.desc, err) } } -func (s *SimpleSuite) TestRouterConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/router_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestRouterConfigErrors() { + file := s.adaptFile("fixtures/router_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // All errors - err = try.GetRequest("http://127.0.0.1:8080/api/http/routers", 1000*time.Millisecond, try.BodyContains(`["middleware \"unknown@file\" does not exist","found different TLS options for routers on the same host snitest.net, so using the default TLS options instead"]`)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/routers", 1000*time.Millisecond, try.BodyContains(`["middleware \"unknown@file\" does not exist","found different TLS options for routers on the same host snitest.net, so using the default TLS options instead"]`)) + require.NoError(s.T(), err) // router3 has an error because it uses an unknown entrypoint err = try.GetRequest("http://127.0.0.1:8080/api/http/routers/router3@file", 1000*time.Millisecond, try.BodyContains(`entryPoint \"unknown-entrypoint\" doesn't exist`, "no valid entryPoint for this router")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // router4 is enabled, but in warning state because its tls options conf was messed up err = try.GetRequest("http://127.0.0.1:8080/api/http/routers/router4@file", 1000*time.Millisecond, try.BodyContains(`"status":"warning"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // router5 is disabled because its middleware conf is broken err = try.GetRequest("http://127.0.0.1:8080/api/http/routers/router5@file", 1000*time.Millisecond, try.BodyContains()) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestServiceConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/service_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestServiceConfigErrors() { + file := s.adaptFile("fixtures/service_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains(`["the service \"service1@file\" does not have any type defined"]`)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains(`["the service \"service1@file\" does not have any type defined"]`)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/http/services/service1@file", 1000*time.Millisecond, try.BodyContains(`"status":"disabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/http/services/service2@file", 1000*time.Millisecond, try.BodyContains(`"status":"enabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestTCPRouterConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/router_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestTCPRouterConfigErrors() { + file := s.adaptFile("fixtures/router_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // router3 has an error because it uses an unknown entrypoint - err = try.GetRequest("http://127.0.0.1:8080/api/tcp/routers/router3@file", 1000*time.Millisecond, try.BodyContains(`entryPoint \"unknown-entrypoint\" doesn't exist`, "no valid entryPoint for this router")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/tcp/routers/router3@file", 1000*time.Millisecond, try.BodyContains(`entryPoint \"unknown-entrypoint\" doesn't exist`, "no valid entryPoint for this router")) + require.NoError(s.T(), err) // router4 has an unsupported Rule err = try.GetRequest("http://127.0.0.1:8080/api/tcp/routers/router4@file", 1000*time.Millisecond, try.BodyContains("invalid rule: \\\"Host(`mydomain.com`)\\\"")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestTCPServiceConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/service_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestTCPServiceConfigErrors() { + file := s.adaptFile("fixtures/tcp/service_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/tcp/services", 1000*time.Millisecond, try.BodyContains(`["the service \"service1@file\" does not have any type defined"]`)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/tcp/services", 1000*time.Millisecond, try.BodyContains(`["the service \"service1@file\" does not have any type defined"]`)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/tcp/services/service1@file", 1000*time.Millisecond, try.BodyContains(`"status":"disabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/tcp/services/service2@file", 1000*time.Millisecond, try.BodyContains(`"status":"enabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestUDPRouterConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/router_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestUDPRouterConfigErrors() { + file := s.adaptFile("fixtures/router_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/udp/routers/router3@file", 1000*time.Millisecond, try.BodyContains(`entryPoint \"unknown-entrypoint\" doesn't exist`, "no valid entryPoint for this router")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/udp/routers/router3@file", 1000*time.Millisecond, try.BodyContains(`entryPoint \"unknown-entrypoint\" doesn't exist`, "no valid entryPoint for this router")) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestUDPServiceConfigErrors(c *check.C) { - file := s.adaptFile(c, "fixtures/udp/service_errors.toml", struct{}{}) - defer os.Remove(file) +func (s *SimpleSuite) TestUDPServiceConfigErrors() { + file := s.adaptFile("fixtures/udp/service_errors.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/udp/services", 1000*time.Millisecond, try.BodyContains(`["the udp service \"service1@file\" does not have any type defined"]`)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/udp/services", 1000*time.Millisecond, try.BodyContains(`["the udp service \"service1@file\" does not have any type defined"]`)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/udp/services/service1@file", 1000*time.Millisecond, try.BodyContains(`"status":"disabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/udp/services/service2@file", 1000*time.Millisecond, try.BodyContains(`"status":"enabled"`)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestWRR(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestWRR() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1IP := s.getComposeServiceIP(c, "whoami1") - whoami2IP := s.getComposeServiceIP(c, "whoami2") + whoami1IP := s.getComposeServiceIP("whoami1") + whoami2IP := s.getComposeServiceIP("whoami2") - file := s.adaptFile(c, "fixtures/wrr.toml", struct { + file := s.adaptFile("fixtures/wrr.toml", struct { Server1 string Server2 string }{Server1: "http://" + whoami1IP, Server2: "http://" + whoami2IP}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("service1", "service2")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("service1", "service2")) + require.NoError(s.T(), err) repartition := map[string]int{} for i := 0; i < 4; i++ { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) body, err := io.ReadAll(response.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if strings.Contains(string(body), whoami1IP) { repartition[whoami1IP]++ @@ -919,50 +790,44 @@ func (s *SimpleSuite) TestWRR(c *check.C) { } } - c.Assert(repartition[whoami1IP], checker.Equals, 3) - c.Assert(repartition[whoami2IP], checker.Equals, 1) + assert.Equal(s.T(), 3, repartition[whoami1IP]) + assert.Equal(s.T(), 1, repartition[whoami2IP]) } -func (s *SimpleSuite) TestWRRSticky(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestWRRSticky() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1IP := s.getComposeServiceIP(c, "whoami1") - whoami2IP := s.getComposeServiceIP(c, "whoami2") + whoami1IP := s.getComposeServiceIP("whoami1") + whoami2IP := s.getComposeServiceIP("whoami2") - file := s.adaptFile(c, "fixtures/wrr_sticky.toml", struct { + file := s.adaptFile("fixtures/wrr_sticky.toml", struct { Server1 string Server2 string }{Server1: "http://" + whoami1IP, Server2: "http://" + whoami2IP}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("service1", "service2")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("service1", "service2")) + require.NoError(s.T(), err) repartition := map[string]int{} req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) for i := 0; i < 4; i++ { response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) for _, cookie := range response.Cookies() { req.AddCookie(cookie) } body, err := io.ReadAll(response.Body) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if strings.Contains(string(body), whoami1IP) { repartition[whoami1IP]++ @@ -972,11 +837,11 @@ func (s *SimpleSuite) TestWRRSticky(c *check.C) { } } - c.Assert(repartition[whoami1IP], checker.Equals, 4) - c.Assert(repartition[whoami2IP], checker.Equals, 0) + assert.Equal(s.T(), 4, repartition[whoami1IP]) + assert.Equal(s.T(), 0, repartition[whoami2IP]) } -func (s *SimpleSuite) TestMirror(c *check.C) { +func (s *SimpleSuite) TestMirror() { var count, countMirror1, countMirror2 int32 main := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { @@ -995,64 +860,54 @@ func (s *SimpleSuite) TestMirror(c *check.C) { mirror1Server := mirror1.URL mirror2Server := mirror2.URL - file := s.adaptFile(c, "fixtures/mirror.toml", struct { + file := s.adaptFile("fixtures/mirror.toml", struct { MainServer string Mirror1Server string Mirror2Server string }{MainServer: mainServer, Mirror1Server: mirror1Server, Mirror2Server: mirror2Server}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("mirror1", "mirror2", "service1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("mirror1", "mirror2", "service1")) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) for i := 0; i < 10; i++ { response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } countTotal := atomic.LoadInt32(&count) val1 := atomic.LoadInt32(&countMirror1) val2 := atomic.LoadInt32(&countMirror2) - c.Assert(countTotal, checker.Equals, int32(10)) - c.Assert(val1, checker.Equals, int32(1)) - c.Assert(val2, checker.Equals, int32(5)) + assert.Equal(s.T(), int32(10), countTotal) + assert.Equal(s.T(), int32(1), val1) + assert.Equal(s.T(), int32(5), val2) } -func (s *SimpleSuite) TestMirrorWithBody(c *check.C) { +func (s *SimpleSuite) TestMirrorWithBody() { var count, countMirror1, countMirror2 int32 body20 := make([]byte, 20) _, err := rand.Read(body20) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) body5 := make([]byte, 5) _, err = rand.Read(body5) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) verifyBody := func(req *http.Request) { b, _ := io.ReadAll(req.Body) switch req.Header.Get("Size") { case "20": - if !bytes.Equal(b, body20) { - c.Fatalf("Not Equals \n%v \n%v", body20, b) - } + require.Equal(s.T(), body20, b) case "5": - if !bytes.Equal(b, body5) { - c.Fatalf("Not Equals \n%v \n%v", body5, b) - } + require.Equal(s.T(), body5, b) default: - c.Fatal("Size header not present") + s.T().Fatal("Size header not present") } } @@ -1075,84 +930,78 @@ func (s *SimpleSuite) TestMirrorWithBody(c *check.C) { mirror1Server := mirror1.URL mirror2Server := mirror2.URL - file := s.adaptFile(c, "fixtures/mirror.toml", struct { + file := s.adaptFile("fixtures/mirror.toml", struct { MainServer string Mirror1Server string Mirror2Server string }{MainServer: mainServer, Mirror1Server: mirror1Server, Mirror2Server: mirror2Server}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) - - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("mirror1", "mirror2", "service1")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", bytes.NewBuffer(body20)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Header.Set("Size", "20") for i := 0; i < 10; i++ { response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } countTotal := atomic.LoadInt32(&count) val1 := atomic.LoadInt32(&countMirror1) val2 := atomic.LoadInt32(&countMirror2) - c.Assert(countTotal, checker.Equals, int32(10)) - c.Assert(val1, checker.Equals, int32(1)) - c.Assert(val2, checker.Equals, int32(5)) + assert.Equal(s.T(), int32(10), countTotal) + assert.Equal(s.T(), int32(1), val1) + assert.Equal(s.T(), int32(5), val2) atomic.StoreInt32(&count, 0) atomic.StoreInt32(&countMirror1, 0) atomic.StoreInt32(&countMirror2, 0) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoamiWithMaxBody", bytes.NewBuffer(body5)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Header.Set("Size", "5") for i := 0; i < 10; i++ { response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } countTotal = atomic.LoadInt32(&count) val1 = atomic.LoadInt32(&countMirror1) val2 = atomic.LoadInt32(&countMirror2) - c.Assert(countTotal, checker.Equals, int32(10)) - c.Assert(val1, checker.Equals, int32(1)) - c.Assert(val2, checker.Equals, int32(5)) + assert.Equal(s.T(), int32(10), countTotal) + assert.Equal(s.T(), int32(1), val1) + assert.Equal(s.T(), int32(5), val2) atomic.StoreInt32(&count, 0) atomic.StoreInt32(&countMirror1, 0) atomic.StoreInt32(&countMirror2, 0) req, err = http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoamiWithMaxBody", bytes.NewBuffer(body20)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Header.Set("Size", "20") for i := 0; i < 10; i++ { response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) } countTotal = atomic.LoadInt32(&count) val1 = atomic.LoadInt32(&countMirror1) val2 = atomic.LoadInt32(&countMirror2) - c.Assert(countTotal, checker.Equals, int32(10)) - c.Assert(val1, checker.Equals, int32(0)) - c.Assert(val2, checker.Equals, int32(0)) + assert.Equal(s.T(), int32(10), countTotal) + assert.Equal(s.T(), int32(0), val1) + assert.Equal(s.T(), int32(0), val2) } -func (s *SimpleSuite) TestMirrorCanceled(c *check.C) { +func (s *SimpleSuite) TestMirrorCanceled() { var count, countMirror1, countMirror2 int32 main := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { @@ -1172,26 +1021,20 @@ func (s *SimpleSuite) TestMirrorCanceled(c *check.C) { mirror1Server := mirror1.URL mirror2Server := mirror2.URL - file := s.adaptFile(c, "fixtures/mirror.toml", struct { + file := s.adaptFile("fixtures/mirror.toml", struct { MainServer string Mirror1Server string Mirror2Server string }{MainServer: mainServer, Mirror1Server: mirror1Server, Mirror2Server: mirror2Server}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("mirror1", "mirror2", "service1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/http/services", 1000*time.Millisecond, try.BodyContains("mirror1", "mirror2", "service1")) + require.NoError(s.T(), err) for i := 0; i < 5; i++ { req, err := http.NewRequest(http.MethodGet, "http://127.0.0.1:8000/whoami", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) client := &http.Client{ Timeout: time.Second, @@ -1203,38 +1046,32 @@ func (s *SimpleSuite) TestMirrorCanceled(c *check.C) { val1 := atomic.LoadInt32(&countMirror1) val2 := atomic.LoadInt32(&countMirror2) - c.Assert(countTotal, checker.Equals, int32(5)) - c.Assert(val1, checker.Equals, int32(0)) - c.Assert(val2, checker.Equals, int32(0)) + assert.Equal(s.T(), int32(5), countTotal) + assert.Equal(s.T(), int32(0), val1) + assert.Equal(s.T(), int32(0), val2) } -func (s *SimpleSuite) TestSecureAPI(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestSecureAPI() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - file := s.adaptFile(c, "./fixtures/simple_secure_api.toml", struct{}{}) - defer os.Remove(file) + file := s.adaptFile("./fixtures/simple_secure_api.toml", struct{}{}) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8000/secure/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/secure/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestContentTypeDisableAutoDetect(c *check.C) { +func (s *SimpleSuite) TestContentTypeDisableAutoDetect() { srv1 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { rw.Header()["Content-Type"] = nil switch req.URL.Path[:4] { @@ -1246,7 +1083,7 @@ func (s *SimpleSuite) TestContentTypeDisableAutoDetect(c *check.C) { rw.WriteHeader(http.StatusOK) _, err := rw.Write([]byte(".testcss { }")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) case "/pdf": if !strings.Contains(req.URL.Path, "noct") { rw.Header().Set("Content-Type", "application/pdf") @@ -1255,62 +1092,56 @@ func (s *SimpleSuite) TestContentTypeDisableAutoDetect(c *check.C) { rw.WriteHeader(http.StatusOK) data, err := os.ReadFile("fixtures/test.pdf") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = rw.Write(data) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } })) defer srv1.Close() - file := s.adaptFile(c, "fixtures/simple_contenttype.toml", struct { + file := s.adaptFile("fixtures/simple_contenttype.toml", struct { Server string }{ Server: srv1.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/ct/nomiddleware", time.Second, try.HasHeaderValue("Content-Type", "text/css", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/ct/nomiddleware", time.Second, try.HasHeaderValue("Content-Type", "application/pdf", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/ct/middlewareauto", time.Second, try.HasHeaderValue("Content-Type", "text/css", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/ct/nomiddlewareauto", time.Second, try.HasHeaderValue("Content-Type", "application/pdf", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/ct/middlewarenoauto", time.Second, try.HasHeaderValue("Content-Type", "text/css", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/ct/nomiddlewarenoauto", time.Second, try.HasHeaderValue("Content-Type", "application/pdf", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/noct/nomiddleware", time.Second, try.HasHeaderValue("Content-Type", "text/plain; charset=utf-8", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/noct/nomiddleware", time.Second, try.HasHeaderValue("Content-Type", "application/pdf", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/noct/middlewareauto", time.Second, try.HasHeaderValue("Content-Type", "text/plain; charset=utf-8", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/noct/nomiddlewareauto", time.Second, try.HasHeaderValue("Content-Type", "application/pdf", false)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/css/noct/middlewarenoauto", time.Second, func(res *http.Response) error { if ct, ok := res.Header["Content-Type"]; ok { @@ -1318,7 +1149,7 @@ func (s *SimpleSuite) TestContentTypeDisableAutoDetect(c *check.C) { } return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/pdf/noct/middlewarenoauto", time.Second, func(res *http.Response) error { if ct, ok := res.Header["Content-Type"]; ok { @@ -1326,31 +1157,25 @@ func (s *SimpleSuite) TestContentTypeDisableAutoDetect(c *check.C) { } return nil }) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *SimpleSuite) TestMuxer(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestMuxer() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") + whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") - file := s.adaptFile(c, "fixtures/simple_muxer.toml", struct { + file := s.adaptFile("fixtures/simple_muxer.toml", struct { Server1 string }{whoami1URL}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("!Host")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("!Host")) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -1430,81 +1255,68 @@ func (s *SimpleSuite) TestMuxer(c *check.C) { for _, test := range testCases { conn, err := net.Dial("tcp", test.target) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = conn.Write([]byte(test.request)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.ReadResponse(bufio.NewReader(conn), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - if resp.StatusCode != test.expected { - c.Errorf("%s failed with %d instead of %d", test.desc, resp.StatusCode, test.expected) - } + assert.Equal(s.T(), test.expected, resp.StatusCode, test.desc) if test.body != "" { body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) - c.Assert(string(body), checker.Contains, test.body) + require.NoError(s.T(), err) + assert.Contains(s.T(), string(body), test.body) } } } -func (s *SimpleSuite) TestDebugLog(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestDebugLog() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - file := s.adaptFile(c, "fixtures/simple_debug_log.toml", struct{}{}) - defer os.Remove(file) + file := s.adaptFile("fixtures/simple_debug_log.toml", struct{}{}) - cmd, output := s.cmdTraefik(withConfigFile(file)) + _, output := s.cmdTraefik(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/whoami`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("PathPrefix(`/whoami`)")) + require.NoError(s.T(), err) req, err := http.NewRequest(http.MethodGet, "http://localhost:8000/whoami", http.NoBody) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req.Header.Set("Autorization", "Bearer ThisIsABearerToken") response, err := http.DefaultClient.Do(req) - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusOK) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusOK, response.StatusCode) if regexp.MustCompile("ThisIsABearerToken").MatchReader(output) { - c.Logf("Traefik Logs: %s", output.String()) - c.Log("Found Authorization Header in Traefik DEBUG logs") - c.Fail() + log.WithoutContext().Infof("Traefik Logs: %s", output.String()) + log.WithoutContext().Info("Found Authorization Header in Traefik DEBUG logs") + s.T().Fail() } } -func (s *SimpleSuite) TestEncodeSemicolons(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestEncodeSemicolons() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP(c, "whoami1"), "80") + whoami1URL := "http://" + net.JoinHostPort(s.getComposeServiceIP("whoami1"), "80") - file := s.adaptFile(c, "fixtures/simple_encode_semicolons.toml", struct { + file := s.adaptFile("fixtures/simple_encode_semicolons.toml", struct { Server1 string }{whoami1URL}) - defer os.Remove(file) - cmd, output := s.traefikCmd(withConfigFile(file)) - defer output(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`other.localhost`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 1*time.Second, try.BodyContains("Host(`other.localhost`)")) + require.NoError(s.T(), err) testCases := []struct { desc string @@ -1531,50 +1343,45 @@ func (s *SimpleSuite) TestEncodeSemicolons(c *check.C) { for _, test := range testCases { conn, err := net.Dial("tcp", test.target) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = conn.Write([]byte(test.request)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.ReadResponse(bufio.NewReader(conn), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if resp.StatusCode != test.expected { - c.Errorf("%s failed with %d instead of %d", test.desc, resp.StatusCode, test.expected) + log.WithoutContext().Infof("%s failed with %d instead of %d", test.desc, resp.StatusCode, test.expected) } if test.body != "" { body, err := io.ReadAll(resp.Body) - c.Assert(err, checker.IsNil) - c.Assert(string(body), checker.Contains, test.body) + require.NoError(s.T(), err) + assert.Contains(s.T(), string(body), test.body) } } } -func (s *SimpleSuite) TestDenyFragment(c *check.C) { - s.createComposeProject(c, "base") +func (s *SimpleSuite) TestDenyFragment() { + s.createComposeProject("base") - s.composeUp(c) - defer s.composeDown(c) + s.composeUp() + defer s.composeDown() - cmd, output := s.traefikCmd(withConfigFile("fixtures/simple_default.toml")) - defer output(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile("fixtures/simple_default.toml")) // Expected a 404 as we did not configure anything - err = try.GetRequest("http://127.0.0.1:8000/", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8000/", 1*time.Second, try.StatusCodeIs(http.StatusNotFound)) + require.NoError(s.T(), err) conn, err := net.Dial("tcp", "127.0.0.1:8000") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = conn.Write([]byte("GET /#/?bar=toto;boo=titi HTTP/1.1\nHost: other.localhost\n\n")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.ReadResponse(bufio.NewReader(conn), nil) - c.Assert(err, checker.IsNil) - c.Assert(resp.StatusCode, checker.Equals, http.StatusBadRequest) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusBadRequest, resp.StatusCode) } diff --git a/integration/tcp_test.go b/integration/tcp_test.go index 707dc1c79..d11185ca3 100644 --- a/integration/tcp_test.go +++ b/integration/tcp_test.go @@ -5,63 +5,69 @@ import ( "crypto/x509" "errors" "fmt" + "io" "net" "net/http" "net/http/httptest" - "os" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type TCPSuite struct{ BaseSuite } -func (s *TCPSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "tcp") - s.composeUp(c) +func TestTCPSuite(t *testing.T) { + suite.Run(t, new(TCPSuite)) } -func (s *TCPSuite) TestMixed(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/mixed.toml", struct { +func (s *TCPSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("tcp") + s.composeUp() +} + +func (s *TCPSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *TCPSuite) TestMixed() { + file := s.adaptFile("fixtures/tcp/mixed.toml", struct { Whoami string WhoamiA string WhoamiB string WhoamiNoCert string }{ - Whoami: "http://" + s.getComposeServiceIP(c, "whoami") + ":80", - WhoamiA: s.getComposeServiceIP(c, "whoami-a") + ":8080", - WhoamiB: s.getComposeServiceIP(c, "whoami-b") + ":8080", - WhoamiNoCert: s.getComposeServiceIP(c, "whoami-no-cert") + ":8080", + Whoami: "http://" + s.getComposeServiceIP("whoami") + ":80", + WhoamiA: s.getComposeServiceIP("whoami-a") + ":8080", + WhoamiB: s.getComposeServiceIP("whoami-b") + ":8080", + WhoamiNoCert: s.getComposeServiceIP("whoami-no-cert") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("Path(`/test`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("Path(`/test`)")) + require.NoError(s.T(), err) // Traefik passes through, termination handled by whoami-a out, err := guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-a.test") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-a") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-a") // Traefik passes through, termination handled by whoami-b out, err = guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-b.test") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-b") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-b") // Termination handled by traefik out, err = guessWho("127.0.0.1:8093", "whoami-c.test", true) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-cert") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-cert") tr1 := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -69,174 +75,143 @@ func (s *TCPSuite) TestMixed(c *check.C) { }, } req, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:8093/whoami/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.RequestWithTransport(req, 10*time.Second, tr1, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) req, err = http.NewRequest(http.MethodGet, "https://127.0.0.1:8093/not-found/", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.RequestWithTransport(req, 10*time.Second, tr1, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8093/test", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8093/not-found", 500*time.Millisecond, try.StatusCodeIs(http.StatusNotFound)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *TCPSuite) TestTLSOptions(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/multi-tls-options.toml", struct { +func (s *TCPSuite) TestTLSOptions() { + file := s.adaptFile("fixtures/tcp/multi-tls-options.toml", struct { WhoamiNoCert string }{ - WhoamiNoCert: s.getComposeServiceIP(c, "whoami-no-cert") + ":8080", + WhoamiNoCert: s.getComposeServiceIP("whoami-no-cert") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-c.test`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-c.test`)")) + require.NoError(s.T(), err) // Check that we can use a client tls version <= 1.2 with hostSNI 'whoami-c.test' out, err := guessWhoTLSMaxVersion("127.0.0.1:8093", "whoami-c.test", true, tls.VersionTLS12) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-cert") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-cert") // Check that we can use a client tls version <= 1.3 with hostSNI 'whoami-d.test' out, err = guessWhoTLSMaxVersion("127.0.0.1:8093", "whoami-d.test", true, tls.VersionTLS13) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-cert") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-cert") // Check that we cannot use a client tls version <= 1.2 with hostSNI 'whoami-d.test' _, err = guessWhoTLSMaxVersion("127.0.0.1:8093", "whoami-d.test", true, tls.VersionTLS12) - c.Assert(err, checker.NotNil) - c.Assert(err.Error(), checker.Contains, "protocol version not supported") + assert.ErrorContains(s.T(), err, "protocol version not supported") // Check that we can't reach a route with an invalid mTLS configuration. conn, err := tls.Dial("tcp", "127.0.0.1:8093", &tls.Config{ ServerName: "whoami-i.test", InsecureSkipVerify: true, }) - c.Assert(conn, checker.IsNil) - c.Assert(err, checker.NotNil) + assert.Nil(s.T(), conn) + assert.Error(s.T(), err) } -func (s *TCPSuite) TestNonTLSFallback(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/non-tls-fallback.toml", struct { +func (s *TCPSuite) TestNonTLSFallback() { + file := s.adaptFile("fixtures/tcp/non-tls-fallback.toml", struct { WhoamiA string WhoamiB string WhoamiNoCert string WhoamiNoTLS string }{ - WhoamiA: s.getComposeServiceIP(c, "whoami-a") + ":8080", - WhoamiB: s.getComposeServiceIP(c, "whoami-b") + ":8080", - WhoamiNoCert: s.getComposeServiceIP(c, "whoami-no-cert") + ":8080", - WhoamiNoTLS: s.getComposeServiceIP(c, "whoami-no-tls") + ":8080", + WhoamiA: s.getComposeServiceIP("whoami-a") + ":8080", + WhoamiB: s.getComposeServiceIP("whoami-b") + ":8080", + WhoamiNoCert: s.getComposeServiceIP("whoami-no-cert") + ":8080", + WhoamiNoTLS: s.getComposeServiceIP("whoami-no-tls") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) + require.NoError(s.T(), err) // Traefik passes through, termination handled by whoami-a out, err := guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-a.test") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-a") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-a") // Traefik passes through, termination handled by whoami-b out, err = guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-b.test") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-b") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-b") // Termination handled by traefik out, err = guessWho("127.0.0.1:8093", "whoami-c.test", true) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-cert") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-cert") out, err = guessWho("127.0.0.1:8093", "", false) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-tls") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-tls") } -func (s *TCPSuite) TestNonTlsTcp(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/non-tls.toml", struct { +func (s *TCPSuite) TestNonTlsTcp() { + file := s.adaptFile("fixtures/tcp/non-tls.toml", struct { WhoamiNoTLS string }{ - WhoamiNoTLS: s.getComposeServiceIP(c, "whoami-no-tls") + ":8080", + WhoamiNoTLS: s.getComposeServiceIP("whoami-no-tls") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) + require.NoError(s.T(), err) // Traefik will forward every requests on the given port to whoami-no-tls out, err := guessWho("127.0.0.1:8093", "", false) - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-no-tls") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-no-tls") } -func (s *TCPSuite) TestCatchAllNoTLS(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/catch-all-no-tls.toml", struct { +func (s *TCPSuite) TestCatchAllNoTLS() { + file := s.adaptFile("fixtures/tcp/catch-all-no-tls.toml", struct { WhoamiBannerAddress string }{ - WhoamiBannerAddress: s.getComposeServiceIP(c, "whoami-banner") + ":8080", + WhoamiBannerAddress: s.getComposeServiceIP("whoami-banner") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) + require.NoError(s.T(), err) // Traefik will forward every requests on the given port to whoami-no-tls out, err := welcome("127.0.0.1:8093") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "Welcome") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "Welcome") } -func (s *TCPSuite) TestCatchAllNoTLSWithHTTPS(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/catch-all-no-tls-with-https.toml", struct { +func (s *TCPSuite) TestCatchAllNoTLSWithHTTPS() { + file := s.adaptFile("fixtures/tcp/catch-all-no-tls-with-https.toml", struct { WhoamiNoTLSAddress string WhoamiURL string }{ - WhoamiNoTLSAddress: s.getComposeServiceIP(c, "whoami-no-tls") + ":8080", - WhoamiURL: "http://" + s.getComposeServiceIP(c, "whoami") + ":80", + WhoamiNoTLSAddress: s.getComposeServiceIP("whoami-no-tls") + ":8080", + WhoamiURL: "http://" + s.getComposeServiceIP("whoami") + ":80", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`*`)")) + require.NoError(s.T(), err) req := httptest.NewRequest(http.MethodGet, "https://127.0.0.1:8093/test", nil) req.RequestURI = "" @@ -246,64 +221,52 @@ func (s *TCPSuite) TestCatchAllNoTLSWithHTTPS(c *check.C) { InsecureSkipVerify: true, }, }, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *TCPSuite) TestMiddlewareAllowList(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/ip-allowlist.toml", struct { +func (s *TCPSuite) TestMiddlewareAllowList() { + file := s.adaptFile("fixtures/tcp/ip-allowlist.toml", struct { WhoamiA string WhoamiB string }{ - WhoamiA: s.getComposeServiceIP(c, "whoami-a") + ":8080", - WhoamiB: s.getComposeServiceIP(c, "whoami-b") + ":8080", + WhoamiA: s.getComposeServiceIP("whoami-a") + ":8080", + WhoamiB: s.getComposeServiceIP("whoami-b") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-a.test`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-a.test`)")) + require.NoError(s.T(), err) // Traefik not passes through, ipWhitelist closes connection _, err = guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-a.test") - c.Assert(err, checker.ErrorMatches, "EOF") + assert.ErrorIs(s.T(), err, io.EOF) // Traefik passes through, termination handled by whoami-b out, err := guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-b.test") - c.Assert(err, checker.IsNil) - c.Assert(out, checker.Contains, "whoami-b") + require.NoError(s.T(), err) + assert.Contains(s.T(), out, "whoami-b") } -func (s *TCPSuite) TestWRR(c *check.C) { - file := s.adaptFile(c, "fixtures/tcp/wrr.toml", struct { +func (s *TCPSuite) TestWRR() { + file := s.adaptFile("fixtures/tcp/wrr.toml", struct { WhoamiB string WhoamiAB string }{ - WhoamiB: s.getComposeServiceIP(c, "whoami-b") + ":8080", - WhoamiAB: s.getComposeServiceIP(c, "whoami-ab") + ":8080", + WhoamiB: s.getComposeServiceIP("whoami-b") + ":8080", + WhoamiAB: s.getComposeServiceIP("whoami-ab") + ":8080", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-b.test`)")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("HostSNI(`whoami-b.test`)")) + require.NoError(s.T(), err) call := map[string]int{} for i := 0; i < 4; i++ { // Traefik passes through, termination handled by whoami-b or whoami-bb out, err := guessWhoTLSPassthrough("127.0.0.1:8093", "whoami-b.test") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) switch { case strings.Contains(out, "whoami-b"): call["whoami-b"]++ @@ -315,7 +278,7 @@ func (s *TCPSuite) TestWRR(c *check.C) { time.Sleep(time.Second) } - c.Assert(call, checker.DeepEquals, map[string]int{"whoami-b": 3, "whoami-ab": 1}) + assert.EqualValues(s.T(), call, map[string]int{"whoami-b": 3, "whoami-ab": 1}) } func welcome(addr string) (string, error) { diff --git a/integration/timeout_test.go b/integration/timeout_test.go index 68c5886ca..b4edb1cf2 100644 --- a/integration/timeout_test.go +++ b/integration/timeout_test.go @@ -4,47 +4,53 @@ import ( "fmt" "net" "net/http" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type TimeoutSuite struct{ BaseSuite } -func (s *TimeoutSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "timeout") - s.composeUp(c) +func TestTimeoutSuite(t *testing.T) { + suite.Run(t, new(TimeoutSuite)) } -func (s *TimeoutSuite) TestForwardingTimeouts(c *check.C) { - timeoutEndpointIP := s.getComposeServiceIP(c, "timeoutEndpoint") - file := s.adaptFile(c, "fixtures/timeout/forwarding_timeouts.toml", struct{ TimeoutEndpoint string }{timeoutEndpointIP}) - defer os.Remove(file) +func (s *TimeoutSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.createComposeProject("timeout") + s.composeUp() +} - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Path(`/dialTimeout`)")) - c.Assert(err, checker.IsNil) +func (s *TimeoutSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *TimeoutSuite) TestForwardingTimeouts() { + timeoutEndpointIP := s.getComposeServiceIP("timeoutEndpoint") + file := s.adaptFile("fixtures/timeout/forwarding_timeouts.toml", struct{ TimeoutEndpoint string }{timeoutEndpointIP}) + + s.traefikCmd(withConfigFile(file)) + + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 60*time.Second, try.BodyContains("Path(`/dialTimeout`)")) + require.NoError(s.T(), err) // This simulates a DialTimeout when connecting to the backend server. response, err := http.Get("http://127.0.0.1:8000/dialTimeout") - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusGatewayTimeout, response.StatusCode) // Check that timeout service is available statusURL := fmt.Sprintf("http://%s/statusTest?status=200", net.JoinHostPort(timeoutEndpointIP, "9000")) - c.Assert(try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK)), checker.IsNil) + assert.NoError(s.T(), try.GetRequest(statusURL, 60*time.Second, try.StatusCodeIs(http.StatusOK))) // This simulates a ResponseHeaderTimeout. response, err = http.Get("http://127.0.0.1:8000/responseHeaderTimeout?sleep=1000") - c.Assert(err, checker.IsNil) - c.Assert(response.StatusCode, checker.Equals, http.StatusGatewayTimeout) + require.NoError(s.T(), err) + assert.Equal(s.T(), http.StatusGatewayTimeout, response.StatusCode) } diff --git a/integration/tls_client_headers_test.go b/integration/tls_client_headers_test.go index 3bc587acd..00a5c995b 100644 --- a/integration/tls_client_headers_test.go +++ b/integration/tls_client_headers_test.go @@ -4,11 +4,13 @@ import ( "crypto/tls" "net/http" "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) const ( @@ -19,20 +21,30 @@ const ( type TLSClientHeadersSuite struct{ BaseSuite } -func (s *TLSClientHeadersSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "tlsclientheaders") - s.composeUp(c) +func TestTLSClientHeadersSuite(t *testing.T) { + suite.Run(t, new(TLSClientHeadersSuite)) } -func (s *TLSClientHeadersSuite) TestTLSClientHeaders(c *check.C) { - rootCertContent, err := os.ReadFile(rootCertPath) - c.Assert(err, check.IsNil) - serverCertContent, err := os.ReadFile(certPemPath) - c.Assert(err, check.IsNil) - ServerKeyContent, err := os.ReadFile(certKeyPath) - c.Assert(err, check.IsNil) +func (s *TLSClientHeadersSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - file := s.adaptFile(c, "fixtures/tlsclientheaders/simple.toml", struct { + s.createComposeProject("tlsclientheaders") + s.composeUp() +} + +func (s *TLSClientHeadersSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *TLSClientHeadersSuite) TestTLSClientHeaders() { + rootCertContent, err := os.ReadFile(rootCertPath) + assert.NoError(s.T(), err) + serverCertContent, err := os.ReadFile(certPemPath) + assert.NoError(s.T(), err) + ServerKeyContent, err := os.ReadFile(certKeyPath) + assert.NoError(s.T(), err) + + file := s.adaptFile("fixtures/tlsclientheaders/simple.toml", struct { RootCertContent string ServerCertContent string ServerKeyContent string @@ -41,22 +53,17 @@ func (s *TLSClientHeadersSuite) TestTLSClientHeaders(c *check.C) { ServerCertContent: string(serverCertContent), ServerKeyContent: string(ServerKeyContent), }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err = cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, try.BodyContains("PathPrefix(`/foo`)")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) request, err := http.NewRequest(http.MethodGet, "https://127.0.0.1:8443/foo", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) certificate, err := tls.LoadX509KeyPair(certPemPath, certKeyPath) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) tr := &http.Transport{ TLSClientConfig: &tls.Config{ @@ -66,5 +73,5 @@ func (s *TLSClientHeadersSuite) TestTLSClientHeaders(c *check.C) { } err = try.RequestWithTransport(request, 2*time.Second, tr, try.BodyContains("Forwarded-Tls-Client-Cert: MIIDNTCCAh0CFD0QQcHXUJuKwMBYDA+bBExVSP26MA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIDAZGcmFuY2UxFTATBgNVBAoMDFRyYWVmaWsgTGFiczEQMA4GA1UECwwHdHJhZWZpazENMAsGA1UEAwwEcm9vdDAeFw0yMTAxMDgxNzQ0MjRaFw0zMTAxMDYxNzQ0MjRaMFgxCzAJBgNVBAYTAkZSMQ8wDQYDVQQIDAZGcmFuY2UxFTATBgNVBAoMDFRyYWVmaWsgTGFiczEQMA4GA1UECwwHdHJhZWZpazEPMA0GA1UEAwwGc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvYK2z8gLPOfFLgXNWP2460aeJ9vrH47x/lhKLlv4amSDHDx8Cmz/6blOUM8XOfMRW1xx++AgChWN9dx/kf7G2xlA5grZxRvUQ6xj7AvFG9TQUA3muNh2hvm9c3IjaZBNKH27bRKuDIBvZBvXdX4NL/aaFy7w7v7IKxk8j4WkfB23sgyH43g4b7NqKHJugZiedFu5GALmtLbShVOFbjWcre7Wvatdw8dIBmiFJqZQT3UjIuGAgqczIShtLxo4V+XyVkIPmzfPrRV+4zoMFIFOIaj3syyxb4krPBtxhe7nz2cWvvq0wePB2y4YbAAoVY8NYpd5JsMFwZtG6Uk59ygv4QIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQDaPg69wNeFNFisfBJTrscqVCTW+B80gMhpLdxXD+KO0/Wgc5xpB/wLSirNtRQyxAa3+EEcIwJv/wdh8EyjlDLSpFm/8ghntrKhkOfIOPDFE41M5HNfx/Fuh5btKEenOL/XdapqtNUt2ZE4RrsfbL79sPYepa9kDUVi2mCbeH5ollZ0MDU68HpB2YwHbCEuQNk5W3pjYK2NaDkVnxTkfEDM1k+3QydO1lqB5JJmcrs59BEveTqaJ3eeh/0I4OOab6OkTTZ0JNjJp1573oxO+fce/bfGud8xHY5gSN9huU7U6RsgvO7Dhmal/sDNl8XC8oU90hVDVXZdA7ewh4jjaoIv")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } diff --git a/integration/tracing_test.go b/integration/tracing_test.go index 2c9582b7b..1c069bacd 100644 --- a/integration/tracing_test.go +++ b/integration/tracing_test.go @@ -2,19 +2,24 @@ package integration import ( "net/http" - "os" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" ) type TracingSuite struct { BaseSuite - whoamiIP string - whoamiPort int - tracerIP string + whoamiIP string + whoamiPort int + tracerZipkinIP string + tracerJaegerIP string +} + +func TestTracingSuite(t *testing.T) { + suite.Run(t, new(TracingSuite)) } type TracingTemplate struct { @@ -24,302 +29,264 @@ type TracingTemplate struct { TraceContextHeaderName string } -func (s *TracingSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "tracing") - s.composeUp(c) +func (s *TracingSuite) SetupSuite() { + s.BaseSuite.SetupSuite() - s.whoamiIP = s.getComposeServiceIP(c, "whoami") + s.createComposeProject("tracing") + s.composeUp() + + s.whoamiIP = s.getComposeServiceIP("whoami") s.whoamiPort = 80 } -func (s *TracingSuite) startZipkin(c *check.C) { - s.composeUp(c, "zipkin") - s.tracerIP = s.getComposeServiceIP(c, "zipkin") +func (s *TracingSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} + +func (s *TracingSuite) startZipkin() { + s.composeUp("zipkin") + s.tracerZipkinIP = s.getComposeServiceIP("zipkin") // Wait for Zipkin to turn ready. - err := try.GetRequest("http://"+s.tracerIP+":9411/api/v2/services", 20*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://"+s.tracerZipkinIP+":9411/api/v2/services", 20*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestZipkinRateLimit(c *check.C) { - s.startZipkin(c) - // defer s.composeStop(c, "zipkin") +func (s *TracingSuite) TestZipkinRateLimit() { + s.startZipkin() - file := s.adaptFile(c, "fixtures/tracing/simple-zipkin.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-zipkin.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerZipkinIP, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusTooManyRequests)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // sleep for 4 seconds to be certain the configured time period has elapsed // then test another request and verify a 200 status code time.Sleep(4 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // continue requests at 3 second intervals to test the other rate limit time period time.Sleep(3 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) time.Sleep(3 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) time.Sleep(3 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusTooManyRequests)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("forward service1/router1@file", "ratelimit-1@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerZipkinIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("forward service1/router1@file", "ratelimit-1@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestZipkinRetry(c *check.C) { - s.startZipkin(c) - defer s.composeStop(c, "zipkin") +func (s *TracingSuite) TestZipkinRetry() { + s.startZipkin() - file := s.adaptFile(c, "fixtures/tracing/simple-zipkin.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-zipkin.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: 81, - IP: s.tracerIP, + IP: s.tracerZipkinIP, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/retry", 500*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("forward service2/router2@file", "retry@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerZipkinIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("forward service2/router2@file", "retry@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestZipkinAuth(c *check.C) { - s.startZipkin(c) - defer s.composeStop(c, "zipkin") +func (s *TracingSuite) TestZipkinAuth() { + s.startZipkin() - file := s.adaptFile(c, "fixtures/tracing/simple-zipkin.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-zipkin.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerZipkinIP, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/auth", 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("entrypoint web", "basic-auth@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerZipkinIP+":9411/api/v2/spans?serviceName=tracing", 20*time.Second, try.BodyContains("entrypoint web", "basic-auth@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) startJaeger(c *check.C) { - s.composeUp(c, "jaeger", "whoami") - s.tracerIP = s.getComposeServiceIP(c, "jaeger") +func (s *TracingSuite) startJaeger() { + s.composeUp("jaeger", "whoami") + s.tracerJaegerIP = s.getComposeServiceIP("jaeger") // Wait for Jaeger to turn ready. - err := try.GetRequest("http://"+s.tracerIP+":16686/api/services", 20*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/services", 20*time.Second, try.StatusCodeIs(http.StatusOK)) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestJaegerRateLimit(c *check.C) { - s.startJaeger(c) - defer s.composeStop(c, "jaeger") +func (s *TracingSuite) TestJaegerRateLimit() { + s.startJaeger() + // defer s.composeStop(c, "jaeger") - file := s.adaptFile(c, "fixtures/tracing/simple-jaeger.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-jaeger.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerJaegerIP, TraceContextHeaderName: "uber-trace-id", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusTooManyRequests)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // sleep for 4 seconds to be certain the configured time period has elapsed // then test another request and verify a 200 status code time.Sleep(4 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) // continue requests at 3 second intervals to test the other rate limit time period time.Sleep(3 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) time.Sleep(3 * time.Second) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/ratelimit", 500*time.Millisecond, try.StatusCodeIs(http.StatusTooManyRequests)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("forward service1/router1@file", "ratelimit-1@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("forward service1/router1@file", "ratelimit-1@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestJaegerRetry(c *check.C) { - s.startJaeger(c) - defer s.composeStop(c, "jaeger") +func (s *TracingSuite) TestJaegerRetry() { + s.startJaeger() + // defer s.composeStop(c, "jaeger") - file := s.adaptFile(c, "fixtures/tracing/simple-jaeger.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-jaeger.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: 81, - IP: s.tracerIP, + IP: s.tracerJaegerIP, TraceContextHeaderName: "uber-trace-id", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/retry", 500*time.Millisecond, try.StatusCodeIs(http.StatusBadGateway)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("forward service2/router2@file", "retry@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("forward service2/router2@file", "retry@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestJaegerAuth(c *check.C) { - s.startJaeger(c) - defer s.composeStop(c, "jaeger") +func (s *TracingSuite) TestJaegerAuth() { + s.startJaeger() + // defer s.composeStop(c, "jaeger") - file := s.adaptFile(c, "fixtures/tracing/simple-jaeger.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-jaeger.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerJaegerIP, TraceContextHeaderName: "uber-trace-id", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/auth", 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestJaegerCustomHeader(c *check.C) { - s.startJaeger(c) - defer s.composeStop(c, "jaeger") +func (s *TracingSuite) TestJaegerCustomHeader() { + s.startJaeger() + // defer s.composeStop(c, "jaeger") - file := s.adaptFile(c, "fixtures/tracing/simple-jaeger.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-jaeger.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerJaegerIP, TraceContextHeaderName: "powpow", }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/auth", 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) + require.NoError(s.T(), err) } -func (s *TracingSuite) TestJaegerAuthCollector(c *check.C) { - s.startJaeger(c) - defer s.composeStop(c, "jaeger") +func (s *TracingSuite) TestJaegerAuthCollector() { + s.startJaeger() + // defer s.composeStop(c, "jaeger") - file := s.adaptFile(c, "fixtures/tracing/simple-jaeger-collector.toml", TracingTemplate{ + file := s.adaptFile("fixtures/tracing/simple-jaeger-collector.toml", TracingTemplate{ WhoamiIP: s.whoamiIP, WhoamiPort: s.whoamiPort, - IP: s.tracerIP, + IP: s.tracerJaegerIP, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", time.Second, try.BodyContains("basic-auth")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8000/auth", 500*time.Millisecond, try.StatusCodeIs(http.StatusUnauthorized)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) - err = try.GetRequest("http://"+s.tracerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) - c.Assert(err, checker.IsNil) + err = try.GetRequest("http://"+s.tracerJaegerIP+":16686/api/traces?service=tracing", 20*time.Second, try.BodyContains("EntryPoint web", "basic-auth@file")) + require.NoError(s.T(), err) } diff --git a/integration/udp_test.go b/integration/udp_test.go index c5ee868a1..5ceafbcae 100644 --- a/integration/udp_test.go +++ b/integration/udp_test.go @@ -3,20 +3,32 @@ package integration import ( "net" "net/http" - "os" "strings" + "testing" "time" - "github.com/go-check/check" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" + "github.com/traefik/traefik/v2/pkg/log" ) type UDPSuite struct{ BaseSuite } -func (s *UDPSuite) SetUpSuite(c *check.C) { - s.createComposeProject(c, "udp") - s.composeUp(c) +func TestUDPSuite(t *testing.T) { + suite.Run(t, new(UDPSuite)) +} + +func (s *UDPSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("udp") + s.composeUp() +} + +func (s *UDPSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() } func guessWhoUDP(addr string) (string, error) { @@ -46,39 +58,33 @@ func guessWhoUDP(addr string) (string, error) { return string(out[:n]), nil } -func (s *UDPSuite) TestWRR(c *check.C) { - file := s.adaptFile(c, "fixtures/udp/wrr.toml", struct { +func (s *UDPSuite) TestWRR() { + file := s.adaptFile("fixtures/udp/wrr.toml", struct { WhoamiAIP string WhoamiBIP string WhoamiCIP string WhoamiDIP string }{ - WhoamiAIP: s.getComposeServiceIP(c, "whoami-a"), - WhoamiBIP: s.getComposeServiceIP(c, "whoami-b"), - WhoamiCIP: s.getComposeServiceIP(c, "whoami-c"), - WhoamiDIP: s.getComposeServiceIP(c, "whoami-d"), + WhoamiAIP: s.getComposeServiceIP("whoami-a"), + WhoamiBIP: s.getComposeServiceIP("whoami-b"), + WhoamiCIP: s.getComposeServiceIP("whoami-c"), + WhoamiDIP: s.getComposeServiceIP("whoami-d"), }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) + s.traefikCmd(withConfigFile(file)) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) - - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("whoami-a")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.StatusCodeIs(http.StatusOK), try.BodyContains("whoami-a")) + require.NoError(s.T(), err) err = try.GetRequest("http://127.0.0.1:8093/who", 5*time.Second, try.StatusCodeIs(http.StatusOK)) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) stop := make(chan struct{}) go func() { call := map[string]int{} for i := 0; i < 8; i++ { out, err := guessWhoUDP("127.0.0.1:8093") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) switch { case strings.Contains(out, "whoami-a"): call["whoami-a"]++ @@ -90,13 +96,13 @@ func (s *UDPSuite) TestWRR(c *check.C) { call["unknown"]++ } } - c.Assert(call, checker.DeepEquals, map[string]int{"whoami-a": 3, "whoami-b": 2, "whoami-c": 3}) + assert.EqualValues(s.T(), call, map[string]int{"whoami-a": 3, "whoami-b": 2, "whoami-c": 3}) close(stop) }() select { case <-stop: case <-time.Tick(5 * time.Second): - c.Error("Timeout") + log.WithoutContext().Info("Timeout") } } diff --git a/integration/websocket_test.go b/integration/websocket_test.go index 33425624f..72a314d58 100644 --- a/integration/websocket_test.go +++ b/integration/websocket_test.go @@ -8,19 +8,25 @@ import ( "net/http" "net/http/httptest" "os" + "testing" "time" - "github.com/go-check/check" gorillawebsocket "github.com/gorilla/websocket" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" - checker "github.com/vdemeester/shakers" "golang.org/x/net/websocket" ) // WebsocketSuite tests suite. type WebsocketSuite struct{ BaseSuite } -func (s *WebsocketSuite) TestBase(c *check.C) { +func TestWebsocketSuite(t *testing.T) { + suite.Run(t, new(WebsocketSuite)) +} + +func (s *WebsocketSuite) TestBase() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -41,36 +47,30 @@ func (s *WebsocketSuite) TestBase(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) conn, _, err := gorillawebsocket.DefaultDialer.Dial("ws://127.0.0.1:8000/ws", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = conn.WriteMessage(gorillawebsocket.TextMessage, []byte("OK")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, msg, err := conn.ReadMessage() - c.Assert(err, checker.IsNil) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestWrongOrigin(c *check.C) { +func (s *WebsocketSuite) TestWrongOrigin() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -91,35 +91,28 @@ func (s *WebsocketSuite) TestWrongOrigin(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) config, err := websocket.NewConfig("ws://127.0.0.1:8000/ws", "ws://127.0.0.1:800") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) conn, err := net.DialTimeout("tcp", "127.0.0.1:8000", time.Second) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, err = websocket.NewClient(config, conn) - c.Assert(err, checker.NotNil) - c.Assert(err, checker.ErrorMatches, "bad status") + assert.ErrorContains(s.T(), err, "bad status") } -func (s *WebsocketSuite) TestOrigin(c *check.C) { +func (s *WebsocketSuite) TestOrigin() { // use default options upgrader := gorillawebsocket.Upgrader{} @@ -141,44 +134,38 @@ func (s *WebsocketSuite) TestOrigin(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) config, err := websocket.NewConfig("ws://127.0.0.1:8000/ws", "ws://127.0.0.1:8000") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) conn, err := net.DialTimeout("tcp", "127.0.0.1:8000", time.Second) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) client, err := websocket.NewClient(config, conn) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) n, err := client.Write([]byte("OK")) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) msg := make([]byte, 2) n, err = client.Read(msg) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestWrongOriginIgnoredByServer(c *check.C) { +func (s *WebsocketSuite) TestWrongOriginIgnoredByServer() { upgrader := gorillawebsocket.Upgrader{CheckOrigin: func(r *http.Request) bool { return true }} @@ -201,44 +188,38 @@ func (s *WebsocketSuite) TestWrongOriginIgnoredByServer(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) config, err := websocket.NewConfig("ws://127.0.0.1:8000/ws", "ws://127.0.0.1:80") - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) conn, err := net.DialTimeout("tcp", "127.0.0.1:8000", time.Second) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) client, err := websocket.NewClient(config, conn) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) n, err := client.Write([]byte("OK")) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) msg := make([]byte, 2) n, err = client.Read(msg) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestSSLTermination(c *check.C) { +func (s *WebsocketSuite) TestSSLTermination() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -258,44 +239,38 @@ func (s *WebsocketSuite) TestSSLTermination(c *check.C) { } } })) - file := s.adaptFile(c, "fixtures/websocket/config_https.toml", struct { + file := s.adaptFile("fixtures/websocket/config_https.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) // Add client self-signed cert roots := x509.NewCertPool() certContent, err := os.ReadFile("./resources/tls/local.cert") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) roots.AppendCertsFromPEM(certContent) gorillawebsocket.DefaultDialer.TLSClientConfig = &tls.Config{ RootCAs: roots, } conn, _, err := gorillawebsocket.DefaultDialer.Dial("wss://127.0.0.1:8000/ws", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = conn.WriteMessage(gorillawebsocket.TextMessage, []byte("OK")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, msg, err := conn.ReadMessage() - c.Assert(err, checker.IsNil) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestBasicAuth(c *check.C) { +func (s *WebsocketSuite) TestBasicAuth() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -306,8 +281,8 @@ func (s *WebsocketSuite) TestBasicAuth(c *check.C) { defer conn.Close() user, password, _ := r.BasicAuth() - c.Assert(user, check.Equals, "traefiker") - c.Assert(password, check.Equals, "secret") + assert.Equal(s.T(), "traefiker", user) + assert.Equal(s.T(), "secret", password) for { mt, message, err := conn.ReadMessage() @@ -320,78 +295,66 @@ func (s *WebsocketSuite) TestBasicAuth(c *check.C) { } } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) config, err := websocket.NewConfig("ws://127.0.0.1:8000/ws", "ws://127.0.0.1:8000") auth := "traefiker:secret" config.Header.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(auth))) - c.Assert(err, check.IsNil) + assert.NoError(s.T(), err) conn, err := net.DialTimeout("tcp", "127.0.0.1:8000", time.Second) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) client, err := websocket.NewClient(config, conn) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) n, err := client.Write([]byte("OK")) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) msg := make([]byte, 2) n, err = client.Read(msg) - c.Assert(err, checker.IsNil) - c.Assert(n, checker.Equals, 2) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), 2, n) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestSpecificResponseFromBackend(c *check.C) { +func (s *WebsocketSuite) TestSpecificResponseFromBackend() { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusUnauthorized) })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) _, resp, err := gorillawebsocket.DefaultDialer.Dial("ws://127.0.0.1:8000/ws", nil) - c.Assert(err, checker.NotNil) - c.Assert(resp.StatusCode, check.Equals, http.StatusUnauthorized) + assert.Error(s.T(), err) + assert.Equal(s.T(), http.StatusUnauthorized, resp.StatusCode) } -func (s *WebsocketSuite) TestURLWithURLEncodedChar(c *check.C) { +func (s *WebsocketSuite) TestURLWithURLEncodedChar() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - c.Assert(r.URL.EscapedPath(), check.Equals, "/ws/http%3A%2F%2Ftest") + assert.Equal(s.T(), "/ws/http%3A%2F%2Ftest", r.URL.EscapedPath()) conn, err := upgrader.Upgrade(w, r, nil) if err != nil { return @@ -409,36 +372,30 @@ func (s *WebsocketSuite) TestURLWithURLEncodedChar(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) conn, _, err := gorillawebsocket.DefaultDialer.Dial("ws://127.0.0.1:8000/ws/http%3A%2F%2Ftest", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = conn.WriteMessage(gorillawebsocket.TextMessage, []byte("OK")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, msg, err := conn.ReadMessage() - c.Assert(err, checker.IsNil) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestSSLhttp2(c *check.C) { +func (s *WebsocketSuite) TestSSLhttp2() { upgrader := gorillawebsocket.Upgrader{} // use default options ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -463,48 +420,42 @@ func (s *WebsocketSuite) TestSSLhttp2(c *check.C) { ts.TLS.NextProtos = append(ts.TLS.NextProtos, `h2`, `http/1.1`) ts.StartTLS() - file := s.adaptFile(c, "fixtures/websocket/config_https.toml", struct { + file := s.adaptFile("fixtures/websocket/config_https.toml", struct { WebsocketServer string }{ WebsocketServer: ts.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG", "--accesslog") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG", "--accesslog") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) // Add client self-signed cert roots := x509.NewCertPool() certContent, err := os.ReadFile("./resources/tls/local.cert") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) roots.AppendCertsFromPEM(certContent) gorillawebsocket.DefaultDialer.TLSClientConfig = &tls.Config{ RootCAs: roots, } conn, _, err := gorillawebsocket.DefaultDialer.Dial("wss://127.0.0.1:8000/echo", nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = conn.WriteMessage(gorillawebsocket.TextMessage, []byte("OK")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, msg, err := conn.ReadMessage() - c.Assert(err, checker.IsNil) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), "OK", string(msg)) } -func (s *WebsocketSuite) TestHeaderAreForwarded(c *check.C) { +func (s *WebsocketSuite) TestHeaderAreForwarded() { upgrader := gorillawebsocket.Upgrader{} // use default options srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - c.Assert(r.Header.Get("X-Token"), check.Equals, "my-token") + assert.Equal(s.T(), "my-token", r.Header.Get("X-Token")) c, err := upgrader.Upgrade(w, r, nil) if err != nil { return @@ -522,33 +473,27 @@ func (s *WebsocketSuite) TestHeaderAreForwarded(c *check.C) { } })) - file := s.adaptFile(c, "fixtures/websocket/config.toml", struct { + file := s.adaptFile("fixtures/websocket/config.toml", struct { WebsocketServer string }{ WebsocketServer: srv.URL, }) - defer os.Remove(file) - cmd, display := s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") - defer display(c) - - err := cmd.Start() - c.Assert(err, check.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file), "--log.level=DEBUG") // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) - c.Assert(err, checker.IsNil) + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 10*time.Second, try.BodyContains("127.0.0.1")) + require.NoError(s.T(), err) headers := http.Header{} headers.Add("X-Token", "my-token") conn, _, err := gorillawebsocket.DefaultDialer.Dial("ws://127.0.0.1:8000/ws", headers) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) err = conn.WriteMessage(gorillawebsocket.TextMessage, []byte("OK")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) _, msg, err := conn.ReadMessage() - c.Assert(err, checker.IsNil) - c.Assert(string(msg), checker.Equals, "OK") + require.NoError(s.T(), err) + assert.Equal(s.T(), "OK", string(msg)) } diff --git a/integration/zk_test.go b/integration/zk_test.go index 63dcbb0b7..6eb62a9f0 100644 --- a/integration/zk_test.go +++ b/integration/zk_test.go @@ -8,16 +8,18 @@ import ( "net/http" "os" "path/filepath" + "testing" "time" - "github.com/go-check/check" "github.com/kvtools/valkeyrie" "github.com/kvtools/valkeyrie/store" "github.com/kvtools/zookeeper" "github.com/pmezard/go-difflib/difflib" + "github.com/stretchr/testify/require" + "github.com/stretchr/testify/suite" "github.com/traefik/traefik/v2/integration/try" "github.com/traefik/traefik/v2/pkg/api" - checker "github.com/vdemeester/shakers" + "github.com/traefik/traefik/v2/pkg/log" ) // Zk test suites. @@ -27,11 +29,17 @@ type ZookeeperSuite struct { zookeeperAddr string } -func (s *ZookeeperSuite) setupStore(c *check.C) { - s.createComposeProject(c, "zookeeper") - s.composeUp(c) +func TestZookeeperSuite(t *testing.T) { + suite.Run(t, new(ZookeeperSuite)) +} - s.zookeeperAddr = net.JoinHostPort(s.getComposeServiceIP(c, "zookeeper"), "2181") +func (s *ZookeeperSuite) SetupSuite() { + s.BaseSuite.SetupSuite() + + s.createComposeProject("zookeeper") + s.composeUp() + + s.zookeeperAddr = net.JoinHostPort(s.getComposeServiceIP("zookeeper"), "2181") var err error s.kvClient, err = valkeyrie.NewStore( @@ -42,20 +50,19 @@ func (s *ZookeeperSuite) setupStore(c *check.C) { ConnectionTimeout: 10 * time.Second, }, ) - if err != nil { - c.Fatal("Cannot create store zookeeper") - } + require.NoError(s.T(), err, "Cannot create store zookeeper") // wait for zk err = try.Do(60*time.Second, try.KVExists(s.kvClient, "test")) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } -func (s *ZookeeperSuite) TestSimpleConfiguration(c *check.C) { - s.setupStore(c) +func (s *ZookeeperSuite) TearDownSuite() { + s.BaseSuite.TearDownSuite() +} - file := s.adaptFile(c, "fixtures/zookeeper/simple.toml", struct{ ZkAddress string }{s.zookeeperAddr}) - defer os.Remove(file) +func (s *ZookeeperSuite) TestSimpleConfiguration() { + file := s.adaptFile("fixtures/zookeeper/simple.toml", struct{ ZkAddress string }{s.zookeeperAddr}) data := map[string]string{ "traefik/http/routers/Router0/entryPoints/0": "web", @@ -105,39 +112,35 @@ func (s *ZookeeperSuite) TestSimpleConfiguration(c *check.C) { for k, v := range data { err := s.kvClient.Put(context.Background(), k, []byte(v), nil) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } - cmd, display := s.traefikCmd(withConfigFile(file)) - defer display(c) - err := cmd.Start() - c.Assert(err, checker.IsNil) - defer s.killCmd(cmd) + s.traefikCmd(withConfigFile(file)) // wait for traefik - err = try.GetRequest("http://127.0.0.1:8080/api/rawdata", 2*time.Second, + err := try.GetRequest("http://127.0.0.1:8080/api/rawdata", 5*time.Second, try.BodyContains(`"striper@zookeeper":`, `"compressor@zookeeper":`, `"srvcA@zookeeper":`, `"srvcB@zookeeper":`), ) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) resp, err := http.Get("http://127.0.0.1:8080/api/rawdata") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) var obtained api.RunTimeRepresentation err = json.NewDecoder(resp.Body).Decode(&obtained) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) got, err := json.MarshalIndent(obtained, "", " ") - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) expectedJSON := filepath.FromSlash("testdata/rawdata-zk.json") if *updateExpected { err = os.WriteFile(expectedJSON, got, 0o666) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) } expected, err := os.ReadFile(expectedJSON) - c.Assert(err, checker.IsNil) + require.NoError(s.T(), err) if !bytes.Equal(expected, got) { diff := difflib.UnifiedDiff{ @@ -149,7 +152,7 @@ func (s *ZookeeperSuite) TestSimpleConfiguration(c *check.C) { } text, err := difflib.GetUnifiedDiffString(diff) - c.Assert(err, checker.IsNil) - c.Error(text) + require.NoError(s.T(), err) + log.WithoutContext().Info(text) } } diff --git a/script/code-gen.sh b/script/code-gen.sh index 91507478f..0d1f309c2 100755 --- a/script/code-gen.sh +++ b/script/code-gen.sh @@ -5,7 +5,7 @@ set -e -o pipefail source /go/src/k8s.io/code-generator/kube_codegen.sh -git config --global --add safe.directory /go/src/${PROJECT_MODULE} +git config --global --add safe.directory "/go/src/${PROJECT_MODULE}" rm -rf "/go/src/${PROJECT_MODULE}/${MODULE_VERSION}" mkdir -p "/go/src/${PROJECT_MODULE}/${MODULE_VERSION}/" diff --git a/script/test-integration b/script/test-integration index 13a4ab342..a6afba7d1 100755 --- a/script/test-integration +++ b/script/test-integration @@ -3,18 +3,9 @@ set -e export DEST=. -TESTFLAGS+=("-test.timeout=20m" -check.v) - -if [ -n "${VERBOSE}" ]; then - TESTFLAGS+=(-v) -elif [ -n "${VERBOSE_INTEGRATION}" ]; then - TESTFLAGS+=(-v) -fi - -cd integration echo "Testing against..." docker version # shellcheck disable=SC2086 # shellcheck disable=SC2048 -CGO_ENABLED=0 go test -integration ${TESTFLAGS[*]} +go test ./integration -test.timeout=20m -failfast -v ${TESTFLAGS[*]} diff --git a/script/validate-lint b/script/validate-lint index 22d339634..937f7f13b 100755 --- a/script/validate-lint +++ b/script/validate-lint @@ -1,3 +1,3 @@ #!/usr/bin/env bash -golangci-lint run \ No newline at end of file +golangci-lint run