diff --git a/Makefile b/Makefile index af6c78e..f61f4fd 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ check: .check-fmt .check-vet .check-lint .check-misspell .check-ineffassign .check-lint: @golint `go list ./...` \ | grep -v /id/ \ - | grep -v /mock/ \ + | grep -v /tunnelmock/ \ | tee /dev/stderr | ifne false .PHONY: .check-misspell diff --git a/client_test.go b/client_test.go index d705e05..7448245 100644 --- a/client_test.go +++ b/client_test.go @@ -13,8 +13,8 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/mmatczuk/go-http-tunnel/mock" "github.com/mmatczuk/go-http-tunnel/proto" + "github.com/mmatczuk/go-http-tunnel/tunnelmock" ) func TestClient_Dial(t *testing.T) { @@ -48,7 +48,7 @@ func TestClient_DialBackoff(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() - b := mock.NewMockBackoff(ctrl) + b := tunnelmock.NewMockBackoff(ctrl) gomock.InOrder( b.EXPECT().NextBackOff().Return(50*time.Millisecond).Times(2), b.EXPECT().NextBackOff().Return(-time.Millisecond), diff --git a/integration_test.go b/integration_test.go index 84dc2d7..df738e4 100644 --- a/integration_test.go +++ b/integration_test.go @@ -301,7 +301,7 @@ func port(addr net.Addr) string { } func selfSignedCert() (tls.Certificate, id.ID) { - cert, err := tls.LoadX509KeyPair("./test-fixtures/selfsigned.crt", "./test-fixtures/selfsigned.key") + cert, err := tls.LoadX509KeyPair("./testdata/selfsigned.crt", "./testdata/selfsigned.key") if err != nil { panic(err) } diff --git a/log/filterlogger_test.go b/log/filterlogger_test.go index 25c3802..fff1a2b 100644 --- a/log/filterlogger_test.go +++ b/log/filterlogger_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/mmatczuk/go-http-tunnel/mock" + "github.com/mmatczuk/go-http-tunnel/tunnelmock" ) func TestFilterLogger_Log(t *testing.T) { @@ -17,7 +17,7 @@ func TestFilterLogger_Log(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() - b := mock.NewMockLogger(ctrl) + b := tunnelmock.NewMockLogger(ctrl) f := NewFilterLogger(b, 2) b.EXPECT().Log("level", 0) f.Log("level", 0) diff --git a/log/log_test.go b/log/log_test.go index 66ef77a..d2573f9 100644 --- a/log/log_test.go +++ b/log/log_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/mmatczuk/go-http-tunnel/mock" + "github.com/mmatczuk/go-http-tunnel/tunnelmock" ) func TestContext_Log(t *testing.T) { @@ -17,7 +17,7 @@ func TestContext_Log(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() - b := mock.NewMockLogger(ctrl) + b := tunnelmock.NewMockLogger(ctrl) b.EXPECT().Log("key", "val", "sufix", "") NewContext(b).With("sufix", "").Log("key", "val") diff --git a/test-fixtures/selfsigned.crt b/testdata/selfsigned.crt similarity index 100% rename from test-fixtures/selfsigned.crt rename to testdata/selfsigned.crt diff --git a/test-fixtures/selfsigned.key b/testdata/selfsigned.key similarity index 100% rename from test-fixtures/selfsigned.key rename to testdata/selfsigned.key diff --git a/mock/backoff.go b/tunnelmock/backoff.go similarity index 98% rename from mock/backoff.go rename to tunnelmock/backoff.go index 6e6203a..a0e2c27 100644 --- a/mock/backoff.go +++ b/tunnelmock/backoff.go @@ -5,7 +5,7 @@ // Automatically generated by MockGen. DO NOT EDIT! // Source: github.com/mmatczuk/go-http-tunnel (interfaces: Backoff) -package mock +package tunnelmock import ( gomock "github.com/golang/mock/gomock" diff --git a/mock/logger.go b/tunnelmock/logger.go similarity index 98% rename from mock/logger.go rename to tunnelmock/logger.go index d755b36..2f16598 100644 --- a/mock/logger.go +++ b/tunnelmock/logger.go @@ -5,7 +5,7 @@ // Automatically generated by MockGen. DO NOT EDIT! // Source: github.com/mmatczuk/go-http-tunnel/log (interfaces: Logger) -package mock +package tunnelmock import ( gomock "github.com/golang/mock/gomock"