MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / testLiveRecordingCommand

Function testLiveRecordingCommand

internal/integration/liverecording.go:68–81  ·  view source on GitHub ↗
(t *testing.T, m *mock, name string, id *ari.Key, expected error, fn func(*ari.Key) error)

Source from the content-addressed store, hash-verified

66}
67
68func testLiveRecordingCommand(t *testing.T, m *mock, name string, id *ari.Key, expected error, fn func(*ari.Key) error) {
69 m.LiveRecording.On(name, id).Return(expected)
70 err := fn(id)
71 failed := false
72 failed = failed || err == nil && expected != nil
73 failed = failed || err != nil && expected == nil
74 failed = failed || err != nil && expected != nil && err.Error() != expected.Error()
75 if failed {
76 t.Errorf("Expected live recording %s(%s) to return '%v', got '%v'",
77 name, id, expected, err,
78 )
79 }
80 m.LiveRecording.AssertCalled(t, name, id)
81}
82
83/*
84func TestLiveRecordingDelete(t *testing.T, s Server) {

Callers 6

TestLiveRecordingMuteFunction · 0.85
TestLiveRecordingPauseFunction · 0.85
TestLiveRecordingStopFunction · 0.85
TestLiveRecordingUnmuteFunction · 0.85
TestLiveRecordingResumeFunction · 0.85
TestLiveRecordingScrapFunction · 0.85

Calls 1

ErrorMethod · 0.45

Tested by 6

TestLiveRecordingMuteFunction · 0.68
TestLiveRecordingPauseFunction · 0.68
TestLiveRecordingStopFunction · 0.68
TestLiveRecordingUnmuteFunction · 0.68
TestLiveRecordingResumeFunction · 0.68
TestLiveRecordingScrapFunction · 0.68