[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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user