-
Notifications
You must be signed in to change notification settings - Fork 84
Improve acceptance tests #782
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
Merged
peanball
merged 15 commits into
cloudfoundry:master
from
sap-contributions:improve-acceptance-tests
Apr 9, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1d2b8ad
test: remove custom handling of bpm release
mtekel 07a407c
test: only build testflight if not present
mtekel 00863e1
test: use common functions
mtekel bf72616
test: dry bosh start message
mtekel c24f133
test: DRY git pull
mtekel 8b88f32
test: dry bosh operations
mtekel 9f3dacc
test: remove SCRIPT_DIR variable
mtekel 19385c4
test: run-local with pending changes
mtekel e8e0eb2
test: no parallelism when focused
mtekel 19e3eec
test: keep test bosh running when focused
mtekel 4d5ecd4
test: reduce compilation VMs
mtekel 12e8ab4
test: use external scratch for internal docker
mtekel ee49e1b
doc: Update acceptace tests docs
mtekel d040b09
doc: Fix spelling, articles and other minor things
mtekel d02c411
test: apply shellcheck recommendations
mtekel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,14 +1,37 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
| REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)" | ||
| source "${REPO_DIR}/ci/scripts/functions-ci.sh" | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "$0")/" && pwd)" | ||
| REPO_DIR="$(cd "$SCRIPT_DIR/.." && pwd)" | ||
| usage() { | ||
| echo -e "Usage: $0 [-k] | ||
|
|
||
| # Build acceptance test image | ||
| pushd "$SCRIPT_DIR/../ci" || exit 1 | ||
| docker build -t haproxy-boshrelease-testflight . | ||
| popd || exit 1 | ||
| -k Keep bosh container running. Useful for debug." 1>&2; exit 1; | ||
| } | ||
|
|
||
| # Run local shell | ||
| docker run -it --rm --privileged -v "$REPO_DIR":/repo -e REPO_ROOT=/repo haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./shell" | ||
| while getopts ":k" o; do | ||
| case "${o}" in | ||
| k) | ||
| KEEP_RUNNING=true | ||
| ;; | ||
| *) | ||
| usage | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| build_image "${REPO_DIR}/ci" | ||
| prepare_docker_scratch | ||
|
|
||
| # Run local shell - start new container with bosh | ||
| if [ -n "${KEEP_RUNNING}" ] ; then | ||
| echo | ||
| echo "*** KEEP_RUNNING enabled. Please clean up docker scratch after removing containers: ${DOCKER_SCRATCH}" | ||
| echo | ||
| docker run -it --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e KEEP_RUNNING="${KEEP_RUNNING}" -e REPO_ROOT=/repo haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./shell ; sleep infinity" | ||
| else | ||
| docker run -it --rm --privileged -v "$REPO_DIR":/repo -v "${DOCKER_SCRATCH}":/scratch/docker -e KEEP_RUNNING="" -e REPO_ROOT=/repo haproxy-boshrelease-testflight bash -c "cd /repo/ci/scripts && ./shell" | ||
| echo "Cleaning up docker scratch: ${DOCKER_SCRATCH}" | ||
| sudo rm -rf "${DOCKER_SCRATCH}" | ||
| fi |
This file contains hidden or 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,3 @@ | ||
| - path: /compilation/workers | ||
| type: replace | ||
| value: 2 |
This file contains hidden or 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 hidden or 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
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.