#!/bin/bash # Contributions to this work were made on behalf of the GÉANT project, a # project that has received funding from the European Union’s Horizon 2020 # research and innovation programme under Grant Agreement No. 731122 (GN4-2). # On behalf of the GÉANT project, GEANT Association is the sole owner of the # copyright in all material which was developed by a member of the GÉANT # project. GÉANT Vereniging (Association) is registered with the Chamber of # Commerce in Amsterdam with registration number 40535155 and operates in the # UK as a branch of GÉANT Vereniging. # Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. # UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK # License: please refer to the 'LICENCE' file in the file structure # © 2017-2018 GÉANT Association on behalf of the GÉANT Projects funded by EU; and others if [ -z "$1" ]; then echo "ERR: Required parameter - base URL, e.g. http://sc.qalab.geant.net" exit 1 fi echo "Expecting all responses to be '200'" BASEURL=$1 TESTCASES="/ /ui /project /person /auth" for TESTCASE in $TESTCASES do CHECKURL=$BASEURL$TESTCASE HTTPCODE=`curl -s -o /dev/null -I -w "%{http_code}" $CHECKURL` echo "Status of $TESTCASE: $HTTPCODE" done # ElasticSearch needs to be checked more sophistically, below: TESTCASE="/elasticsearch/project/_msearch" HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" -H "Content-Type: application/x-ndjson" -X GET $BASEURL$TESTCASE --data-binary "@verify-http-public-elasticrequest.json"` echo "Status of $TESTCASE: $HTTPCODE"