We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
anubis/scripts/test_middleware.sh
Line 28 in 6b8feb2
echo "" echo "Get metadata from node 1?" echo "===============================================================" export response=`curl -s -o /dev/null -w "%{http_code}" --request GET 'http://localhost:8098/metadata'` if [ $response == "200" ] then echo "PASSED" else echo "ERROR: Can't get metadata" exit 1 fi echo "" echo "Get metadata from node 2?" echo "===============================================================" export response=`curl -s -o /dev/null -w "%{http_code}" --request GET 'http://localhost:8099/metadata'` if [ $response == "200" ] then echo "PASSED" else echo "ERROR: Can't get metadata" exit 1 fi # TODO: THIS IS REQUIRED UNTIL WE DON'T INJECT SUBSCRITION IN LUA echo "" echo "Can subscribe node 1 for urn:AirQuality:1? (destination tenant 1)" echo "===============================================================" export response=`curl -s -o /dev/null -w "%{http_code}" --request POST 'http://localhost:8098/resource/urn:AirQuality:1/subscribe' --header 'fiware-Service: Tenant1' --header 'fiware-Servicepath: /'` if [ $response == "200" ] then echo "PASSED" else echo "ERROR: Can't subscribe" exit 1 fi echo "" echo "Can retrieve mobile data from node 2 for user admin@mail.com?" echo "===============================================================" export response=`curl -s -o /dev/null -w "%{http_code}" --request GET 'http://localhost:8099/mobile/policies' --header 'user: admin@mail.com'` if [ $response == "200" ] then echo "PASSED" else echo "ERROR: Can't get mobile data" exit 1 fi echo "" echo "Node 1 has 3 policies for urn:AirQuality:1 in Tenant1" echo "===============================================================" export response=`curl -s -X 'GET' 'http://localhost:8085/v1/policies/?resource=urn%3AAirQuality%3A1&skip=0&limit=100' -H 'accept: application/json' -H 'fiware-service: Tenant1' -H 'fiware-servicepath: /#' | jq length` if [ $response == "3" ] then echo "PASSED" else echo "ERROR" exit 1 fi echo "" echo "Node 2 has 0 policies for urn:AirQuality:1 in Tenant2" echo "===============================================================" export response=`curl -s -X 'GET' 'http://localhost:8086/v1/policies/?resource=urn%3AAirQuality%3A1&skip=0&limit=100' -H 'accept: application/json' -H 'fiware-service: Tenant2' -H 'fiware-servicepath: /#' | jq length` if [ $response == "0" ] then echo "PASSED" else echo "ERROR" exit 1 fi echo "" echo "Can subscribe node 2 for urn:AirQuality:1 (destination tenant 2)?" echo "===============================================================" export response=`curl -s -o /dev/null -w "%{http_code}" --request POST 'http://localhost:8099/resource/urn:AirQuality:1/subscribe' --header 'fiware-Service: Tenant2' --header 'fiware-Servicepath: /'` if [ $response == "200" ] then echo "PASSED" else echo "ERROR: Can't subscribe" exit 1 fi echo "" echo "Node 2 now has 3 policies for urn:AirQuality:1 in Tenant2" echo "===============================================================" export response=`curl -s -X 'GET' 'http://localhost:8086/v1/policies/?resource=urn%3AAirQuality%3A1&skip=0&limit=100' -H 'accept: application/json' -H 'fiware-service: Tenant2' -H 'fiware-servicepath: /#' | jq length` if [ $response == "3" ] then echo "PASSED" else echo "ERROR" exit 1 fi
The text was updated successfully, but these errors were encountered:
No branches or pull requests
anubis/scripts/test_middleware.sh
Line 28 in 6b8feb2
The text was updated successfully, but these errors were encountered: