Unify naming of subtests
This commit is contained in:
parent
58f7065e61
commit
6a3b51f491
|
@ -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,
|
||||
|
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue