Skip to content

Commit

Permalink
debuging ci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
walid-git committed Mar 24, 2023
1 parent e160358 commit 53023a4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 34 deletions.
16 changes: 0 additions & 16 deletions bin/varnishd/mgt/mgt_vcl.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,21 +605,6 @@ mcf_vcl_inline(struct cli *cli, const char * const *av, void *priv)

static void v_matchproto_(cli_func_t)
mcf_vcl_load(struct cli *cli, const char * const *av, void *priv)
{
struct vclprog *vp;
const char *vcls[] = {av[3], NULL};

(void)priv;
if (!mcf_find_no_vcl(cli, av[2]))
return;

vp = mgt_new_vcl(cli, av[2], NULL, vcls, av[4], NULL, 0);
if (vp != NULL && !MCH_Running())
VCLI_Out(cli, "VCL compiled.\n");
}

static void v_matchproto_(cli_func_t)
mcf_vcl_load_files(struct cli *cli, const char * const *av, void *priv)
{
struct vclprog *vp;
const struct parspec *pp;
Expand Down Expand Up @@ -1150,7 +1135,6 @@ mgt_vcl_poker(const struct vev *e, int what)

static struct cli_proto cli_vcl[] = {
{ CLICMD_VCL_LOAD, "", mcf_vcl_load },
{ CLICMD_VCL_LOAD_FILES, "", mcf_vcl_load_files },
{ CLICMD_VCL_INLINE, "", mcf_vcl_inline },
{ CLICMD_VCL_USE, "", mcf_vcl_use },
{ CLICMD_VCL_STATE, "", mcf_vcl_state },
Expand Down
4 changes: 2 additions & 2 deletions bin/varnishtest/tests/c00123.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ shell {
) > ${tmpdir}/inc.vcl
}

varnish v1 -cliexpect "No such file or directory" {vcl.load_files foo c00123.vcl}
varnish v1 -cliexpect "No such file or directory" {vcl.load foo c00123.vcl}

varnish v1 -cliok {vcl.load_files -p ${tmpdir} foo c00123.vcl}
varnish v1 -cliok {vcl.load -p ${tmpdir} foo c00123.vcl}
varnish v1 -cliok {vcl.use foo}

client c1 {
Expand Down
2 changes: 1 addition & 1 deletion bin/varnishtest/tests/c00124.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ shell {
) > ${tmpdir}/file3.vcl
}

varnish v1 -cliok {vcl.load_files -s cold foo ${tmpdir}/file1.vcl ${tmpdir}/file2.vcl ${tmpdir}/file3.vcl}
varnish v1 -cliok {vcl.load -s cold foo ${tmpdir}/file1.vcl ${tmpdir}/file2.vcl ${tmpdir}/file3.vcl}
varnish v1 -cliexpect "VCL 'foo' is cold" {vcl.use foo}
varnish v1 -cliok {vcl.state foo warm}
varnish v1 -cliok {vcl.use foo}
Expand Down
6 changes: 3 additions & 3 deletions bin/varnishtest/tests/v00067.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ shell {
}

# Load a cold VCL. This should not become the active VCL.
varnish v1 -cliok "vcl.load vcl_cold ${tmpdir}/f1 cold"
varnish v1 -cliok "vcl.load -s cold vcl_cold ${tmpdir}/f1"
varnish v1 -cliexpect "available *cold *cold *- *vcl_cold" "vcl.list"

# The cache should not start without a warm VCL.
varnish v1 -clierr 300 "start"

# Load a warm VCL and make it the active VCL.
varnish v1 -cliok "vcl.load vcl_warm ${tmpdir}/f1 warm"
varnish v1 -cliok "vcl.load -s warm vcl_warm ${tmpdir}/f1"
varnish v1 -cliok "vcl.use vcl_warm"
varnish v1 -cliexpect "active *warm *warm *- *vcl_warm" "vcl.list"

Expand All @@ -25,7 +25,7 @@ varnish v1 -cliexpect "available *cold *cold *0 *vcl_cold" "vcl.list"
varnish v1 -cliexpect "active *warm *warm *0 *vcl_warm" "vcl.list"

# Load an automatically warming VCL, and set it as the active VCL.
varnish v1 -cliok "vcl.load vcl_auto ${tmpdir}/f1 warm"
varnish v1 -cliok "vcl.load -s warm vcl_auto ${tmpdir}/f1"
varnish v1 -cliok "vcl.use vcl_auto"
varnish v1 -cliexpect "available *warm *warm *0 *vcl_warm" "vcl.list"
varnish v1 -cliexpect "active *warm *warm *0 *vcl_auto" "vcl.list"
Expand Down
12 changes: 0 additions & 12 deletions include/tbl/cli_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,6 @@ CLI_CMD(VCL_LOAD,
"vcl.load <configname> <filename> [auto|cold|warm]",
"Compile and load the VCL file under the name provided.",
"",
2, 3
)

CLI_CMD(VCL_LOAD_FILES,
"vcl.load_files",
"vcl.load_files [-s auto|cold|warm] [-p vcl_path] <configname> <filename1> [filename2, ...]",
"Compile and load multiple VCL files under the name provided.",
" When multiple files are specified, they are parsed in the order"
" they were provided and treated as if they were concatenated and merged into"
" a single vcl file."
" The optional ``-p`` argument specifies the path of the vcl files (and included files),"
" it is prepended to the ``VCL_PATH`` parameter.",
2, -1
)

Expand Down

0 comments on commit 53023a4

Please sign in to comment.