FFmpeg: Remove unstable "directory is unwritable" tests

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-27 11:46:27 +02:00
parent 44f561b7d6
commit e888b0ddb1
4 changed files with 25 additions and 88 deletions

View File

@@ -1,6 +1,7 @@
package ffmpeg
import (
"path/filepath"
"strings"
"testing"
"time"
@@ -61,3 +62,13 @@ func TestExtractPngImageCmd(t *testing.T) {
RunCommandTest(t, "png", srcName, destName, cmd, true)
}
// Negative: ffmpeg binary is missing; command execution should error immediately.
func TestExtractImageCmd_MissingBinary(t *testing.T) {
opt := encode.NewPreviewImageOptions("/path/does/not/exist/ffmpeg", time.Second*1)
srcName := fs.Abs("./testdata/25fps.vp9")
destName := filepath.Join(t.TempDir(), "frame.jpg")
cmd := ExtractImageCmd(srcName, destName, opt)
err := cmd.Run()
assert.Error(t, err)
}