feat(06-02): add freqCfgs parameter to RunSynthesis
- Change RunSynthesis signature to accept injected config map (D-10) - Replace hardcoded synth.ClassFreqConfigs with passed-in freqCfgs - Update all three RunSynthesis calls in encode tests to pass synth.ClassFreqConfigs
This commit is contained in:
+3
-3
@@ -53,7 +53,7 @@ func TestMP3Valid(t *testing.T) {
|
||||
tmpFile.Close()
|
||||
defer os.Remove(tmpPath)
|
||||
|
||||
if err := RunSynthesis(snaps, tmpPath); err != nil {
|
||||
if err := RunSynthesis(snaps, tmpPath, synth.ClassFreqConfigs); err != nil {
|
||||
t.Fatalf("RunSynthesis: %v", err)
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ func TestZeroPacketError(t *testing.T) {
|
||||
tmpPath := "/tmp/netsynth-should-not-exist-" + t.Name() + ".mp3"
|
||||
defer os.Remove(tmpPath)
|
||||
|
||||
err := RunSynthesis([]classify.WindowSnapshot{}, tmpPath)
|
||||
err := RunSynthesis([]classify.WindowSnapshot{}, tmpPath, synth.ClassFreqConfigs)
|
||||
if err == nil {
|
||||
t.Fatal("expected error for empty snapshot slice, got nil")
|
||||
}
|
||||
@@ -118,7 +118,7 @@ func TestZeroPacketError(t *testing.T) {
|
||||
{Counts: map[classify.TrafficClass]int64{}, TotalPackets: 0, WindowIndex: 0},
|
||||
{Counts: map[classify.TrafficClass]int64{}, TotalPackets: 0, WindowIndex: 1},
|
||||
}
|
||||
err2 := RunSynthesis(zeroSnaps, tmpPath2)
|
||||
err2 := RunSynthesis(zeroSnaps, tmpPath2, synth.ClassFreqConfigs)
|
||||
if err2 == nil {
|
||||
t.Fatal("expected error for zero-packet snapshots, got nil")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user