Migrate CLI execution and terminal reports
This commit is contained in:
@@ -17,10 +17,12 @@ func TestTextFormatterIncludesPreparedRunDetails(t *testing.T) {
|
||||
t.Fatalf("expected no error, got %v", err)
|
||||
}
|
||||
s := string(out)
|
||||
if strings.Contains(s, "prompt_version") {
|
||||
t.Fatalf("unexpected prompt version in text output: %s", s)
|
||||
}
|
||||
|
||||
for _, want := range []string{
|
||||
"prompt: prompt.id",
|
||||
"prompt_version: v1",
|
||||
"selected_profile_id: local-fast",
|
||||
"selected_backend_id: local",
|
||||
"endpoint: http://llm/v1",
|
||||
@@ -194,8 +196,8 @@ func TestJSONFormatterEmitsValidJSONAndIncludesPreparedRunFields(t *testing.T) {
|
||||
if decoded["prompt_id"] != "prompt.id" {
|
||||
t.Fatalf("expected prompt_id in json output, got %#v", decoded["prompt_id"])
|
||||
}
|
||||
if decoded["prompt_version"] != "v1" {
|
||||
t.Fatalf("expected prompt_version in json output, got %#v", decoded["prompt_version"])
|
||||
if _, ok := decoded["prompt_version"]; ok {
|
||||
t.Fatalf("unexpected prompt_version in json output: %#v", decoded)
|
||||
}
|
||||
if decoded["selected_profile_id"] != "local-fast" {
|
||||
t.Fatalf("expected selected_profile_id in json output, got %#v", decoded["selected_profile_id"])
|
||||
@@ -344,7 +346,6 @@ func TestFormatPreparedRunByNameUnknownFailsClearly(t *testing.T) {
|
||||
func samplePreparedRun() *promptkit.PreparedRun {
|
||||
return &promptkit.PreparedRun{
|
||||
PromptID: "prompt.id",
|
||||
PromptVersion: "v1",
|
||||
PromptHash: "prompt-hash",
|
||||
SelectedProfileID: "local-fast",
|
||||
SelectedBackendID: "local",
|
||||
|
||||
Reference in New Issue
Block a user