Skip to content

Commit

Permalink
test doesn't know resulting image filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Jul 4, 2024
1 parent 53fbb7c commit 06b5621
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions test/images.go
Original file line number Diff line number Diff line change
@@ -45,10 +45,10 @@ func (r *Runner) runImagesTest(t *testing.T, req *rpc.StartEgressRequest, test *
p, err := config.GetValidatedPipelineConfig(r.ServiceConfig, req)
require.NoError(t, err)

r.verifyImages(t, p, test.imageFilenameSuffix, res)
r.verifyImages(t, p, res)
}

func (r *Runner) verifyImages(t *testing.T, p *config.PipelineConfig, filenameSuffix livekit.ImageFileSuffix, res *livekit.EgressInfo) {
func (r *Runner) verifyImages(t *testing.T, p *config.PipelineConfig, res *livekit.EgressInfo) {
// egress info
require.Equal(t, res.Error == "", res.Status != livekit.EgressStatus_EGRESS_FAILED)
require.NotZero(t, res.StartedAt)
@@ -63,7 +63,7 @@ func (r *Runner) verifyImages(t *testing.T, p *config.PipelineConfig, filenameSu
imgConfig := p.GetImageConfigs()[0]
if uploadConfig := p.GetImageConfigs()[0].UploadConfig; uploadConfig != nil {
for i := range images.ImageCount {
storagePath := fmt.Sprintf("%s_%d%s", imgConfig.ImagePrefix, i, imgConfig.ImageExtension)
storagePath := fmt.Sprintf("%s_%05d%s", imgConfig.ImagePrefix, i, imgConfig.ImageExtension)
filename := path.Base(storagePath)
localPath := path.Join(r.FilePrefix, filename)
download(t, uploadConfig, localPath, storagePath)
4 changes: 2 additions & 2 deletions test/track_composite.go
Original file line number Diff line number Diff line change
@@ -250,10 +250,10 @@ func (r *Runner) testTrackCompositeImages(t *testing.T) {
t.Run("4D/TrackComposite/Images", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "VP8",
name: "H264",
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeH264,
filename: "tcs_{publisher_identity}_vp8_{time}",
filename: "tc_images_h264",
},
} {
r.runTrackTest(t, test.name, test.audioCodec, test.videoCodec,

0 comments on commit 06b5621

Please sign in to comment.