Newer
Older
package mediamdl
import (
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func Test_compressVideo(t *testing.T) {
inputPath := "../testingdata/testData/mediamdl/video/sample.avi"
inputPath, _ = filepath.Abs(inputPath)
outputPath := "../testingdata/testData/mediamdl/video/sample-compress-video.mp4"
outputPath, _ = filepath.Abs(outputPath)
err := compressVideo(inputPath, outputPath)
assert.NoError(t, err, "This will not thrown an error.")
}
func Test_resizeVideo(t *testing.T) {
inputPath := "../testingdata/testData/mediamdl/video/sample.mp4"
inputPath, _ = filepath.Abs(inputPath)
outputPath := "../testingdata/testData/mediamdl/video/sample-resize-video.mp4"
outputPath, _ = filepath.Abs(outputPath)
err := resizeVideo(inputPath, "100", "100", outputPath)
assert.NoError(t, err, "This will not thrown an error.")
}