Fixed tests

This commit is contained in:
Marc Ole Bulling
2026-01-06 22:44:35 +01:00
parent de36c1b532
commit f315b3b81b
3 changed files with 3 additions and 3 deletions
@@ -108,7 +108,7 @@ func Upload(input io.Reader, file models.File) (string, error) {
}
// Download downloads a file from AWS
func Download(writer io.WriterAt, file models.File) (int64, error) {
func download(writer io.WriterAt, file models.File) (int64, error) {
if !isValidCredentials() {
return 0, errors.New("invalid credentials / invalid bucket / invalid region")
}
@@ -44,7 +44,7 @@ func Upload(input io.Reader, file models.File) (string, error) {
}
// Download downloads a file from AWS
func Download(writer io.WriterAt, file models.File) (int64, error) {
func download(writer io.WriterAt, file models.File) (int64, error) {
return 0, errors.New(errorString)
}
@@ -87,7 +87,7 @@ func TestUploadToAws(t *testing.T) {
func TestDownloadFromAws(t *testing.T) {
test.FileDoesNotExist(t, "test")
file, _ := os.Create("test")
size, err := Download(file, testFile)
size, err := download(file, testFile)
test.IsNil(t, err)
test.IsEqualBool(t, size == 16, true)
test.FileExists(t, "test")