From ce044759c19c8f25982f00ec35993c4e3a3812aa Mon Sep 17 00:00:00 2001 From: Snider Date: Wed, 21 Jan 2026 17:01:25 +0000 Subject: [PATCH] fix(runtime): update test factories to include all required services Add docs, ide, and module factories to runtime tests to match the expanded service requirements in newWithFactories. Co-Authored-By: Claude Opus 4.5 --- pkg/runtime/runtime_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/runtime/runtime_test.go b/pkg/runtime/runtime_test.go index 798f692e..7da9f609 100644 --- a/pkg/runtime/runtime_test.go +++ b/pkg/runtime/runtime_test.go @@ -9,8 +9,11 @@ import ( "github.com/Snider/Core/pkg/config" "github.com/Snider/Core/pkg/crypt" "github.com/Snider/Core/pkg/display" + "github.com/Snider/Core/pkg/docs" "github.com/Snider/Core/pkg/help" + "github.com/Snider/Core/pkg/ide" "github.com/Snider/Core/pkg/io" + "github.com/Snider/Core/pkg/module" "github.com/Snider/Core/pkg/workspace" ) @@ -60,9 +63,12 @@ func TestNewServiceInitializationError(t *testing.T) { factories := map[string]ServiceFactory{ "config": func() (any, error) { return config.New() }, "display": func() (any, error) { return display.New() }, + "docs": func() (any, error) { return docs.New(docs.Options{BaseURL: "https://docs.lethean.io"}) }, "help": func() (any, error) { return help.New(help.Options{}) }, "crypt": func() (any, error) { return crypt.New() }, "i18n": func() (any, error) { return nil, errors.New("i18n service failed to initialize") }, // This factory will fail + "ide": func() (any, error) { return ide.New() }, + "module": func() (any, error) { return module.NewService(module.Options{AppsDir: "apps"}) }, "workspace": func() (any, error) { return workspace.New(io.Local) }, } @@ -79,9 +85,12 @@ func TestMissingFactory(t *testing.T) { factories := map[string]ServiceFactory{ // "config" intentionally missing "display": func() (any, error) { return display.New() }, + "docs": func() (any, error) { return docs.New(docs.Options{BaseURL: "https://docs.lethean.io"}) }, "help": func() (any, error) { return help.New(help.Options{}) }, "crypt": func() (any, error) { return crypt.New() }, "i18n": func() (any, error) { return nil, nil }, + "ide": func() (any, error) { return ide.New() }, + "module": func() (any, error) { return module.NewService(module.Options{AppsDir: "apps"}) }, "workspace": func() (any, error) { return workspace.New(io.Local) }, }