Skip to content

Commit

Permalink
integration tests: better log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alban committed May 18, 2017
1 parent f5f2d5c commit a31e7df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integration/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ scope_end_suite() {
list_containers() {
local host=$1
echo "Listing containers on ${host}:"
curl -s "http://${host}:4040/api/topology/containers?system=show" | jq -r '.nodes[] | select(has("metadata")) | .metadata[] | select(.id == "docker_image_name") | .value'
curl -s "http://${host}:4040/api/topology/containers?system=show" | jq -r '.nodes[] | select(has("metadata")) | { "image": .metadata[] | select(.id == "docker_image_name") | .value, "label": .label, "id": .id} | .id + " (" + .image + ", " + .label + ")"'
echo
}

list_connections() {
local host=$1
echo "Listing connections on ${host}:"
curl -s "http://${host}:4040/api/topology/containers?system=show" | jq -r '.nodes[] | select(has("adjacency")) | { "from": .id, "to": .adjacency[]} | .from + " -> " + .to'

curl -s "http://${host}:4040/api/topology/containers?system=show" | jq -r '.nodes[] | select(has("adjacency")) | { "from_name": .label, "from_id": .id, "to": .adjacency[]} | .from_id + " (" + .from_name+ ") -> " + .to'
echo
}

# this checks we have a named node in the given view
Expand Down

0 comments on commit a31e7df

Please sign in to comment.