diff --git a/test/builder.go b/test/builder.go index 4489aca5..b9700f61 100644 --- a/test/builder.go +++ b/test/builder.go @@ -289,7 +289,7 @@ func (r *Runner) buildStreamOutputs(o *streamOptions) []*livekit.StreamOutput { } func (r *Runner) buildSegmentOutputs(o *segmentOptions) []*livekit.SegmentedFileOutput { - if u := r.getUploadConfig(); u != nil && o.suffix == livekit.SegmentedFileSuffix_INDEX { + if u := r.getUploadConfig(); u != nil { output := &livekit.SegmentedFileOutput{ FilenamePrefix: path.Join(uploadPrefix, o.prefix), PlaylistName: o.playlist, diff --git a/test/segments.go b/test/segments.go index 6c6e2687..7ecc2ea3 100644 --- a/test/segments.go +++ b/test/segments.go @@ -210,15 +210,17 @@ func (r *Runner) verifySegmentOutput(t *testing.T, p *config.PipelineConfig, fil localPlaylistPath = path.Join(r.FilePrefix, path.Base(storedPlaylistPath)) download(t, p.GetSegmentConfig().StorageConfig, localPlaylistPath, storedPlaylistPath) - manifestLocal := path.Join(path.Dir(localPlaylistPath), res.EgressId+".json") - manifestStorage := path.Join(path.Dir(storedPlaylistPath), res.EgressId+".json") - manifest := loadManifest(t, p.GetSegmentConfig().StorageConfig, manifestLocal, manifestStorage) - - for _, playlist := range manifest.Playlists { - require.Equal(t, segmentCount, len(playlist.Segments)) - for _, segment := range playlist.Segments { - localPath := path.Join(r.FilePrefix, path.Base(segment.Filename)) - download(t, p.GetSegmentConfig().StorageConfig, localPath, segment.Filename) + if plType == m3u8.PlaylistTypeEvent { + manifestLocal := path.Join(path.Dir(localPlaylistPath), res.EgressId+".json") + manifestStorage := path.Join(path.Dir(storedPlaylistPath), res.EgressId+".json") + manifest := loadManifest(t, p.GetSegmentConfig().StorageConfig, manifestLocal, manifestStorage) + + for _, playlist := range manifest.Playlists { + require.Equal(t, segmentCount, len(playlist.Segments)) + for _, segment := range playlist.Segments { + localPath := path.Join(r.FilePrefix, path.Base(segment.Filename)) + download(t, p.GetSegmentConfig().StorageConfig, localPath, segment.Filename) + } } }