access-engine/cmd/flex-auth/main_test.go
tegwick f758381cea
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 6s
Build and Publish Container Image / build-and-push (push) Successful in 1m23s
FLEX-WP-0036: Go module is github.com/netkingdom/access-engine; T02 consumer inventory
- module path renamed (no external importers); golangci local-prefixes
- ACCESS_ENGINE_RUN_TOPAZ_INTEGRATION replaces FLEX_AUTH_RUN_TOPAZ_INTEGRATION
- README title and identity paragraph reflect the landed renames
- docs/runtime-rename-inventory.md: per-consumer references by kind and order
- chart name, image package and /opt paths deliberately left for T05

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 735967@bnt-lap001
Assistant-Session: 5971967f-77f8-4ced-9e02-c6ef67040ffc
2026-10-10 15:29:00 +02:00

26 lines
699 B
Go

package main
import (
"os"
"os/exec"
"strings"
"testing"
)
// The retired binary must fail and name its replacement, whatever it is asked.
func TestRetiredBinaryNamesReplacement(t *testing.T) {
if os.Getenv("ACCESS_ENGINE_STUB_CHILD") == "1" {
main()
return
}
cmd := exec.Command(os.Args[0], "-test.run=TestRetiredBinaryNamesReplacement", "serve", "--addr", "x")
cmd.Env = append(os.Environ(), "ACCESS_ENGINE_STUB_CHILD=1")
out, err := cmd.CombinedOutput()
exit, ok := err.(*exec.ExitError)
if !ok || exit.ExitCode() != 2 {
t.Fatalf("want exit 2, got %v", err)
}
if !strings.Contains(string(out), "renamed to access-engine") {
t.Fatalf("missing rename message: %s", out)
}
}