Jagger jaas api

How I to know when my env created is ready to receive tests ?
You can get this info from jaas via api:


curl --write-out %{http_code} --silent --output /dev/null -X GET --header 'Accept: application/json' 'http://<jaas_addr>:<jaas_port>/jaas/envs/new-test-env'

This request give answer code. If you'r env present you get 200, if not - 404.

Where
jaas_addr - jaas  address
jaas_port - jaas port
new-test-env - name of my env.


Bash script:

#!/bin/bash

code=404

while [ ${code} != 200 ]; do
    code=$(curl --write-out %{http_code} --silent --output /dev/null -X GET --header 'Accept: application/json' 'http://
<jaas_addr>:<jaas_port>/jaas/envs/new-test-env')
    echo "wait env"
    sleep 5
done


We wait when my env will be available from jaas.

Комментарии

Популярные сообщения из этого блога

How to work with authentication in Zookeeper?

How-to use cUrl for work with ZKUI.

Consul-template: how to run exec command, if file changed? Create a "watcher" via consul-template.