Debug GetRequestJobs function and add unit tests
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-02-12 20:02:02 +01:00
parent 69a07d77d5
commit 0466b1fe05
3 changed files with 67 additions and 5 deletions

View File

@ -2,6 +2,7 @@ package client
import (
"log"
"os"
"testing"
"forge.redroom.link/yves/meowlib"
@ -42,7 +43,9 @@ func TestStoreServer(t *testing.T) {
if sout.Name != srv.Name {
log.Fatal("name not found")
}
// Clean up
// recursively remove the test.db folder
os.RemoveAll("test.db")
}
func TestLoadServersFromUids(t *testing.T) {
@ -67,6 +70,9 @@ func TestLoadServersFromUids(t *testing.T) {
if sout[0].Name != srv.Name {
log.Fatal("name not found")
}
// Clean up
// recursively remove the test.db folder
os.RemoveAll("test.db")
}
func TestLoadServerCardsFromUids(t *testing.T) {
@ -91,4 +97,7 @@ func TestLoadServerCardsFromUids(t *testing.T) {
if sout[0].Name != srv.Name {
log.Fatal("name not found")
}
// Clean up
// recursively remove the test.db folder
os.RemoveAll("test.db")
}