feat: upload audio, get a private Swedish transcript, discuss it (#33, ADR-033) #39
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"git.d-ma.be/mathias/tapir/internal/config"
|
||||
)
|
||||
|
||||
// The converter is told the configured maximum, so a file whose header lies about its
|
||||
// length cannot become hours of WAV (adversarial review F2).
|
||||
|
||||
func TestNewConverter_IsCappedAtTheConfiguredMaximumDuration(t *testing.T) {
|
||||
var cfg config.Config
|
||||
cfg.FFmpegBin = "/usr/local/bin/ffmpeg"
|
||||
cfg.UploadMaxDuration = 90 * time.Minute
|
||||
|
||||
c := newConverter(cfg)
|
||||
|
||||
if c.Bin != "/usr/local/bin/ffmpeg" {
|
||||
t.Errorf("Bin = %q", c.Bin)
|
||||
}
|
||||
if c.MaxSeconds != 5400 {
|
||||
t.Errorf("MaxSeconds = %v, want 5400", c.MaxSeconds)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user