Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav-malani committed Oct 11, 2022
1 parent 2df8044 commit 1f476be
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions jobsdb/jobsdb_backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"context"
"database/sql"
"fmt"
"io"
"os"
"strings"
"testing"
Expand Down Expand Up @@ -190,6 +189,7 @@ func insertDuplicateStatus(statusList []*JobStatusT, duplicateCount int) []*JobS
}
return statusList
}

func (*backupTestCase) insertRTData(t *testing.T, jobs []*JobT, statusList []*JobStatusT, cleanup *testhelper.Cleanup) {
triggerAddNewDS := make(chan time.Time)

Expand Down Expand Up @@ -332,25 +332,6 @@ func (*backupTestCase) downloadFile(t *testing.T, fm filemanager.FileManager, fi
return file
}

func (*backupTestCase) openFile(t *testing.T, filename string, cleanup *testhelper.Cleanup) *os.File {
f, err := os.Open(filename)
require.NoError(t, err, "expected no error")
cleanup.Cleanup(func() {
f.Close()
})
return f
}

func (*backupTestCase) readGzipFile(t *testing.T, file *os.File) []byte {
gz, err := gzip.NewReader(file)
require.NoError(t, err)
defer gz.Close()

r, err := io.ReadAll(gz)
require.NoError(t, err)
return r
}

func (*backupTestCase) readGzipJobFile(filename string) ([]*JobT, error) {
file, err := os.Open(filename)
if err != nil {
Expand Down

0 comments on commit 1f476be

Please sign in to comment.