From adc8aab80965a8f482c3ef7e6b7dc2aba09ed5b8 Mon Sep 17 00:00:00 2001 From: postmannen Date: Mon, 2 Dec 2024 15:44:40 +0100 Subject: [PATCH] fixed error with not found filename in copy test, remove debug logs --- requests_copy.go | 5 +++-- requests_file_handling.go | 2 -- requests_test.go | 3 ++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requests_copy.go b/requests_copy.go index 06ce326..abcaa62 100644 --- a/requests_copy.go +++ b/requests_copy.go @@ -424,8 +424,9 @@ func copySrcSubProcFunc(proc process, cia copyInitialData, cancel context.Cancel // We don't care about the error. fi, err := os.Stat(file) if err != nil { - fmt.Printf(" ** DEBUG: STAT ERROR: %v\n", err) - fmt.Printf(" ** DEBUG: fi: %#v\n", fi) + er := fmt.Errorf("DEBUG: ERROR while os.Stat(file): copySrcProcFunc, fileInfo: %v, err: %v\n", fi, err) + proc.errorKernel.errSend(proc, Message{}, er, logWarning) + } // We want to be able to send the reply message when the copying is done, diff --git a/requests_file_handling.go b/requests_file_handling.go index d9c5edf..f4d4464 100644 --- a/requests_file_handling.go +++ b/requests_file_handling.go @@ -17,8 +17,6 @@ func reqWriteFileOrSocket(isAppend bool, proc process, message Message) error { fileName, folderTree := selectFileNaming(message, proc) file := filepath.Join(folderTree, fileName) - fmt.Printf("******************* DEBUG: CHECK IF SOCKET OR FILE: %v\n", file) - // log.Fatalf("EXITING\n") // Check the file is a unix socket, and if it is we write the diff --git a/requests_test.go b/requests_test.go index 652b9a3..e76b442 100644 --- a/requests_test.go +++ b/requests_test.go @@ -446,7 +446,8 @@ func checkREQCopySrc(conf *Configuration, t *testing.T, tmpDir string) error { "methodArgs": ["` + srcfp + `","central","` + dstfp + `","20","10"], "ACKTimeout":5, "retries":3, - "methodTimeout": 10 + "methodTimeout": 10, + "fileName": "filecopy2.log" } ]`