From 6a3b51f491dc233db6da6e0f09a148ce7c8904d6 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 13 Oct 2016 16:45:40 +0200 Subject: [PATCH] Unify naming of subtests --- get_test.go | 2 +- head_test.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/get_test.go b/get_test.go index 4c9ecb5..e7d079e 100644 --- a/get_test.go +++ b/get_test.go @@ -24,7 +24,7 @@ var reader = &closingStringReader{ } func TestGet(t *testing.T) { - SubTest(t, "Successful download", func(t *testing.T, store *MockFullDataStore) { + SubTest(t, "Download", func(t *testing.T, store *MockFullDataStore) { gomock.InOrder( store.EXPECT().GetInfo("yes").Return(FileInfo{ Offset: 5, diff --git a/head_test.go b/head_test.go index 531149c..85e0851 100644 --- a/head_test.go +++ b/head_test.go @@ -9,7 +9,7 @@ import ( ) func TestHead(t *testing.T) { - SubTest(t, "Successful HEAD request", func(t *testing.T, store *MockFullDataStore) { + SubTest(t, "Status", func(t *testing.T, store *MockFullDataStore) { store.EXPECT().GetInfo("yes").Return(FileInfo{ Offset: 11, Size: 44, @@ -24,7 +24,6 @@ func TestHead(t *testing.T) { }) res := (&httpTest{ - Name: "Successful request", Method: "HEAD", URL: "yes", ReqHeader: map[string]string{ @@ -46,7 +45,7 @@ func TestHead(t *testing.T) { } }) - SubTest(t, "Non-existing file", func(t *testing.T, store *MockFullDataStore) { + SubTest(t, "UploadNotFoundFail", func(t *testing.T, store *MockFullDataStore) { store.EXPECT().GetInfo("no").Return(FileInfo{}, os.ErrNotExist) handler, _ := NewHandler(Config{