#$1 is link
#$2 is grep
cache="$(curl -v "$1" 2>&1 | grep "$2")"
- echo $cache
+ #echo $cache
if [ "" == "$cache" ]
then
exit 1
gnunet-identity -D "test_plugin_rest_gns" > /dev/null 2>&1
-curl_get "$gns_link?name=www.test_plugin_rest_gns" "error"
+curl_get "$gns_link/www.test_plugin_rest_gns" "error"
gnunet-identity -C "test_plugin_rest_gns"
-curl_get "$gns_link?name=www.test_plugin_rest_gns" "\[\]"
+curl_get "$gns_link/www.test_plugin_rest_gns" "\[\]"
gnunet-namestore -z "test_plugin_rest_gns" -p -a -n www -e 1d -V 1.1.1.1 -t A
-curl_get "$gns_link?name=www.test_plugin_rest_gns" "1.1.1.1"
+curl_get "$gns_link/www.test_plugin_rest_gns" "1.1.1.1"
gnunet-namestore -z "test_plugin_rest_gns" -p -a -n www -e 1d -V 1::1 -t AAAA
-curl_get "$gns_link?name=www.test_plugin_rest_gns" "1::1.*1.1.1.1"
+curl_get "$gns_link/www.test_plugin_rest_gns" "1::1.*1.1.1.1"
gnunet-namestore -z "test_plugin_rest_gns" -p -a -n www -e 1d -V 1.1.1.2 -t A
-curl_get "$gns_link?name=www.test_plugin_rest_gns" "1.1.1.2.*1::1.*1.1.1.1"
-curl_get "$gns_link?name=www.test_plugin_rest_gns&record_type=A" "1.1.1.2.*1.1.1.1"
-curl_get "$gns_link?name=www.test_plugin_rest_gns&record_type=AAAA" "1::1"
-curl_get "$gns_link?name=www.test_plugin_rest_gns&record_type=WRONG_TYPE" "1.1.1.2.*1::1.*1.1.1.1"
+curl_get "$gns_link/www.test_plugin_rest_gns" "1.1.1.2.*1::1.*1.1.1.1"
+curl_get "$gns_link/www.test_plugin_rest_gns?record_type=A" "1.1.1.2.*1.1.1.1"
+curl_get "$gns_link/www.test_plugin_rest_gns?record_type=AAAA" "1::1"
+curl_get "$gns_link/www.test_plugin_rest_gns?record_type=WRONG_TYPE" "1.1.1.2.*1::1.*1.1.1.1"
gnunet-namestore -z "test_plugin_rest_gns" -p -a -n www1 -e 1d -V 1.1.1.1 -t A
-curl_get "$gns_link?name=www1.test_plugin_rest_gns" "1.1.1.1"
+curl_get "$gns_link/www1.test_plugin_rest_gns" "1.1.1.1"
-gnunet-identity -D "test_plugin_rest_gns"
+gnunet-identity -D "test_plugin_rest_gns" > /dev/null 2>&1
-curl_get "$gns_link?name=www1.test_plugin_rest_gns" "error"
+curl_get "$gns_link/www1.test_plugin_rest_gns" "error"
exit 0