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 19, 2017
1 parent 3b7cb17 commit 74ae8f2
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 74ae8f2

Please sign in to comment.