Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
varnishevent
Commits
76be6c01
Commit
76be6c01
authored
Apr 19, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the test script for VSL command-line options, currently just testing -g
parent
a96bf70e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
Makefile.am
src/test/Makefile.am
+2
-1
vslarg.sh
src/test/vslarg.sh
+53
-0
No files found.
src/test/Makefile.am
View file @
76be6c01
AM_CPPFLAGS
=
@VARNISH_CFLAGS@
-I
${
ac_varnish_pkgdataincludedir
}
TESTS
=
test_data test_strfTIM test_format test_writer ncsa.sh regress.sh
# vslarg.sh
TESTS
=
test_data test_strfTIM test_format test_writer ncsa.sh vslarg.sh
\
regress.sh
check_PROGRAMS
=
test_data test_strfTIM test_format test_writer
...
...
src/test/vslarg.sh
0 → 100755
View file @
76be6c01
#!/bin/bash
echo
echo
"TEST:
$0
"
echo
"... testing standard VSL args"
echo
"... -g grouping"
# For grouping, use the larger test log that has some backend transactions,
# since the two groupings have the effect of exchanging the order of some
# output lines (no difference with the smaller log).
CKSUM
=
$(
../varnishevent
-g
vxid
-r
sw-doc.log
-f
varnishevent.conf |
cksum
)
# Same as default (no -g arg)
if
[
"
$CKSUM
"
!=
'3589078266 20793576'
]
;
then
echo
"ERROR: -g vxid unexpected cksum:
$CKSUM
"
exit
1
fi
CKSUM
=
$(
../varnishevent
-g
request
-r
sw-doc.log
-f
varnishevent.conf |
cksum
)
if
[
"
$CKSUM
"
!=
'2107709581 20793576'
]
;
then
echo
"ERROR: -g request unexpected cksum:
$CKSUM
"
exit
1
fi
exit
0
echo
"... -m tag:regex"
CKSUM
=
$(
../varnishevent
-m
RxURL:manual
-m
RxURL:pt-br
-r
varnish.binlog |
cksum
)
if
[
"
$CKSUM
"
!=
'3698415327 24419'
]
;
then
echo
"ERROR: -m tag:regex incorrect cksum:
$CKSUM
"
exit
1
fi
echo
"... -s skip"
CKSUM
=
$(
../varnishevent
-s
20000
-r
varnish.binlog |
cksum
)
if
[
"
$CKSUM
"
!=
'3254949310 3668220'
]
;
then
echo
"ERROR: -s skip incorrect cksum:
$CKSUM
"
exit
1
fi
echo
"... -X regex"
CKSUM
=
$(
../varnishevent
-X
manual
-r
varnish.binlog |
cksum
)
if
[
"
$CKSUM
"
!=
'2279381770 3663437'
]
;
then
echo
"ERROR: -X regex incorrect cksum:
$CKSUM
"
exit
1
fi
exit
0
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