Replacing several test util function with a generic version
ChangeLog: - updated several test utils with a generic PtrOf - updated references using iotils (Deprecated) with os equivalent import.
This commit is contained in:
parent
6a0798eb06
commit
99be328e9d
15 changed files with 144 additions and 211 deletions
|
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/go-jet/jet/v2/generator/sqlite"
|
||||
"github.com/go-jet/jet/v2/internal/utils/errfmt"
|
||||
"github.com/go-jet/jet/v2/tests/internal/utils/repo"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
|
@ -184,7 +183,7 @@ func initPostgresDB(dbType string, connectionString string) error {
|
|||
}
|
||||
|
||||
func execFile(db *sql.DB, sqlFilePath string) error {
|
||||
testSampleSql, err := ioutil.ReadFile(sqlFilePath)
|
||||
testSampleSql, err := os.ReadFile(sqlFilePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read sql file - %s: %w", sqlFilePath, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue