mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-07 00:14:25 +00:00
Setup test logging
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
|
||||
"novamd/internal/db"
|
||||
|
||||
_ "novamd/internal/testenv"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"novamd/internal/db"
|
||||
"novamd/internal/models"
|
||||
_ "novamd/internal/testenv"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"novamd/internal/db"
|
||||
"novamd/internal/models"
|
||||
_ "novamd/internal/testenv"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"novamd/internal/db"
|
||||
"novamd/internal/models"
|
||||
_ "novamd/internal/testenv"
|
||||
)
|
||||
|
||||
func TestUserOperations(t *testing.T) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package db_test
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"novamd/internal/db"
|
||||
"novamd/internal/models"
|
||||
_ "novamd/internal/testenv"
|
||||
)
|
||||
|
||||
func TestWorkspaceOperations(t *testing.T) {
|
||||
@@ -385,8 +385,8 @@ func TestWorkspaceOperations(t *testing.T) {
|
||||
|
||||
// Verify workspace is gone
|
||||
_, err = database.GetWorkspaceByID(workspace.ID)
|
||||
if err != sql.ErrNoRows {
|
||||
t.Errorf("expected sql.ErrNoRows, got %v", err)
|
||||
if !strings.Contains(err.Error(), "workspace not found") {
|
||||
t.Errorf("expected workspace not found, got %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user