mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 13:07:36 +03:00
The http connection is being closed before sending all data. May have something to do with the Range header
29 lines
647 B
Go
29 lines
647 B
Go
package stream
|
|
|
|
import (
|
|
. "github.com/deluan/gosonic/tests"
|
|
. "github.com/smartystreets/goconvey/convey"
|
|
"testing"
|
|
)
|
|
|
|
func TestDownsampling(t *testing.T) {
|
|
|
|
Init(t, false)
|
|
|
|
Convey("Subject: createDownsamplingCommand", t, func() {
|
|
|
|
Convey("It should create a valid command line", func() {
|
|
cmd, args := createDownsamplingCommand("/music library/file.mp3", 128)
|
|
|
|
So(cmd, ShouldEqual, "ffmpeg")
|
|
So(args[0], ShouldEqual, "-i")
|
|
So(args[1], ShouldEqual, "/music library/file.mp3")
|
|
So(args[2], ShouldEqual, "-b:a")
|
|
So(args[3], ShouldEqual, "128k")
|
|
So(args[4], ShouldEqual, "mp3")
|
|
So(args[5], ShouldEqual, "-")
|
|
})
|
|
|
|
})
|
|
|
|
}
|