diff --git a/go.mod b/go.mod index 4f72a04..f3b62b7 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,6 @@ require ( github.com/pkg/errors v0.8.0 golang.org/x/crypto v0.0.0-20180808211826-de0752318171 // indirect golang.org/x/net v0.0.0-20180811021610-c39426892332 // indirect - golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0 // indirect + golang.org/x/sys v0.0.0-20180814072032-4e1fef560951 // indirect golang.org/x/text v0.3.0 // indirect ) diff --git a/go.sum b/go.sum index bc0ab54..9ec54e8 100644 --- a/go.sum +++ b/go.sum @@ -16,7 +16,7 @@ golang.org/x/crypto v0.0.0-20180808211826-de0752318171 h1:vYogbvSFj2YXcjQxFHu/rA golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0 h1:8H8QZJ30plJyIVj60H3lr8TZGIq2Fh3Cyrs/ZNg1foU= -golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180814072032-4e1fef560951 h1:VfGaXvV9wRnTJreeGDE0FWEDiQP1WWUDmutCjCThDz8= +golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/internal/app/s3manager/bucket_view_test.go b/internal/app/s3manager/bucket_view_test.go index 973194d..b9ad4ab 100644 --- a/internal/app/s3manager/bucket_view_test.go +++ b/internal/app/s3manager/bucket_view_test.go @@ -11,6 +11,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" "github.com/matryer/way" minio "github.com/minio/minio-go" @@ -117,7 +118,7 @@ func TestHandleBucketView(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ ListObjectsV2Func: tc.listObjectsV2Func, } diff --git a/internal/app/s3manager/buckets_view_test.go b/internal/app/s3manager/buckets_view_test.go index df24427..55fecb3 100644 --- a/internal/app/s3manager/buckets_view_test.go +++ b/internal/app/s3manager/buckets_view_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" minio "github.com/minio/minio-go" ) @@ -46,7 +47,7 @@ func TestHandleBucketsView(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ ListBucketsFunc: tc.listBucketsFunc, } diff --git a/internal/app/s3manager/create_bucket_test.go b/internal/app/s3manager/create_bucket_test.go index 60d8e4a..6689481 100644 --- a/internal/app/s3manager/create_bucket_test.go +++ b/internal/app/s3manager/create_bucket_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" ) @@ -57,7 +58,7 @@ func TestHandleCreateBucket(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ MakeBucketFunc: tc.makeBucketFunc, } diff --git a/internal/app/s3manager/delete_bucket_test.go b/internal/app/s3manager/delete_bucket_test.go index d0238d1..bf63a88 100644 --- a/internal/app/s3manager/delete_bucket_test.go +++ b/internal/app/s3manager/delete_bucket_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" ) @@ -37,7 +38,7 @@ func TestHandleDeleteBucket(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ RemoveBucketFunc: tc.removeBucketFunc, } diff --git a/internal/app/s3manager/delete_object_test.go b/internal/app/s3manager/delete_object_test.go index 0a08a7a..1e16fe1 100644 --- a/internal/app/s3manager/delete_object_test.go +++ b/internal/app/s3manager/delete_object_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" ) @@ -37,7 +38,7 @@ func TestHandleDeleteObject(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ RemoveObjectFunc: tc.removeObjectFunc, } diff --git a/internal/app/s3manager/get_object_test.go b/internal/app/s3manager/get_object_test.go index 423e2aa..41f3324 100644 --- a/internal/app/s3manager/get_object_test.go +++ b/internal/app/s3manager/get_object_test.go @@ -10,6 +10,7 @@ import ( "testing" "github.com/mastertinner/s3manager/internal/app/s3manager" + "github.com/mastertinner/s3manager/internal/app/s3manager/mocks" "github.com/matryer/is" "github.com/matryer/way" minio "github.com/minio/minio-go" @@ -38,7 +39,7 @@ func TestHandleGetObject(t *testing.T) { t.Run(tcID, func(t *testing.T) { is := is.New(t) - s3 := &S3Mock{ + s3 := &mocks.S3Mock{ GetObjectFunc: tc.getObjectFunc, } diff --git a/internal/app/s3manager/s3_test.go b/internal/app/s3manager/mocks/s3.go similarity index 99% rename from internal/app/s3manager/s3_test.go rename to internal/app/s3manager/mocks/s3.go index 3cfca80..412ed61 100644 --- a/internal/app/s3manager/s3_test.go +++ b/internal/app/s3manager/mocks/s3.go @@ -1,7 +1,7 @@ // Code generated by moq; DO NOT EDIT. // github.com/matryer/moq -package s3manager_test +package mocks import ( "github.com/minio/minio-go" diff --git a/internal/app/s3manager/s3.go b/internal/app/s3manager/s3.go index 4a9b605..786a63d 100644 --- a/internal/app/s3manager/s3.go +++ b/internal/app/s3manager/s3.go @@ -6,7 +6,7 @@ import ( minio "github.com/minio/minio-go" ) -//go:generate moq -out s3_test.go -pkg s3manager_test . S3 +//go:generate moq -out mocks/s3.go -pkg mocks . S3 // S3 is a client to interact with S3 storage. type S3 interface {