Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix acceptance test setup to work on local linux #754

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions acceptance-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ginkgo-*.log
acceptance-tests.test
9 changes: 6 additions & 3 deletions acceptance-tests/run-local.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
FOCUS="$1"

set -eu

Expand All @@ -13,8 +14,6 @@ if ! [[ $(git status --porcelain=v1 2>/dev/null | wc -l) -eq 0 ]]; then
exit 1
fi

FOCUS="$1"

docker_mac_check_cgroupsv1() {
# Force cgroups v1 on Docker for Mac
# inspired by https://github.com/docker/for-mac/issues/6073#issuecomment-1018793677
Expand All @@ -32,11 +31,15 @@ docker_mac_check_cgroupsv1() {
check_required_files() {
PIDS=""
REQUIRED_FILE_PATTERNS=(
../ci/scripts/bpm/bpm-release-*.tgz!https://bosh.io/d/github.com/cloudfoundry/bpm-release
../ci/scripts/stemcell/bosh-stemcell-*-ubuntu-jammy-*.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-jammy-go_agent
../ci/scripts/stemcell-bionic/bosh-stemcell-*-ubuntu-bionic-*.tgz!https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-bionic-go_agent
)

# BPM downloads as uuid and needs manually specifying file name
if [ ! -f "../ci/scripts/bpm/bpm-release-latest.tgz" ] ; then
curl -sL https://bosh.io/d/github.com/cloudfoundry/bpm-release -o ../ci/scripts/bpm/bpm-release-latest.tgz
fi

for entry in "${REQUIRED_FILE_PATTERNS[@]}"; do
pattern=$(cut -f1 -d! <<<"$entry")
url=$(cut -f2 -d! <<<"$entry")
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/acceptance-tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fi

cd "${REPO_ROOT:?required}"
echo "----- Pulling in any git submodules..."
git config --global --add safe.directory /repo
git config --global --add safe.directory /repo/src/ttar
Comment on lines +19 to +20
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It make senses to introduce a variable for the path /repo/src/ttar, since you use it in another scripts in the same folder (ci/scripts)

git submodule update --init --recursive --force

# shellcheck disable=SC1091
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/shell
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ bpm_release_path=$PWD/bpm/*.tgz

cd ${REPO_ROOT:?required}
echo "----- Pulling in any git submodules..."
git config --global --add safe.directory /repo
git config --global --add safe.directory /repo/src/ttar
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It make senses to introduce a variable for the path /repo/src/ttar, since you use it in another scripts in the same folder (ci/scripts)

git submodule update --init --recursive --force

echo "----- Starting BOSH"
Expand Down