Complete PromptKit adoption audit
This commit is contained in:
@@ -626,7 +626,7 @@ server:
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseServeArgsWithConfigProvidesRequiredDirectoriesAndAddr(t *testing.T) {
|
||||
func TestParseServeArgsWithConfigUsesConfiguredSourcesAndAddr(t *testing.T) {
|
||||
configPath := writeAppConfigFile(t, `
|
||||
promptkit_sources:
|
||||
- directory: ./from-config/prompts
|
||||
@@ -918,7 +918,7 @@ func TestRunCommandVarsOptional(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunCommandSucceedsWithPromptAndProfileDirsFromConfig(t *testing.T) {
|
||||
func TestRunCommandSucceedsWithPromptAndProfileSourcesFromConfig(t *testing.T) {
|
||||
lib := newCLITestLibrary(t)
|
||||
inputPath := lib.writeInputFile(t, "transcript.md", "hello")
|
||||
|
||||
@@ -1033,7 +1033,7 @@ func TestRenderCommandExplicitZeroTemperatureReachesEffectiveSettings(t *testing
|
||||
}
|
||||
}
|
||||
|
||||
func TestRenderCommandSucceedsWithPromptAndProfileDirsFromConfig(t *testing.T) {
|
||||
func TestRenderCommandSucceedsWithPromptAndProfileSourcesFromConfig(t *testing.T) {
|
||||
lib := newCLITestLibrary(t)
|
||||
inputPath := lib.writeInputFile(t, "transcript.md", "hello transcript")
|
||||
|
||||
@@ -1822,17 +1822,17 @@ func TestPromptkitProfileInspectionResolvesSupportedTargets(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
configWithoutPromptDir := writeAppConfigFile(t, fmt.Sprintf("promptkit_sources:\n - directory: %q\n - file: %q\n",
|
||||
configWithoutPromptSource := writeAppConfigFile(t, fmt.Sprintf("promptkit_sources:\n - directory: %q\n - file: %q\n",
|
||||
filepath.Join(fixtureRoot, "profiles"),
|
||||
filepath.Join(fixtureRoot, "framework", "backends.yml"),
|
||||
))
|
||||
code, _, stderr := runCLICommand(t, inspectCommand, []string{
|
||||
"profile",
|
||||
"--config", configWithoutPromptDir,
|
||||
"--config", configWithoutPromptSource,
|
||||
"--profile", "custom-derived",
|
||||
})
|
||||
if code != ExitOK {
|
||||
t.Fatalf("profile inspection unexpectedly required a prompt directory: %q", stderr)
|
||||
t.Fatalf("profile inspection unexpectedly required a prompt source: %q", stderr)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1991,7 +1991,7 @@ func TestProfileInspectionHonorsDirectoryPrecedenceOutputAndFailures(t *testing.
|
||||
t.Fatalf("read profile inspection output: %v", err)
|
||||
}
|
||||
if !strings.Contains(string(output), `"model": "override-model"`) || !strings.Contains(string(output), `"backend_id": ""`) {
|
||||
t.Fatalf("profile directory override was not used: %s", output)
|
||||
t.Fatalf("profile source override was not used: %s", output)
|
||||
}
|
||||
|
||||
for _, profileID := range []string{"missing", "invalid"} {
|
||||
@@ -2237,7 +2237,7 @@ func TestRenderCommandPromptDefaultProfileWorksThroughCLIPath(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRenderCommandUsesBuiltInProfileWithoutProfileDir(t *testing.T) {
|
||||
func TestRenderCommandUsesBuiltInProfileWithoutCustomProfileSource(t *testing.T) {
|
||||
t.Setenv("OPENROUTER_API_KEY", "test-key")
|
||||
lib := newCLITestLibrary(t)
|
||||
inputPath := lib.writeInputFile(t, "transcript.md", "hello")
|
||||
|
||||
Reference in New Issue
Block a user