mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-03 03:24:34 -04:00
fix(tests): use recorded realtime events
Read event snapshots through the fake transport accessor. The merged scene and diarization tests still used removed fields and methods. Assisted-by: Codex:GPT-6 go-vet
This commit is contained in:
1 parent
8e87b078d2
commit
7132cc02cd
2 files changed
+3
-3
No files matched your search
@@ -303,7 +303,7 @@ var _ = Describe("liveTurnState", func() {
|
||||
lts.drainEvents(3.4)
|
||||
|
||||
var got []types.ConversationItemInputAudioTranscriptionSegmentEvent
|
||||
for _, e := range ftr.events() {
|
||||
for _, e := range ftr.recordedEvents() {
|
||||
if seg, ok := e.(types.ConversationItemInputAudioTranscriptionSegmentEvent); ok {
|
||||
got = append(got, seg)
|
||||
}
|
||||
@@ -326,7 +326,7 @@ var _ = Describe("liveTurnState", func() {
|
||||
lts.drainEvents(1.0)
|
||||
|
||||
var got []types.ConversationItemSoundDetectionEvent
|
||||
for _, e := range ftr.events() {
|
||||
for _, e := range ftr.recordedEvents() {
|
||||
if sd, ok := e.(types.ConversationItemSoundDetectionEvent); ok {
|
||||
got = append(got, sd)
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ var _ = Describe("emitTranscription", func() {
|
||||
|
||||
segmentEvents := func(t *fakeTransport) []types.ConversationItemInputAudioTranscriptionSegmentEvent {
|
||||
var out []types.ConversationItemInputAudioTranscriptionSegmentEvent
|
||||
for _, e := range t.sent {
|
||||
for _, e := range t.recordedEvents() {
|
||||
if seg, ok := e.(types.ConversationItemInputAudioTranscriptionSegmentEvent); ok {
|
||||
out = append(out, seg)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user