build - prozess optimiert mit push nach zot
nginx-kill - > maint. site...
This commit is contained in:
1 parent
665135f87e
commit
64417d8353
19 files changed
+447
-61
No files matched your search
+18
-1
@@ -33,9 +33,14 @@ func TestRun_Usage(t *testing.T) {
|
||||
|
||||
func TestRun_Version(t *testing.T) {
|
||||
code, stdout, _ := run(context.Background(), "version")
|
||||
if code != 0 || strings.TrimSpace(stdout) != "sultan "+Version {
|
||||
lines := strings.Split(strings.TrimSpace(stdout), "\n")
|
||||
if code != 0 || lines[0] != "sultan "+Version {
|
||||
t.Errorf("version: code=%d stdout=%q", code, stdout)
|
||||
}
|
||||
// Die aktive Zeitzone sichtbar machen (Distroless-Images ohne tzdata fallen still auf UTC).
|
||||
if len(lines) < 2 || lines[1] != "Zeitzone: "+time.Local.String() {
|
||||
t.Errorf("Zeitzone fehlt: %q", stdout)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServerFlags(t *testing.T) {
|
||||
@@ -219,3 +224,15 @@ func TestServerFlags_EnrollLimit(t *testing.T) {
|
||||
t.Errorf("--enroll-limit=-1: %d", cfg.EnrollLimit)
|
||||
}
|
||||
}
|
||||
|
||||
// Leere Werte (z. B. --public-url=${SULTAN_PUBLIC_URL} mit leerer Variable in
|
||||
// Compose) dürfen den Server nicht am Start hindern.
|
||||
func TestServerFlags_EmptyPublicURLIgnored(t *testing.T) {
|
||||
cfg, err := parseServerFlags([]string{"--public-url=", "--public-url= ", "--notify-slack="}, &bytes.Buffer{}, noEnv)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(cfg.PublicURLs) != 0 || len(cfg.SlackWebhooks) != 0 {
|
||||
t.Errorf("leere Werte übernommen: %q %q", cfg.PublicURLs, cfg.SlackWebhooks)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user