Skip to content

Commit

Permalink
tests: remove test databases after tests
Browse files Browse the repository at this point in the history
FossilOrigin-Name: f544a1abc38648400ee08e9cffb0b5fbc975a385f9ddc3035cb822893ac68719
  • Loading branch information
thindil committed Jun 22, 2024
1 parent a2c4694 commit 68ed8c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/plugins.nim
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
## Provides unit tests for plugins module

import utils/utils
import ../src/db
import unittest2
include ../src/plugins

suite "Unit tests for plugins module":

checkpoint "Initializing the tests"
let db: DbConn = initDb(dbName = "test13.db".Path)
const dbName: Path = "test13.db".Path
let db: DbConn = initDb(dbName = dbName)
var commands: ref Table[string, CommandData] = newTable[string, CommandData]()

# test "Initialization of plugins":
Expand Down Expand Up @@ -132,4 +132,4 @@ suite "Unit tests for plugins module":
newPluginData.path == "/".Path

suiteTeardown:
closeDb(returnCode = QuitSuccess.ResultCode, db = db)
removeDb(dbName = dbName, db = db)
6 changes: 3 additions & 3 deletions tests/prompt.nim
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
## Provides unit tests for prompt module

import utils/utils
import ../src/db
import unittest2
include ../src/prompt

suite "Unit tests for prompt module":

checkpoint "Initializing the tests"
let db: DbConn = initDb(dbName = "test14.db".Path)
const dbName: Path = "test14.db".Path
let db: DbConn = initDb(dbName = dbName)

test "Getting formated directory name":
check:
Expand All @@ -44,4 +44,4 @@ suite "Unit tests for prompt module":
resultCode = QuitSuccess.ResultCode, db = db)

suiteTeardown:
closeDb(returnCode = QuitSuccess.ResultCode, db = db)
removeDb(dbName = dbName, db = db)

0 comments on commit 68ed8c7

Please sign in to comment.