Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcomstock committed Feb 14, 2025
1 parent 82946fe commit 66e27d1
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tests/shell/001-docker-install-test.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -ex
dir=$(dirname $0)
error () {
echo "=== an error occurred, logs follow ==="
cat log
}
trap error ERR

dir=$(dirname "$0")
name=cf-remote-debian-test-host

docker stop "$name" || true
docker rm "$name" || true
docker build -t "$name" "$dir"
docker run -d -p 8822:22 --name "$name" "$name"
docker build -t "$name" "$dir" >log 2>&1
docker run -d -p 8822:22 --name "$name" "$name" >>log 2>&1
ip_addr=$(hostname -i)
ssh -o StrictHostKeyChecking=no -p 8822 root@"$ip_addr" hostname
cf-remote install --clients root@"$ip_addr":8822
ssh -o StrictHostKeyChecking=no -p 8822 root@"$ip_addr" cf-agent -V
ssh -o StrictHostKeyChecking=no -p 8822 root@"$ip_addr" hostname >>log 2>&1
cf-remote install --clients root@"$ip_addr":8822 >>log 2>&1
ssh -o StrictHostKeyChecking=no -p 8822 root@"$ip_addr" cf-agent -V >>log 2>&1

0 comments on commit 66e27d1

Please sign in to comment.