From 69c16481c8f42c483afa92eb5a85312234fe594c Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Mon, 22 Jun 2026 23:45:22 +0200 Subject: [PATCH] fix(test): update e2e UpdateProgress calls for new cancellable arg (#10460) PR #10454 added a `cancellable bool` parameter to GalleryStore.UpdateProgress but missed two callers under tests/e2e/distributed, breaking the build on master (golangci-lint and tests-e2e-backend both failed to compile with "not enough arguments in call to ... UpdateProgress"). Pass cancellable=true (both ops are downloading installs, which are cancellable) and assert the flag is persisted, exercising the new behavior. Assisted-by: Claude:claude-opus-4-8 [Claude Code] Signed-off-by: Ettore Di Giacinto Co-authored-by: Ettore Di Giacinto --- tests/e2e/distributed/gallery_distributed_test.go | 5 +++-- tests/e2e/distributed/phase4_test.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/e2e/distributed/gallery_distributed_test.go b/tests/e2e/distributed/gallery_distributed_test.go index d975719d7..100063ed5 100644 --- a/tests/e2e/distributed/gallery_distributed_test.go +++ b/tests/e2e/distributed/gallery_distributed_test.go @@ -53,12 +53,13 @@ var _ = Describe("Gallery Distributed", Label("Distributed"), func() { Expect(retrieved.Status).To(Equal("downloading")) Expect(retrieved.FrontendID).To(Equal("f1")) - // Update progress - Expect(galleryStore.UpdateProgress(op.ID, 0.75, "75% complete", "6GB")).To(Succeed()) + // Update progress (cancellable: a downloading install can be cancelled) + Expect(galleryStore.UpdateProgress(op.ID, 0.75, "75% complete", "6GB", true)).To(Succeed()) updated, _ := galleryStore.Get(op.ID) Expect(updated.Progress).To(BeNumerically("~", 0.75, 0.01)) Expect(updated.Message).To(Equal("75% complete")) + Expect(updated.Cancellable).To(BeTrue()) // Complete Expect(galleryStore.UpdateStatus(op.ID, "completed", "")).To(Succeed()) diff --git a/tests/e2e/distributed/phase4_test.go b/tests/e2e/distributed/phase4_test.go index bfd03b9c3..5863b64e0 100644 --- a/tests/e2e/distributed/phase4_test.go +++ b/tests/e2e/distributed/phase4_test.go @@ -104,11 +104,12 @@ var _ = Describe("Phase 4: MCP, Skills, Gallery, Fine-Tuning", Label("Distribute } stores.Gallery.Create(op) - Expect(stores.Gallery.UpdateProgress(op.ID, 0.5, "50% complete", "2GB")).To(Succeed()) + Expect(stores.Gallery.UpdateProgress(op.ID, 0.5, "50% complete", "2GB", true)).To(Succeed()) updated, _ := stores.Gallery.Get(op.ID) Expect(updated.Progress).To(BeNumerically("~", 0.5, 0.01)) Expect(updated.Message).To(Equal("50% complete")) + Expect(updated.Cancellable).To(BeTrue()) }) It("should deduplicate concurrent downloads", func() {