Skip to content

Commit 9452999

Browse files
committed
✅ Fix tests logger
Added a null logger to tests so that it doesn't sigsegv
1 parent cebeb50 commit 9452999

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

module/module_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"os/exec"
77
"testing"
88

9+
"github.com/hashicorp/go-hclog"
910
"github.com/jmoiron/sqlx"
1011
"github.com/julien040/anyquery/rpc"
1112
"github.com/mattn/go-sqlite3"
@@ -119,6 +120,7 @@ func TestRawPlugin(t *testing.T) {
119120
return conn.CreateModule("test", &SQLiteModule{
120121
PluginPath: "./_test/test.out",
121122
ConnectionPool: rpc.NewConnectionPool(),
123+
Logger: hclog.NewNullLogger(),
122124
})
123125
},
124126
})
@@ -206,6 +208,7 @@ func TestRawPlugin2(t *testing.T) {
206208
return conn.CreateModule("test", &SQLiteModule{
207209
PluginPath: "./_test/test2.out",
208210
ConnectionPool: rpc.NewConnectionPool(),
211+
Logger: hclog.NewNullLogger(),
209212
})
210213
},
211214
})
@@ -304,6 +307,7 @@ func TestLibPlugin(t *testing.T) {
304307
return conn.CreateModule("test", &SQLiteModule{
305308
PluginPath: "./_test/normalplugin.out",
306309
ConnectionPool: rpc.NewConnectionPool(),
310+
Logger: hclog.NewNullLogger(),
307311
})
308312
},
309313
})
@@ -460,6 +464,7 @@ func TestCUDOperations(t *testing.T) {
460464
return conn.CreateModule("test_insert", &SQLiteModule{
461465
PluginPath: "./_test/insertplugin.out",
462466
ConnectionPool: rpc.NewConnectionPool(),
467+
Logger: hclog.NewNullLogger(),
463468
})
464469
},
465470
})

0 commit comments

Comments
 (0)