Skip to content

Commit 388ada0

Browse files
committed
refactor: remove unused mustRun function and clean up whitespace in unit tests
1 parent 0118f5b commit 388ada0

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

database/trino/trino_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,6 @@ func isReady(ctx context.Context, c dktest.ContainerInfo) bool {
115115
return false
116116
}
117117

118-
func mustRun(t *testing.T, d database.Driver, statements []string) {
119-
for _, statement := range statements {
120-
if err := d.Run(strings.NewReader(statement)); err != nil {
121-
t.Fatal(err)
122-
}
123-
}
124-
}
125-
126118
func Test(t *testing.T) {
127119
t.Run("test", test)
128120
t.Run("testMigrate", testMigrate)

database/trino/unit_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ import (
88

99
func TestConfig_Defaults(t *testing.T) {
1010
config := &Config{}
11-
11+
1212
// Test default values get set properly
1313
if config.MigrationsTable != "" {
1414
t.Errorf("Expected empty MigrationsTable, got %s", config.MigrationsTable)
1515
}
16-
16+
1717
if config.MigrationsSchema != "" {
1818
t.Errorf("Expected empty MigrationsSchema, got %s", config.MigrationsSchema)
1919
}
20-
20+
2121
if config.MigrationsCatalog != "" {
2222
t.Errorf("Expected empty MigrationsCatalog, got %s", config.MigrationsCatalog)
2323
}
@@ -45,7 +45,7 @@ func TestTrino_Registration(t *testing.T) {
4545
break
4646
}
4747
}
48-
48+
4949
if !found {
5050
t.Error("Trino driver should be registered")
5151
}
@@ -54,4 +54,4 @@ func TestTrino_Registration(t *testing.T) {
5454
func TestTrino_DriverInterface(t *testing.T) {
5555
// Test that Trino implements the database.Driver interface
5656
var _ database.Driver = &Trino{}
57-
}
57+
}

0 commit comments

Comments
 (0)