Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
Signed-off-by: Bartlomiej Plotka <[email protected]>
  • Loading branch information
bwplotka committed Jan 29, 2021
1 parent 421d082 commit 0c9f1cc
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ lint: $(FAILLINT) $(GOLANGCI_LINT) $(MISSPELL) build format docs check-git deps
$(call require_clean_work_tree,"detected not clean master before running lint - run make lint and commit changes.")
@echo ">> verifying imported "
for dir in $(MODULES) ; do \
cd $${dir} && $(FAILLINT) -paths "fmt.{Print,PrintfPrintln,Sprint}" -ignore-tests ./...; && \
cd $${dir} && $(FAILLINT) -paths "fmt.{Print,PrintfPrintln,Sprint}" -ignore-tests ./... && \
$(FAILLINT) -paths "github.com/stretchr/testify=github.com/efficientgo/tools/core/pkg/testutil" ./...; \
done
@echo ">> examining all of the Go files"
Expand Down
4 changes: 0 additions & 4 deletions core/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand All @@ -34,5 +32,3 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
3 changes: 3 additions & 0 deletions core/pkg/backoff/backoff.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package backoff

// Copied from https://github.com/cortexproject/cortex/blob/0ec7b9664a01d538f1f49580b4c359a5c3cc755a/pkg/util/backoff.go
Expand Down
3 changes: 3 additions & 0 deletions core/pkg/backoff/backoff_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package backoff

// Copied from https://github.com/cortexproject/cortex/blob/0ec7b9664a01d538f1f49580b4c359a5c3cc755a/pkg/util/backoff.go
Expand Down
3 changes: 3 additions & 0 deletions e2e/cli.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down
3 changes: 3 additions & 0 deletions e2e/composite_service.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down
3 changes: 3 additions & 0 deletions e2e/db/db.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2edb

import (
Expand Down
2 changes: 1 addition & 1 deletion e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/efficientgo/tools/e2e
go 1.15

require (
github.com/efficientgo/tools/core v0.0.0-20210129204550-29f654ba5ec3
github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6
github.com/go-kit/kit v0.10.0
github.com/minio/minio-go/v7 v7.0.7
github.com/pkg/errors v0.9.1
Expand Down
5 changes: 3 additions & 2 deletions e2e/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6 h1:UMDR56yUMYNVtwMCL6DccrxuYBVDTRRHPWIb8bMa1tk=
github.com/efficientgo/tools/core v0.0.0-20210129205121-421d0828c9a6/go.mod h1:OmVcnJopJL8d3X3sSXTiypGoUSgFq1aDGmlrdi9dn/M=
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
Expand Down Expand Up @@ -288,9 +290,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
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=
Expand Down
3 changes: 3 additions & 0 deletions e2e/internal/matchers/matcher.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

// Copyright 2017 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions e2e/internal/matchers/regexp.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

// Copyright 2020 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
3 changes: 3 additions & 0 deletions e2e/internal/s3/s3.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.

Expand Down
3 changes: 3 additions & 0 deletions e2e/metrics.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down
8 changes: 6 additions & 2 deletions e2e/scenario.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down Expand Up @@ -42,7 +45,7 @@ func (l *logger) Log(keyvals ...interface{}) error {
b.WriteString(time.Now().Format("15:04:05"))

for _, v := range keyvals {
b.WriteString(" " + fmt.Sprint(v))
b.WriteString(" " + fmt.Sprintf("%v", v))
}

b.WriteString("\n")
Expand Down Expand Up @@ -260,6 +263,7 @@ func existDockerNetwork(logger log.Logger, networkName string) (bool, error) {
if err != nil {
logger.Log(string(out))
logger.Log("Unable to check if docker network", networkName, "exists:", err.Error())
return false, err
}

return strings.TrimSpace(string(out)) != "", nil
Expand All @@ -273,7 +277,7 @@ func getTempDirectory() (string, error) {
dir string
err error
)
// If a temp dir is referenced, return that
// If a temp dir is referenced, return that.
if os.Getenv("E2E_TEMP_DIR") != "" {
dir = os.Getenv("E2E_TEMP_DIR")
} else {
Expand Down
3 changes: 3 additions & 0 deletions e2e/scenario_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e_test

import (
Expand Down
9 changes: 6 additions & 3 deletions e2e/service.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down Expand Up @@ -391,7 +394,7 @@ type ReadinessProbe interface {
Ready(service *ConcreteService) (err error)
}

// HTTPReadinessProbe checks readiness by making HTTP call and checking for expected HTTP status code
// HTTPReadinessProbe checks readiness by making HTTP call and checking for expected HTTP status code.
type HTTPReadinessProbe struct {
port int
path string
Expand Down Expand Up @@ -466,7 +469,7 @@ func (p *TCPReadinessProbe) Ready(service *ConcreteService) (err error) {
return conn.Close()
}

// CmdReadinessProbe checks readiness by `Exec`ing a command (within container) which returns 0 to consider status being ready
// CmdReadinessProbe checks readiness by `Exec`ing a command (within container) which returns 0 to consider status being ready.
type CmdReadinessProbe struct {
cmd *Command
}
Expand Down Expand Up @@ -525,7 +528,7 @@ func NewHTTPService(
}

func (s *HTTPService) Metrics() (_ string, err error) {
// Map the container port to the local port
// Map the container port to the local port.
localPort := s.networkPortsContainerToLocal[s.httpPort]

// Fetch metrics.
Expand Down
3 changes: 3 additions & 0 deletions e2e/service_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) The EfficientGo Authors.
// Licensed under the Apache License 2.0.

package e2e

import (
Expand Down

0 comments on commit 0c9f1cc

Please sign in to comment.