format Unix

This commit is contained in:
admju
2024-09-02 11:44:44 +00:00
parent 11f56722f7
commit 9cf954776f
24 changed files with 1097 additions and 1097 deletions

View File

@@ -1,28 +1,28 @@
package utils
// https://pkg.go.dev/github.com/stretchr/testify/assert#Nilf
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/jarcoal/httpmock"
)
func TestDownload(t *testing.T){
httpmock.Activate()
defer httpmock.DeactivateAndReset()
url := "http://test.download.com"
httpmock.RegisterResponder("GET", url,
httpmock.NewStringResponder(200, `CONTENU_URL`))
dest := filepath.Join(TEST_DEST_DIR, "url")
err := DownloadFromUrl(dest, url, 777)
assert.Nilf(t, err, "error message %s", url)
assert.FileExists(t, dest, "DownloadFromUrl error")
}
package utils
// https://pkg.go.dev/github.com/stretchr/testify/assert#Nilf
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
"github.com/jarcoal/httpmock"
)
func TestDownload(t *testing.T){
httpmock.Activate()
defer httpmock.DeactivateAndReset()
url := "http://test.download.com"
httpmock.RegisterResponder("GET", url,
httpmock.NewStringResponder(200, `CONTENU_URL`))
dest := filepath.Join(TEST_DEST_DIR, "url")
err := DownloadFromUrl(dest, url, 777)
assert.Nilf(t, err, "error message %s", url)
assert.FileExists(t, dest, "DownloadFromUrl error")
}