(t *testing.T)
| 221 | } |
| 222 | |
| 223 | func TestGetDataBlob(t *testing.T) { |
| 224 | p := newParticipantWithDataBlob(t, true, 0, 0) |
| 225 | |
| 226 | key := genericKey("blob-1") |
| 227 | require.Nil(t, p.GetDataBlob(key)) |
| 228 | |
| 229 | blob := &livekit.DataBlob{ |
| 230 | Key: key, |
| 231 | Contents: []byte("definition"), |
| 232 | } |
| 233 | p.dataBlob.Add(blob) |
| 234 | got := p.GetDataBlob(key) |
| 235 | require.NotNil(t, got) |
| 236 | require.Equal(t, key.String(), got.Key.String()) |
| 237 | require.Equal(t, []byte("definition"), got.Contents) |
| 238 | } |
| 239 | |
| 240 | func TestProcessGetDataBlobRequest(t *testing.T) { |
| 241 | t.Run("returns NOT_FOUND when publisher is nil", func(t *testing.T) { |
nothing calls this directly
no test coverage detected