Move jobs raw definition to their own namespace and the cascading fallout
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/storage"
|
||||
"os"
|
||||
"testing"
|
||||
@@ -215,7 +216,7 @@ func TestSchedulerUpdate(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
time.Sleep(time.Millisecond * 1500)
|
||||
j.Raw = "echo 2"
|
||||
config.Store.Set(j.Name, []byte("echo 2"), ns.JobsRaw...)
|
||||
j.Title = "title 2"
|
||||
if err := s.Update(j); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -226,8 +227,6 @@ func TestSchedulerUpdate(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
} else if j, err := s.loadJobFromStore(j.Name); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if j.Raw != "echo 2" {
|
||||
t.Error(j.Raw)
|
||||
} else if j.Title != "title 2" {
|
||||
t.Error(j.Title)
|
||||
} else if entry := s.cron.Entry(s.running[j.Name]); entry == s.cron.Entry(-99) {
|
||||
|
||||
Reference in New Issue
Block a user