Increase archive version. Fix unit tests.

This commit is contained in:
2025-11-20 14:28:06 +01:00
parent f7a0954213
commit f141ca926f
10 changed files with 51 additions and 43 deletions

View File

@@ -92,7 +92,7 @@ import (
// Version is the current archive schema version.
// The archive backend must match this version for compatibility.
const Version uint64 = 2
const Version uint64 = 3
// ArchiveBackend defines the interface that all archive storage backends must implement.
// Implementations include FsArchive (filesystem), S3Archive (object storage), and SqliteArchive (database).
@@ -170,8 +170,8 @@ type ArchiveBackend interface {
// JobContainer combines job metadata and optional performance data.
// Used by Iter() to yield jobs during archive iteration.
type JobContainer struct {
Meta *schema.Job // Job metadata (always present)
Data *schema.JobData // Performance data (nil if not loaded)
Meta *schema.Job // Job metadata (always present)
Data *schema.JobData // Performance data (nil if not loaded)
}
var (

View File

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

View File

@@ -1 +1 @@
2
3