Unify naming of subtests

This commit is contained in:
Marius 2016-10-13 16:45:40 +02:00
parent 58f7065e61
commit 6a3b51f491
2 changed files with 3 additions and 4 deletions

View File

@ -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,

View File

@ -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{