Changes tests to use testify.require at api4/file_test.go fixe… (#12814)

Этот коммит содержится в:
Maurício Linhares
2019-10-23 08:45:15 -04:00
коммит произвёл Ben Schumacher
родитель a96565671d
Коммит 23aa193f28
2 изменённых файлов: 88 добавлений и 145 удалений

Просмотреть файл

@@ -5,6 +5,7 @@ package api4
import (
"fmt"
"github.com/stretchr/testify/require"
"io/ioutil"
"net"
"net/http"
@@ -673,6 +674,10 @@ func CheckErrorMessage(t *testing.T, resp *model.Response, errorId string) {
}
}
func CheckStartsWith(t *testing.T, value, prefix, message string) {
require.True(t, strings.HasPrefix(value, prefix), message, value)
}
// Similar to s3.New() but allows initialization of signature v2 or signature v4 client.
// If signV2 input is false, function always returns signature v4.
//