Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kareemmahlees committed Feb 4, 2024
1 parent ffa5ece commit c1f4643
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
12 changes: 6 additions & 6 deletions internal/db/tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ func (suite *TablesTestSuite) TearDownSuite() {

func (suite *TablesTestSuite) BeforeTest(suiteName, testName string) {
queryString := "CREATE TABLE test ( name varchar(255) );"
suite.sqliteConnection.Exec(queryString)
suite.pgConnection.Exec(queryString)
suite.mysqlConnection.Exec(queryString)
_, _ = suite.sqliteConnection.Exec(queryString)
_, _ = suite.pgConnection.Exec(queryString)
_, _ = suite.mysqlConnection.Exec(queryString)
}

func (suite *TablesTestSuite) AfterTest(suiteName, testName string) {
queryString := "DROP TABLE test;"
suite.sqliteConnection.Exec(queryString)
suite.pgConnection.Exec(queryString)
suite.mysqlConnection.Exec(queryString)
_, _ = suite.sqliteConnection.Exec(queryString)
_, _ = suite.pgConnection.Exec(queryString)
_, _ = suite.mysqlConnection.Exec(queryString)
}

func (suite *TablesTestSuite) TestDescribeTable() {
Expand Down
12 changes: 6 additions & 6 deletions internal/rest/tableRoutes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ func (suite *TableRoutesTestSuite) TearDownSuite() {

func (suite *TableRoutesTestSuite) BeforeTest(suiteName, testName string) {
queryString := "CREATE TABLE test ( name varchar(255) );"
suite.sqliteConnection.Exec(queryString)
suite.pgConnection.Exec(queryString)
suite.mysqlConnection.Exec(queryString)
_, _ = suite.sqliteConnection.Exec(queryString)
_, _ = suite.pgConnection.Exec(queryString)
_, _ = suite.mysqlConnection.Exec(queryString)
}

func (suite *TableRoutesTestSuite) AfterTest(suiteName, testName string) {
queryString := "DROP TABLE test;"
suite.sqliteConnection.Exec(queryString)
suite.pgConnection.Exec(queryString)
suite.mysqlConnection.Exec(queryString)
_, _ = suite.sqliteConnection.Exec(queryString)
_, _ = suite.pgConnection.Exec(queryString)
_, _ = suite.mysqlConnection.Exec(queryString)
}

func (suite *TableRoutesTestSuite) TestRegisterTablesRoutes() {
Expand Down
8 changes: 6 additions & 2 deletions utils/testHelpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import (
func TestCreatePostgresContainer(t *testing.T) {
ctx := context.Background()
pgContainer, err := utils.CreatePostgresContainer(ctx)
defer pgContainer.Terminate(ctx)
defer func() {
_ = pgContainer.Terminate(ctx)
}()

assert.Nil(t, err)

Expand All @@ -34,7 +36,9 @@ func TestCreatePostgresContainer(t *testing.T) {
func TestCreateMySQLContainer(t *testing.T) {
ctx := context.Background()
mysqlContainer, err := utils.CreateMySQLContainer(ctx)
defer mysqlContainer.Terminate(ctx)
defer func() {
_ = mysqlContainer.Terminate(ctx)
}()

assert.Nil(t, err)

Expand Down

0 comments on commit c1f4643

Please sign in to comment.