diff --git a/docs/pom.xml b/docs/pom.xml index af7f7ad3..edc076ef 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -297,7 +297,6 @@ ${skipTests} - true ${basedir}/src/test/bash/run-bats.sh diff --git a/docs/src/test/bash/build-helper.sh b/docs/src/test/bash/build-helper.sh index 818c58e6..8308c252 100755 --- a/docs/src/test/bash/build-helper.sh +++ b/docs/src/test/bash/build-helper.sh @@ -20,13 +20,17 @@ if [[ $# -ne 1 ]]; then usage fi -SHELLCHECK_VERSION="v0.6.0" +SHELLCHECK_VERSION="v0.7.0" +ARCH="x86_64" +if [ "$(uname -m)" == aarch64 ]; then + ARCH="aarch64" +fi SHELLCHECK_BIN="${ROOT_DIR}/../target/shellcheck-${SHELLCHECK_VERSION}/shellcheck" case $1 in download-shellcheck) if [[ "${OSTYPE}" == linux* && ! -z "${SHELLCHECK_BIN}" ]]; then - SHELLCHECK_ARCHIVE="shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" + SHELLCHECK_ARCHIVE="shellcheck-${SHELLCHECK_VERSION}.linux.${ARCH}.tar.xz" if [[ -x "${ROOT_DIR}/../target/shellcheck-${SHELLCHECK_VERSION}/shellcheck" ]]; then echo "shellcheck already downloaded - skipping..." exit 0 @@ -55,6 +59,8 @@ case $1 in exit 0 fi git clone https://github.com/bats-core/bats-core.git "${ROOT_DIR}/../target/bats" + git clone https://github.com/ztombol/bats-support.git "${ROOT_DIR}/target/test_helper/bats-support" + git clone https://github.com/ztombol/bats-assert "${ROOT_DIR}/target/test_helper/bats-assert" ;; run-bats) echo "Running bats" diff --git a/docs/src/test/bats/ghpages.bats b/docs/src/test/bats/ghpages.bats index 6bd942d8..ad7a4aaa 100644 --- a/docs/src/test/bats/ghpages.bats +++ b/docs/src/test/bats/ghpages.bats @@ -1,8 +1,8 @@ #!/usr/bin/env bats load 'test_helper' -load 'test_helper/bats-support/load' -load 'test_helper/bats-assert/load' +load '../../../target/test_helper/bats-support/load' +load '../../../target/test_helper/bats-assert/load' setup() { export TEMP_DIR="$( mktemp -d )" @@ -84,6 +84,7 @@ export -f printing_git_with_remotes export -f stubbed_git @test "should upload the built docs to the root of gh-pages for snapshot versions" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -111,6 +112,7 @@ export -f stubbed_git } @test "should upload the built docs to spring-cloud-static gh-pages branch for non-snapshot versions" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -145,6 +147,7 @@ export -f stubbed_git } @test "should upload the release train docs to spring-cloud-static under the release train folder" { + export BRANCH=master export GIT_BIN="stubbed_git" export SOURCE_FUNCTIONS="" export RELEASER_GIT_OAUTH_TOKEN="mytoken" @@ -217,6 +220,7 @@ export -f stubbed_git } @test "should retrieve the name of the current branch" { + export BRANCH=master export GIT_BIN="stubbed_git" cd "${TEMP_DIR}/spring-cloud-stream/" source "${SOURCE_DIR}"/ghpages.sh diff --git a/docs/src/test/bats/update-guides.bats b/docs/src/test/bats/update-guides.bats index fc7871bc..e45a3183 100644 --- a/docs/src/test/bats/update-guides.bats +++ b/docs/src/test/bats/update-guides.bats @@ -1,8 +1,8 @@ #!/usr/bin/env bats load 'test_helper' -load 'test_helper/bats-support/load' -load 'test_helper/bats-assert/load' +load '../../../target/test_helper/bats-support/load' +load '../../../target/test_helper/bats-assert/load' setup() { export TEMP_DIR="$( mktemp -d )"