From c4b1051b1f998a26c7ec80065520d8c57277f184 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Wed, 4 Nov 2020 22:17:41 +0100 Subject: [PATCH] * Changed first parameter from `int fd` to `FILE *f` in the following functions: * clixon_xml_parse_file(), clixon_json_parse_file(), yang_parse_file() * See [Bytewise read() of files is slow #146](https://github.com/clicon/clixon/issues/146) --- test/test_collection.sh | 114 ---------------------------------------- 1 file changed, 114 deletions(-) delete mode 100755 test/test_collection.sh diff --git a/test/test_collection.sh b/test/test_collection.sh deleted file mode 100755 index 5debe9a3..00000000 --- a/test/test_collection.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash -# Restconf RFC8040 Appendix A and B "jukebox" example -# For collection / scaling activity -# Magic line must be first in script (see README.md) -s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi - -APPNAME=example - -cfg=$dir/conf.xml -fjukebox=$dir/example-jukebox.yang - -cat < $cfg - - $cfg - ietf-netconf:startup - /usr/local/share/clixon - $IETFRFC - $dir - false - /usr/local/var/$APPNAME/$APPNAME.sock - /usr/local/lib/$APPNAME/backend - $dir/restconf.pidfile - $dir - true - -EOF - -cat < $dir/startup_db - - - - - Foo Fighters - - Crime and Punishment - 1995 - - - One by One - 2002 - - - The Color and the Shape - 1997 - - - There is Nothing Left to Loose - 1999 - - - White and Black - 1998 - - - - - -EOF - -# Common Jukebox spec (fjukebox must be set) -. ./jukebox.sh - -new "test params: -f $cfg -- -s" # XXX: -sS state file - -if [ $BE -ne 0 ]; then - new "kill old backend" - sudo clixon_backend -zf $cfg - if [ $? -ne 0 ]; then - err - fi - sudo pkill -f clixon_backend # to be sure - new "start backend -s startup -f $cfg" - start_backend -s startup -f "$cfg" -fi - -new "waiting" -wait_backend - -if [ $RC -ne 0 ]; then - new "kill old restconf daemon" - stop_restconf_pre - - new "start restconf daemon" - start_restconf -f $cfg - - new "waiting" - wait_restconf -fi - -new "C.1. 'count' Parameter RESTCONF" -expectpart "$(curl $CURLOPTS -X GET -H "Accept: application/yang.collection+xml" $RCPROTO://localhost/restconf/data/example-jukebox:jukebox/library/artist=Foo%20Fighters/album/?count=2)" 0 "HTTP/1.1 200 OK" "application/yang.collection+xml" 'Crime and Punishment1995One by One2002' - -new "C.1. 'count' Parameter NETCONF" -expecteof "$clixon_netconf -qf $cfg" 0 "runningexample-jukebox/example-jukebox:jukebox/library/artist=Foo Fighters/album2]]>]]>" '^Crime and Punishment1995One by One2002]]>]]>$' - -if [ $RC -ne 0 ]; then - new "Kill restconf daemon" - stop_restconf -fi - -if [ $BE -eq 0 ]; then - exit # BE -fi - -new "Kill backend" -# Check if premature kill -pid=$(pgrep -u root -f clixon_backend) -if [ -z "$pid" ]; then - err "backend already dead" -fi -# kill backend -stop_backend -f $cfg - -rm -rf $dir