feat: add AI catalog description generation
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package setup
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestEnsureFilesProjectsItsInstallationYAMLToTheApplication(t *testing.T) {
|
||||
root := newProject(t, "metadata generation config")
|
||||
setNonInteractiveAnswers(t, newExternalSecrets(t, root))
|
||||
|
||||
result, err := EnsureFiles(Request{
|
||||
ProjectRoot: root, InstallationID: "metadata", Profile: "local", NonInteractive: true,
|
||||
}, strings.NewReader(""), ioDiscard{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
environment, err := os.ReadFile(result.EnvironmentPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
want := "THT_INSTALLATION_CONFIG_SOURCE=" + strconv.Quote(result.DescriptorPath)
|
||||
if !strings.Contains(string(environment), want) {
|
||||
t.Fatalf("generated environment does not project installation YAML: want %q", want)
|
||||
}
|
||||
if strings.Contains(string(environment), "PI_MODEL") || strings.Contains(string(environment), "llm_policy") {
|
||||
t.Fatal("metadata-generation projection was coupled to Pi or workspace policy")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user