Verify native Scriptorium workflows and retry behavior
This commit is contained in:
@@ -214,21 +214,22 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
_, _ = os.Stderr.WriteString("shared credential not forwarded\n")
|
||||
os.Exit(2)
|
||||
}
|
||||
if appSeriatimFlagValue(args, "--prompt") != "" {
|
||||
if args[0] == "promptkit" || (args[0] == "run" && appSeriatimFlagValue(args, "--output-dir") == "") {
|
||||
if _, present := os.LookupEnv(auditaOnlyName); present {
|
||||
os.Exit(2)
|
||||
}
|
||||
if appSeriatimFlagValue(args, "--api-key-env") != "" {
|
||||
os.Exit(2)
|
||||
}
|
||||
output := appSeriatimFlagValue(args, "--out")
|
||||
if err := os.MkdirAll(filepath.Dir(output), 0o755); err != nil {
|
||||
if len(args) >= 4 && strings.Join(args[:3], " ") == "promptkit requirements show" {
|
||||
_, _ = fmt.Fprintf(os.Stdout, `{"prompt_id":%q,"profile_id":"","complete":true,"inputs":[],"variables":[],"issues":[]}`, args[3])
|
||||
} else if len(args) >= 4 && strings.Join(args[:3], " ") == "promptkit show prepared" {
|
||||
_, _ = os.Stdout.WriteString(`{"prepared":true}`)
|
||||
} else if args[0] == "run" {
|
||||
_, _ = os.Stdout.WriteString("generated recap\n")
|
||||
} else {
|
||||
os.Exit(2)
|
||||
}
|
||||
if err := os.WriteFile(output, []byte("{}\n"), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
_, _ = os.Stdout.WriteString(sharedProviderKey + "\n")
|
||||
_, _ = os.Stderr.WriteString(sharedProviderKey + "\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user