Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(test): remove hardcoded names and extract journal logs from each…
Browse files Browse the repository at this point in the history
… user app
  • Loading branch information
aledbf committed Mar 23, 2015
1 parent ca66400 commit 0182052
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/bin/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,11 @@ function dump_logs {
export FLEETCTL_TUNNEL=$DEISCTL_TUNNEL
fleetctl -strict-host-key-checking=false list-units
# application unit logs
get_logs appssample_v2.web.1
get_logs appssample_v2.run.1
get_logs buildsample_v2.web.1
get_logs buildsample_v3.cmd.1
get_logs deispullsample_v2.cmd.1
get_logs deispullsample_v2.worker.1
get_logs pssample_v2.worker.1
get_logs pssample_v2.worker.2
for APP in `fleetctl -strict-host-key-checking=false list-units --no-legend --fields=unit | grep -v "deis-"`;do
CURRENT_APP=$(echo $APP | sed "s/\.service//")
#echo "$CURRENT_APP"
get_journal_logs $CURRENT_APP
done
# etcd keyspace
get_logs deis-controller "etcdctl ls / --recursive" etcdctl-dump
# component logs
Expand Down Expand Up @@ -170,3 +167,8 @@ function get_logs {
fi
fleetctl -strict-host-key-checking=false ssh "$TARGET" docker logs "$CONTAINER" > $FAILED_LOGS_DIR/$FILENAME.log
}

function get_journal_logs {
TARGET="$1"
fleetctl -strict-host-key-checking=false journal --lines=1000 "$TARGET" > $FAILED_LOGS_DIR/$TARGET.log
}

0 comments on commit 0182052

Please sign in to comment.