fix test
This commit is contained in:
committed by
mattn
parent
a9775d4d98
commit
e63a0c3f5b
@@ -53,7 +53,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Dummy query to force connection and database creation
|
// Dummy query to force connection and database creation
|
||||||
// Will return ErrUnauthorized (SQLITE_AUTH) if user authentication fails
|
// Will return errUserAuthNoLongerSupported if user authentication fails
|
||||||
if _, err = db.Exec("SELECT 1;"); err != nil {
|
if _, err = db.Exec("SELECT 1;"); err != nil {
|
||||||
defer os.Remove(file)
|
defer os.Remove(file)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
@@ -70,7 +70,7 @@ func TestUserAuth(t *testing.T) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("UserAuth not enabled: %s", err)
|
t.Fatalf("UserAuth not enabled: %s", err)
|
||||||
}
|
}
|
||||||
if !errors.Is(err, ErrUnauthorized) {
|
if !errors.Is(err, errUserAuthNoLongerSupported) {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user