Fix unit tests

This commit is contained in:
2025-10-17 07:06:31 +02:00
parent 91f4475d76
commit 6efd6334bb
5 changed files with 16 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ func TestRegister(t *testing.T) {
func TestMatch(t *testing.T) {
r := setup(t)
job, err := r.FindByIdDirect(5)
job, err := r.FindByIdDirect(317)
noErr(t, err)
var tagger AppTagger
@@ -53,7 +53,7 @@ func TestMatch(t *testing.T) {
tagger.Match(job)
if !r.HasTag(5, "app", "vasp") {
if !r.HasTag(317, "app", "vasp") {
t.Errorf("missing tag vasp")
}
}

View File

@@ -18,14 +18,14 @@ func TestInit(t *testing.T) {
func TestJobStartCallback(t *testing.T) {
Init()
r := setup(t)
job, err := r.FindByIdDirect(2)
job, err := r.FindByIdDirect(525)
noErr(t, err)
jobs := make([]*schema.Job, 0, 1)
jobs = append(jobs, job)
repository.CallJobStartHooks(jobs)
if !r.HasTag(2, "app", "python") {
if !r.HasTag(525, "app", "python") {
t.Errorf("missing tag python")
}
}