Skip to content

Commit 680e19a

Browse files
committed
feat: ensure streaming extension is started and stopped during health check tests
1 parent 4926be7 commit 680e19a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

extensions/webrtc/errors_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,12 @@ func TestExtension_HealthCheck(t *testing.T) {
357357
t.Error("health check should fail before starting")
358358
}
359359

360+
// Start streaming extension first (required for health checks)
361+
err = streamingExt.Start(ctx)
362+
if err != nil {
363+
t.Fatalf("failed to start streaming extension: %v", err)
364+
}
365+
360366
// Start extension
361367
err = webrtcExt.Start(ctx)
362368
if err != nil {
@@ -375,6 +381,12 @@ func TestExtension_HealthCheck(t *testing.T) {
375381
t.Fatalf("failed to stop extension: %v", err)
376382
}
377383

384+
// Stop streaming extension
385+
err = streamingExt.Stop(ctx)
386+
if err != nil {
387+
t.Fatalf("failed to stop streaming extension: %v", err)
388+
}
389+
378390
// Test health check after stopping
379391
err = webrtcExt.Health(ctx)
380392
if err == nil {

0 commit comments

Comments
 (0)