fix: probe issues
This commit is contained in:
@@ -33,3 +33,19 @@ func Test_compressVideo(t *testing.T) {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func Test_runCommand(t *testing.T) {
|
||||
Convey("runCommand", t, func() {
|
||||
Convey("test ffprobe", func() {
|
||||
file := "/mnt/yangpingliang/publish/原唱《义烈女》庄兄你一席话义重情长(杨红霞).mp4"
|
||||
if _, err := os.Stat(file); os.IsNotExist(err) {
|
||||
t.Fatalf("File does not exist: %s", file)
|
||||
}
|
||||
|
||||
width, height, err := getVideoSize(file)
|
||||
So(err, ShouldBeNil)
|
||||
So(width, ShouldNotBeZeroValue)
|
||||
So(height, ShouldNotBeZeroValue)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user