diff --git a/tests/integration/taskservice_upload_test.go b/tests/integration/taskservice_upload_test.go index b2c8bc4..9714f9b 100644 --- a/tests/integration/taskservice_upload_test.go +++ b/tests/integration/taskservice_upload_test.go @@ -36,13 +36,13 @@ func createMultipartFileHeader(filePath string) *multipart.FileHeader { formWriter := multipart.NewWriter(buffWriter) formPart, err := formWriter.CreateFormFile("file", filepath.Base(file.Name())) if err != nil { - log.Fatal(err) + log.Println(err) return nil } // copy the content of the file to the form's file field if _, err := io.Copy(formPart, file); err != nil { - log.Fatal(err) + log.Println(err) return nil } @@ -57,14 +57,14 @@ func createMultipartFileHeader(filePath string) *multipart.FileHeader { // read the form components with max stored memory of 1MB multipartForm, err := formReader.ReadForm(1 << 20) if err != nil { - log.Fatal(err) + log.Println(err) return nil } // return the multipart file header files, exists := multipartForm.File["file"] if !exists || len(files) == 0 { - log.Fatal("multipart file not exists") + log.Println("multipart file not exists") return nil } @@ -126,9 +126,3 @@ func TestTaskService_Upload(t *testing.T) { assert.Len(t, rpmFiles, 1) assert.Equal(t, fileName, rpmFiles[0].Filename) } - -// createTestRPMFile создает тестовый RPM файл с заглушкой -func createTestRPMFile(filePath string) error { - content := []byte("dummy rpm content") - return os.WriteFile(filePath, content, 0644) -}