[MM-37772] Idiomatic naming (URL, URI, API) (#18128)

* s/Url/URL/g & s/Uri/URI/g

* s/Api/API/g
Этот коммит содержится в:
Ben Schumacher
2021-08-16 19:46:44 +02:00
коммит произвёл GitHub
родитель a7f5512ff3
Коммит 757dc96461
155 изменённых файлов: 1680 добавлений и 1681 удалений

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

@@ -60,7 +60,7 @@ func fileBytes(t *testing.T, path string) []byte {
func testDoUploadFileRequest(t testing.TB, c *model.Client4, url string, blob []byte, contentType string,
contentLength int64) (*model.FileUploadResponse, *model.Response, error) {
req, err := http.NewRequest("POST", c.ApiUrl+"/files"+url, bytes.NewReader(blob))
req, err := http.NewRequest("POST", c.APIURL+"/files"+url, bytes.NewReader(blob))
require.NoError(t, err)
if contentLength != 0 {
@@ -1049,7 +1049,7 @@ func TestGetPublicFile(t *testing.T) {
info, err := th.App.Srv().Store.FileInfo().Get(fileId)
require.NoError(t, err)
link := th.App.GeneratePublicLink(client.Url, info)
link := th.App.GeneratePublicLink(client.URL, info)
resp, err := http.Get(link)
require.NoError(t, err)
@@ -1082,7 +1082,7 @@ func TestGetPublicFile(t *testing.T) {
require.NoError(t, th.cleanupTestFile(fileInfo))
th.cleanupTestFile(info)
link = th.App.GeneratePublicLink(client.Url, info)
link = th.App.GeneratePublicLink(client.URL, info)
resp, err = http.Get(link)
require.NoError(t, err)
require.Equal(t, http.StatusNotFound, resp.StatusCode, "should've failed to get file after it is deleted")