mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 06:06:03 -06:00
renaming
This commit is contained in:
parent
262f210796
commit
342b0b5f81
9 changed files with 10 additions and 10 deletions
2
Makefile
2
Makefile
|
|
@ -19,7 +19,7 @@ check: .check-fmt .check-vet .check-lint .check-misspell .check-ineffassign
|
||||||
.check-lint:
|
.check-lint:
|
||||||
@golint `go list ./...` \
|
@golint `go list ./...` \
|
||||||
| grep -v /id/ \
|
| grep -v /id/ \
|
||||||
| grep -v /mock/ \
|
| grep -v /tunnelmock/ \
|
||||||
| tee /dev/stderr | ifne false
|
| tee /dev/stderr | ifne false
|
||||||
|
|
||||||
.PHONY: .check-misspell
|
.PHONY: .check-misspell
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"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/proto"
|
||||||
|
"github.com/mmatczuk/go-http-tunnel/tunnelmock"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestClient_Dial(t *testing.T) {
|
func TestClient_Dial(t *testing.T) {
|
||||||
|
|
@ -48,7 +48,7 @@ func TestClient_DialBackoff(t *testing.T) {
|
||||||
ctrl := gomock.NewController(t)
|
ctrl := gomock.NewController(t)
|
||||||
defer ctrl.Finish()
|
defer ctrl.Finish()
|
||||||
|
|
||||||
b := mock.NewMockBackoff(ctrl)
|
b := tunnelmock.NewMockBackoff(ctrl)
|
||||||
gomock.InOrder(
|
gomock.InOrder(
|
||||||
b.EXPECT().NextBackOff().Return(50*time.Millisecond).Times(2),
|
b.EXPECT().NextBackOff().Return(50*time.Millisecond).Times(2),
|
||||||
b.EXPECT().NextBackOff().Return(-time.Millisecond),
|
b.EXPECT().NextBackOff().Return(-time.Millisecond),
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,7 @@ func port(addr net.Addr) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func selfSignedCert() (tls.Certificate, id.ID) {
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"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) {
|
func TestFilterLogger_Log(t *testing.T) {
|
||||||
|
|
@ -17,7 +17,7 @@ func TestFilterLogger_Log(t *testing.T) {
|
||||||
ctrl := gomock.NewController(t)
|
ctrl := gomock.NewController(t)
|
||||||
defer ctrl.Finish()
|
defer ctrl.Finish()
|
||||||
|
|
||||||
b := mock.NewMockLogger(ctrl)
|
b := tunnelmock.NewMockLogger(ctrl)
|
||||||
f := NewFilterLogger(b, 2)
|
f := NewFilterLogger(b, 2)
|
||||||
b.EXPECT().Log("level", 0)
|
b.EXPECT().Log("level", 0)
|
||||||
f.Log("level", 0)
|
f.Log("level", 0)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/golang/mock/gomock"
|
"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) {
|
func TestContext_Log(t *testing.T) {
|
||||||
|
|
@ -17,7 +17,7 @@ func TestContext_Log(t *testing.T) {
|
||||||
ctrl := gomock.NewController(t)
|
ctrl := gomock.NewController(t)
|
||||||
defer ctrl.Finish()
|
defer ctrl.Finish()
|
||||||
|
|
||||||
b := mock.NewMockLogger(ctrl)
|
b := tunnelmock.NewMockLogger(ctrl)
|
||||||
b.EXPECT().Log("key", "val", "sufix", "")
|
b.EXPECT().Log("key", "val", "sufix", "")
|
||||||
NewContext(b).With("sufix", "").Log("key", "val")
|
NewContext(b).With("sufix", "").Log("key", "val")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// Automatically generated by MockGen. DO NOT EDIT!
|
// Automatically generated by MockGen. DO NOT EDIT!
|
||||||
// Source: github.com/mmatczuk/go-http-tunnel (interfaces: Backoff)
|
// Source: github.com/mmatczuk/go-http-tunnel (interfaces: Backoff)
|
||||||
|
|
||||||
package mock
|
package tunnelmock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
// Automatically generated by MockGen. DO NOT EDIT!
|
// Automatically generated by MockGen. DO NOT EDIT!
|
||||||
// Source: github.com/mmatczuk/go-http-tunnel/log (interfaces: Logger)
|
// Source: github.com/mmatczuk/go-http-tunnel/log (interfaces: Logger)
|
||||||
|
|
||||||
package mock
|
package tunnelmock
|
||||||
|
|
||||||
import (
|
import (
|
||||||
gomock "github.com/golang/mock/gomock"
|
gomock "github.com/golang/mock/gomock"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue