[core] Share links and repo layout: HMAC tokens with epoch, prefix check, exact hosts/<hostname>.toml, error codes; edge config v2

This commit is contained in:
2026-11-07 17:32:44 +01:00
parent 73a9f3da45
commit 94ba18d38b
8 changed files with 348 additions and 48 deletions
+9 -2
View File
@@ -145,7 +145,11 @@ fn errors_have_codes_fields_and_params_for_the_ui() {
"host.hostname.missing",
Some("hostname"),
),
("hostname = \"app.test\"\n", "host.upstreams.missing", Some("upstreams")),
(
"hostname = \"app.test\"\n",
"host.upstreams.missing",
Some("upstreams"),
),
(
"hostname = \"App.test\"\nupstreams = [\"http://127.0.0.1:1\"]\n",
"host.hostname.uppercase",
@@ -227,7 +231,10 @@ fn params_carry_suggestions() {
.unwrap();
assert_eq!(e.params()["suggestion"], "app.test");
let errs = errors_for("hostname = \"app.test\"\nupstreams = [\"http://10.0.0.2:3000/app\"]\n");
let e = errs.iter().find(|e| e.code() == "host.upstream.path").unwrap();
let e = errs
.iter()
.find(|e| e.code() == "host.upstream.path")
.unwrap();
assert_eq!(e.params()["suggestion"], "http://10.0.0.2:3000");
assert_eq!(e.params()["url"], "http://10.0.0.2:3000/app");
}