From 1edfcd6859038a66c0829558047d9e9c7d8950a3 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Mon, 11 Jul 2016 10:43:42 -0700 Subject: [PATCH] test: add upgrade test flag --- test | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test b/test index 3936c21c9..4f24606ae 100755 --- a/test +++ b/test @@ -57,7 +57,18 @@ function unit_tests { } function integration_tests { - echo "Running integration tests..." + if [ "$RELEASE_TEST" = "y" ]; then + UPGRADE_VER=$(git tag -l | tail -1) + if [ -n "$MANUAL_VER" ]; then + # in case, we need to test against different version + UPGRADE_VER=$MANUAL_VER + fi + echo "Running release upgrade tests with" etcd $UPGRADE_VER + curl -L https://github.com/coreos/etcd/releases/download/$UPGRADE_VER/etcd-$UPGRADE_VER-linux-amd64.tar.gz -o /tmp/etcd-$UPGRADE_VER-linux-amd64.tar.gz + tar xzvf /tmp/etcd-$UPGRADE_VER-linux-amd64.tar.gz -C /tmp/ --strip-components=1 + mv /tmp/etcd ./bin/etcd-last-release + fi; + go test -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e & e2epid="$!" go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration &