Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdfp-pipe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvdfp-pipe
Commits
75b763b4
Commit
75b763b4
authored
Aug 07, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test logging failure exit status.
parent
04f843cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
Makefile.am
src/Makefile.am
+1
-0
error.vtc
src/tests/error.vtc
+22
-0
fail.sh
src/tests/fail.sh
+8
-0
No files found.
src/Makefile.am
View file @
75b763b4
...
...
@@ -71,6 +71,7 @@ endif
EXTRA_DIST
=
\
vdfp_pipe.vcc
\
$(srcdir)
/tests/slow.sh
\
$(srcdir)
/tests/fail.sh
\
$(VMOD_TESTS)
CLEANFILES
=
\
...
...
src/tests/error.vtc
View file @
75b763b4
...
...
@@ -30,3 +30,25 @@ logexpect l1 -v v1 -g vxid -d 1 -q Error {
expect * = Error {^vdfp_pipe: vdp cat: ${cat} stderr: }
expect * = End
} -run
varnish v1 -vcl+backend {
import ${vmod_pipe};
sub vcl_init {
new fail = pipe.vdp(path="${testdir}/fail.sh");
}
sub vcl_deliver {
set resp.filters = "fail";
}
}
logexpect l1 -v v1 -g vxid -d 0 -q Error {
expect 0 * Begin {^req \d+ rxreq$}
expect * = Error {^vdfp_pipe: vdp fail: .+/fail.sh exited with status 47$}
expect * = End
} -start
client c1 -run
logexpect l1 -wait
src/tests/fail.sh
0 → 100755
View file @
75b763b4
#! /bin/sh
while
read
line
do
echo
$line
done
exit
47
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment