mirror of
https://github.com/wneessen/go-mail.git
synced 2024-12-22 18:50:37 +01:00
Update tempfile path in unit tests
Changed tempfile creation path to "testdata/tmp" for better test organization and to ensure temporary files are stored within the testdata directory. This change affects the TestMsg_AttachFile_unixOnly tests.
This commit is contained in:
parent
7b9df7de47
commit
8fb05a33ff
2 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
|
||||
func TestMsg_AttachFile_unixOnly(t *testing.T) {
|
||||
t.Run("AttachFile with fileFromFS fails on open", func(t *testing.T) {
|
||||
tempfile, err := os.CreateTemp("", "attachfile-unable-to-open.*.txt")
|
||||
tempfile, err := os.CreateTemp("testdata/tmp", "attachfile-unable-to-open.*.txt")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temp file: %s", err)
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ func TestMsg_AttachFile_unixOnly(t *testing.T) {
|
|||
}
|
||||
})
|
||||
t.Run("AttachFile with fileFromFS fails on copy", func(t *testing.T) {
|
||||
tempfile, err := os.CreateTemp("", "attachfile-close-early.*.txt")
|
||||
tempfile, err := os.CreateTemp("testdata/tmp", "attachfile-close-early.*.txt")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temp file: %s", err)
|
||||
}
|
||||
|
|
0
testdata/tmp/.gitkeep
vendored
Normal file
0
testdata/tmp/.gitkeep
vendored
Normal file
Loading…
Reference in a new issue