Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Oct 9, 2023
1 parent 0a90cdd commit f9d7f45
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions service/docker/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ func TestFailedJobsRetention(t *testing.T) {
log, err := mlog.NewLogger()
require.NoError(t, err)

os.Setenv("TEST_MODE", "true")
defer os.Unsetenv("TEST_MODE")

var recCfg recorder.RecorderConfig
recCfg.SetDefaults()
recCfg.SiteURL = "http://localhost:8065"
recCfg.CallID = "8w8jorhr7j83uqr6y1st894hqe"
recCfg.ThreadID = "udzdsg7dwidbzcidx5khrf8nee"
recCfg.AuthToken = "qj75unbsef83ik9p7ueypb6iyw"
recCfg.RecordingID = "dtomsek53i8eukrhnb31ugyhea"

interval := dockerRetentionJobInterval
dockerRetentionJobInterval = time.Second
defer func() {
Expand All @@ -134,8 +145,10 @@ func TestFailedJobsRetention(t *testing.T) {

stopCh := make(chan struct{})
job, err := jobService.CreateJob(job.Config{
Type: job.TypeRecording,
Runner: testRunner,
Type: job.TypeRecording,
Runner: testRunner,
MaxDurationSec: 60,
InputData: recCfg.ToMap(),
}, func(_ job.Job, success bool) error {
require.True(t, success)
close(stopCh)
Expand Down

0 comments on commit f9d7f45

Please sign in to comment.