* Most tests work with HTTP/2 support using nghttp2
* except non-ssl http/1->/2 upgrade * Restconf: ensure HEAD method works everywhere GET does.
This commit is contained in:
parent
b680e3c5ac
commit
84f5762ab5
59 changed files with 1683 additions and 1107 deletions
|
|
@ -100,11 +100,11 @@ if [ $RC -ne 0 ]; then
|
|||
|
||||
new "start restconf daemon"
|
||||
start_restconf -f $cfg
|
||||
|
||||
new "waiting"
|
||||
wait_restconf
|
||||
fi
|
||||
|
||||
new "wait restconf"
|
||||
wait_restconf
|
||||
|
||||
# Check this later with committed data
|
||||
new "generate config with $perfnr list entries"
|
||||
echo -n "<x xmlns=\"urn:example:clixon\">" > $fconfigonly
|
||||
|
|
@ -131,10 +131,11 @@ new "netconf commit large config"
|
|||
expecteof "time -p $clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><commit/></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$" 2>&1 | awk '/real/ {print $2}'
|
||||
|
||||
new "Check running-db contents"
|
||||
curl $CURLOPTS -X GET -H "Accept: application/yang-data+xml" $RCPROTO://localhost/restconf/data?content=config > $foutput
|
||||
curl $CURLOPTS -X GET -H "Accept: application/yang-data+xml" $RCPROTO://localhost/restconf/data?content=config > $foutput
|
||||
|
||||
# Remove Content-Length line (depends on size)
|
||||
sed -i '/Content-Length:/d' $foutput
|
||||
sed -i '/content-length:/d' $foutput
|
||||
# Remove (nginx) web-server specific lines
|
||||
sed -i '/Server:/d' $foutput
|
||||
sed -i '/Date:/d' $foutput
|
||||
|
|
@ -142,7 +143,11 @@ sed -i '/Transfer-Encoding:/d' $foutput
|
|||
sed -i '/Connection:/d' $foutput
|
||||
|
||||
# Create a file to compare with
|
||||
echo "HTTP/1.1 200 OK
" > $ftest
|
||||
if ${WITH_HTTP2}; then
|
||||
echo "HTTP/$HVER 200
" > $ftest
|
||||
else
|
||||
echo "HTTP/$HVER 200 OK
" > $ftest
|
||||
fi
|
||||
echo "Content-Type: application/yang-data+xml
" >> $ftest
|
||||
echo "Cache-Control: no-cache
" >> $ftest
|
||||
echo "
">> $ftest
|
||||
|
|
@ -150,7 +155,7 @@ echo -n "<data>">> $ftest
|
|||
cat $fconfigonly >> $ftest
|
||||
echo "</data>
" >> $ftest
|
||||
|
||||
ret=$(diff $ftest $foutput)
|
||||
ret=$(diff -i $ftest $foutput)
|
||||
if [ $? -ne 0 ]; then
|
||||
err1 "Matching running-db with $fconfigonly"
|
||||
fi
|
||||
|
|
@ -190,7 +195,6 @@ expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO<rpc $DEFAULTNS><discard-ch
|
|||
# XXX This takes time
|
||||
# 18.69 without startup feature
|
||||
# 21.98 with startup
|
||||
new "restconf delete $perfreq small config"
|
||||
{ time -p for (( i=0; i<$perfreq; i++ )); do
|
||||
rnd=$(( ( RANDOM % $perfnr ) ))
|
||||
curl $CURLOPTS -X DELETE $RCPROTO://localhost/restconf/data/scaling:x/y=$rnd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue