Commit 6613cca6 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

param: Add a hidden deprecated alias for coverage

parent c6e3d6b5
......@@ -778,6 +778,8 @@ MCF_DumpRstParam(void)
"output from varnishd -x parameter\n\n");
VTAILQ_FOREACH(pl, &phead, list) {
pp = pl->spec;
if (!strcmp("deprecated_dummy", pp->name))
continue;
printf(".. _ref_param_%s:\n\n", pp->name);
printf("%s\n", pp->name);
for (z = 0; z < strlen(pp->name); z++)
......
varnishtest "deprecated parameters"
varnish v1 -cliok "param.set debug +syncvsl"
shell -expect "+syncvsl" {
varnishadm -n ${v1_name} "param.show deprecated_dummy"
}
shell -expect "+syncvsl" {
varnishadm -n ${v1_name} "param.show -j deprecated_dummy"
}
shell -err {
varnishadm -n ${v1_name} "param.show" | grep deprecated_dummy
}
shell -err {
varnishadm -n ${v1_name} "param.show -l" | grep deprecated_dummy
}
shell -err {
varnishadm -n ${v1_name} "param.show -j" | grep deprecated_dummy
}
......@@ -1647,13 +1647,15 @@ PARAM_PCRE2(
* When a parameter is renamed, but the a deprecated alias is kept for
* compatibility, its documentation is minimal: only a description in
* manual pages, a description and current value in the CLI.
*
* The deprecated_dummy alias is here for test coverage.
*/
#define PARAM_ALIAS(al, nm) \
PARAM(, , al, tweak_alias, NULL, NULL, NULL, #nm, NULL, \
"Deprecated alias for the " #nm " parameter.")
/* PARAM_ALIAS(old, new) */
PARAM_ALIAS(deprecated_dummy, debug)
# undef PARAM_ALIAS
# undef PARAM_ALL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment