Port tests to new job archive version

This commit is contained in:
Jan Eitzinger 2024-11-16 07:03:29 +01:00
parent cdd45ce88b
commit 3ab26172c4
4 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ func setup(t *testing.T) *api.RestApi {
t.Fatal(err) t.Fatal(err)
} }
if err := os.WriteFile(filepath.Join(jobarchive, "version.txt"), []byte(fmt.Sprintf("%d", 1)), 0666); err != nil { if err := os.WriteFile(filepath.Join(jobarchive, "version.txt"), []byte(fmt.Sprintf("%d", 2)), 0666); err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@ -82,7 +82,7 @@ func setup(t *testing.T) *repository.JobRepository {
if err := os.Mkdir(jobarchive, 0777); err != nil { if err := os.Mkdir(jobarchive, 0777); err != nil {
t.Fatal(err) t.Fatal(err)
} }
if err := os.WriteFile(filepath.Join(jobarchive, "version.txt"), []byte(fmt.Sprintf("%d", 1)), 0666); err != nil { if err := os.WriteFile(filepath.Join(jobarchive, "version.txt"), []byte(fmt.Sprintf("%d", 2)), 0666); err != nil {
t.Fatal(err) t.Fatal(err)
} }
fritzArchive := filepath.Join(tmpdir, "job-archive", "fritz") fritzArchive := filepath.Join(tmpdir, "job-archive", "fritz")

View File

@ -48,7 +48,7 @@ func TestInit(t *testing.T) {
if fsa.path != "testdata/archive" { if fsa.path != "testdata/archive" {
t.Fail() t.Fail()
} }
if version != 1 { if version != 2 {
t.Fail() t.Fail()
} }
if len(fsa.clusters) != 3 || fsa.clusters[1] != "emmy" { if len(fsa.clusters) != 3 || fsa.clusters[1] != "emmy" {

View File

@ -1 +1 @@
1 2