Files
core/solutions/knowledge/assets_test.go
T
terminarandClaude Opus 5.5 2481a0dd27 solutions: Solutions Guide engine (catalog, rules, wizard state, native config, knowledge index, CLI)
New nested module yetano.dev/yetano/core/solutions: loads the catalog
in assets/solutions on top of the Big Picture, evaluates questions and
conditions, resolves packages/modules/capabilities, generates native
configuration from typed fragments with per-value origins, and builds
architecture graph, plan, lock file and handbook. Knowledge index with
yetano: references, search and lint (incl. manual sections). CLI with
yet's conventions (solution, task, knowledge, open), standalone as
yetano-solutions. No execution, no network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 08:42:58 +01:00

35 lines
684 B
Go

package knowledge
import (
"os"
"path/filepath"
"testing"
"yetano.dev/yetano/core/solutions/catalog"
)
func assetsIndex(t *testing.T) *Index {
t.Helper()
dir, _ := filepath.Abs("../../../assets/solutions")
if _, err := os.Stat(filepath.Join(dir, "catalog.yaml")); err != nil {
t.Skip("assets/solutions not present")
}
c, err := catalog.Load(dir)
if err != nil {
t.Fatal(err)
}
return Build(c)
}
func TestAssetsLint(t *testing.T) {
ix := assetsIndex(t)
for _, i := range Lint(ix) {
if i.Severity == "error" {
t.Error(i)
} else {
t.Log(i)
}
}
t.Logf("%d entries, %d manual topics, missing sources: %v", len(ix.Entries), len(ix.Topics), ix.Missing)
}