Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 391-dm-run
* master: NFC: More logging dotscience#3 make subdot roots writeable by all, for containers which run as non-root FIX: Missed space :-( Testing stuff in CI is tedious. FIX: Missed the `-c` option to the `dm dot delete...` FIX: Typo... #17: Pull the right image, use a dedicated config, and test `dm dot delete` on the remote NFC: Test adding sleep to ensure replication. #17: Avoid echoing the API key, and run the smoke tests on Linux (it's easier for me to debug them there) #17: Made the smoke test push to a remote cluster (if credentials are passed into SMOKE_TEST_REMOTE and SMOKE_TEST_APIKEY). NFC: Fix logging on error messages #352: Attempt to reduce flakiness by checking replication status on both nodes in a cluster NFC: Comments concerning pod health checking NFC: Re-enable flaky test for debugging #344: We no longer need the GKE yamls (that's handled in the ConfigMap), and they're not referenced from the docs any more. NFC: fix typo sneaked into yaml NFC: Comment out test until we can work out how to fix it
- Loading branch information
Showing
8 changed files
with
122 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env bash | ||
set -xe | ||
|
||
# Smoke test to see whether basics still work on e.g. macOS; also tests the | ||
|
||
DM="$1" | ||
VOL="volume_`date +%s`" | ||
IMAGE="${CI_DOCKER_REGISTRY:-`hostname`.local:80/dotmesh}/"$2":${CI_DOCKER_TAG:-latest}" | ||
|
||
# We use a bespoke config path to isolate us from other runs (although | ||
# we do hog the node's docker state, so it's far from perfect) | ||
|
||
CONFIG=/tmp/smoke_test_$$.dmconfig | ||
trap 'rm "$CONFIG" || true' EXIT | ||
|
||
sudo "$DM" -c "$CONFIG" cluster reset || (sleep 30; sudo "$DM" cluster reset) || true | ||
|
||
echo "### Installing image ${IMAGE}" | ||
|
||
"$DM" -c "$CONFIG" cluster init --offline --image "$IMAGE" | ||
|
||
echo "### Testing docker run..." | ||
|
||
docker run --rm -i --name smoke -v "$VOL:/foo" --volume-driver dm ubuntu touch /foo/X | ||
|
||
echo "### Testing list..." | ||
|
||
OUT=`"$DM" -c "$CONFIG" list` | ||
|
||
if [[ $OUT == *"$VOL"* ]]; then | ||
echo "String '$VOL' found, yay!" | ||
else | ||
echo "String '$VOL' not found, boo :(" | ||
exit 1 | ||
fi | ||
|
||
echo "### Testing commit..." | ||
|
||
"$DM" -c "$CONFIG" switch "$VOL" | ||
"$DM" -c "$CONFIG" commit -m 'Test commit' | ||
|
||
OUT=`"$DM" -c "$CONFIG" log` | ||
|
||
if [[ $OUT == *"Test commit"* ]]; then | ||
echo "Commit found, yay!" | ||
else | ||
echo "Commit not found, boo :(" | ||
exit 1 | ||
fi | ||
|
||
if [ x$SMOKE_TEST_REMOTE != x ] | ||
then | ||
echo "### Testing push to remote..." | ||
REMOTE="smoke_test_`date +%s`" | ||
|
||
(set +x; echo "$SMOKE_TEST_APIKEY"; set -x) | "$DM" -c "$CONFIG" remote add "$REMOTE" "$SMOKE_TEST_REMOTE" | ||
|
||
"$DM" -c "$CONFIG" push "$REMOTE" "$VOL" | ||
|
||
"$DM" -c "$CONFIG" remote switch "$REMOTE" | ||
OUT=`"$DM" -c "$CONFIG" list` | ||
|
||
if [[ $OUT == *"$VOL"* ]]; then | ||
echo "String '$VOL' found on the remote, yay!" | ||
else | ||
echo "String '$VOL' not found on the remote, boo :(" | ||
exit 1 | ||
fi | ||
|
||
echo "### Testing delete on remote..." | ||
|
||
REMOTE_NAME="`echo $SMOKE_TEST_REMOTE | sed s/@.*$//`" | ||
"$DM" -c "$CONFIG" dot delete -f "$REMOTE_NAME"/"$VOL" | ||
|
||
"$DM" -c "$CONFIG" remote switch local | ||
"$DM" -c "$CONFIG" remote rm "$REMOTE" | ||
fi | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters