MCPcopy
hub / github.com/livekit/livekit / TestParticipantDataBlob_AddAndGet

Function TestParticipantDataBlob_AddAndGet

pkg/rtc/participant_data_blob_test.go:42–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestParticipantDataBlob_AddAndGet(t *testing.T) {
43 a := newTestDataBlob()
44
45 key := genericKey("blob-1")
46 contents := []byte("definition-bytes")
47
48 a.Add(&livekit.DataBlob{Key: key, Contents: contents})
49
50 got := a.Get(key)
51 require.NotNil(t, got)
52 require.Equal(t, key.String(), got.Key.String())
53 require.Equal(t, contents, got.Contents)
54}
55
56func TestParticipantDataBlob_AddOverwrites(t *testing.T) {
57 a := newTestDataBlob()

Callers

nothing calls this directly

Calls 5

newTestDataBlobFunction · 0.85
genericKeyFunction · 0.85
AddMethod · 0.45
GetMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected