Skip to content

Commit

Permalink
Port tests to new job archive version
Browse files Browse the repository at this point in the history
  • Loading branch information
moebiusband73 committed Nov 16, 2024
1 parent cdd45ce commit 3ab2617
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func setup(t *testing.T) *api.RestApi {
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)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/importer/importer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func setup(t *testing.T) *repository.JobRepository {
if err := os.Mkdir(jobarchive, 0777); err != nil {
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)
}
fritzArchive := filepath.Join(tmpdir, "job-archive", "fritz")
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/fsBackend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestInit(t *testing.T) {
if fsa.path != "testdata/archive" {
t.Fail()
}
if version != 1 {
if version != 2 {
t.Fail()
}
if len(fsa.clusters) != 3 || fsa.clusters[1] != "emmy" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/archive/testdata/archive/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1
2

0 comments on commit 3ab2617

Please sign in to comment.