From 61d00a234af7abf7a06385d38cf2728ad1330efb Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 12 Oct 2026 12:25:05 +0200 Subject: [PATCH] Give the store tests' service manager holders the three verbs it now must serve (issue 332) They named only the eight verbs from before issue 332 and were refused once the seat required reset-failed, wanted-by and unlink-dangling. --- cmd/mesh-controller/seat_dependencies_test.go | 3 ++- internal/inventory/seats_test.go | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/mesh-controller/seat_dependencies_test.go b/cmd/mesh-controller/seat_dependencies_test.go index bea72bef..9d47f4af 100644 --- a/cmd/mesh-controller/seat_dependencies_test.go +++ b/cmd/mesh-controller/seat_dependencies_test.go @@ -15,7 +15,8 @@ import ( func serviceManagerHolder() catalogue.Manifest { return catalogue.Manifest{Module: "systemd", Version: "1", Claims: []catalogue.Claim{{Name: catalogue.ServiceManagerSeat, Scope: catalogue.ScopeNode, - Serves: []string{"units", "status", "start", "stop", "restart", "enable", "disable", "journal"}}}, + Serves: []string{"units", "status", "start", "stop", "restart", "enable", "disable", "journal", + "reset-failed", "wanted-by", "unlink-dangling"}}}, Resources: []map[string]any{{"id": "systemd", "type": "package", "package": "systemd"}}} } diff --git a/internal/inventory/seats_test.go b/internal/inventory/seats_test.go index 916be433..1dfac4b2 100644 --- a/internal/inventory/seats_test.go +++ b/internal/inventory/seats_test.go @@ -202,14 +202,15 @@ func TestASeatsVerbGainsTheArgumentsTheBinaryNames(t *testing.T) { t.Fatal("failed was not added to the row") } // The optional mark is not stored; the working set read from the rows takes it from the compiled seat, - // so today's holder, which does not serve failed, still holds the seat. + // so a holder that does not serve the optional failed still holds the seat. catalogue.UseSeats(seats) defer catalogue.UseSeats(catalogue.DefaultSeats()) live, _ := catalogue.SeatNamed(catalogue.ServiceManagerSeat) holder := catalogue.Manifest{Module: "systemd", Version: "1", Claims: []catalogue.Claim{{Name: catalogue.ServiceManagerSeat, - Scope: catalogue.ScopeNode, Serves: []string{"units", "status", "start", "stop", "restart", "enable", "disable", "journal"}}}} + Scope: catalogue.ScopeNode, Serves: []string{"units", "status", "start", "stop", "restart", "enable", "disable", "journal", + "reset-failed", "wanted-by", "unlink-dangling"}}}} if err := catalogue.CanHold(holder, live); err != nil { - t.Fatalf("the seat read from the store refuses today's holder: %v", err) + t.Fatalf("the seat read from the store refuses a holder without the optional failed: %v", err) } // Seeding again changes nothing more. before := verbs["journal"]