Update examples and tests for shared glossaries
This commit is contained in:
@@ -234,11 +234,14 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
os.Exit(0)
|
||||
}
|
||||
switch args[0] {
|
||||
case "process":
|
||||
case "process", "preflight":
|
||||
if os.Getenv(auditaOnlyName) != auditaOnlyKey {
|
||||
_, _ = os.Stderr.WriteString("Audita-only credential not forwarded\n")
|
||||
os.Exit(2)
|
||||
}
|
||||
if args[0] == "preflight" {
|
||||
os.Exit(0)
|
||||
}
|
||||
output := appSeriatimFlagValue(args, "--output")
|
||||
if output == "" {
|
||||
os.Exit(2)
|
||||
@@ -249,8 +252,12 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
if err := os.WriteFile(output, []byte(`{"schema":"audita.processed.v1","segments":[]}`), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
reportDir := appSeriatimFlagValue(args, "--report-dir")
|
||||
if err := os.MkdirAll(reportDir, 0o755); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
for _, name := range []string{"errors.yml", "recoveries.yml", "report.md"} {
|
||||
if err := os.WriteFile(filepath.Join(filepath.Dir(output), name), []byte("status: completed\n"), 0o644); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(reportDir, name), []byte("status: completed\n"), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user