harbor run -t openthoughts/tasktrove-exp-rpt-stack-bash-withtests-gpt5mini-v2-stack-bash-withtests-gpt4o-2788harbor download openthoughts/tasktrove-exp-rpt-stack-bash-withtests-gpt5mini-v2-stack-bash-withtests-gpt4o-2788Create two executable shell scripts in the project under /app/ that together perform a Cloud Foundry login and run a small set of acceptance checks against the targeted org/space.
Files to create
Both files must be executable (chmod +x).
Behavior to implement
Notes and constraints
Example environment (for testing)
Implement these two scripts and ensure they are executable and perform the checks described above so that invoking the login script followed by brats.sh succeeds when provided with valid environment variables and a working cf CLI.
The following test script will be used to verify your solution:
#!/bin/bash -l
set -o errexit
set -o pipefail
pushd buildpack > /dev/null
if [ ! -f ./go.mod ]; then
export GOPATH=$PWD
fi
export GOBIN=$PWD/.bin
export PATH=$GOBIN:$PATH
popd > /dev/null
if [[ -e "${PWD}/buildpack/scripts/.util/tools.sh" ]]; then
# shellcheck disable=SC1091
source "${PWD}/buildpack/scripts/.util/tools.sh"
util::tools::cf::install --directory "${PWD}/buildpack/.bin"
fi
"./cf-space/login"
pushd buildpack > /dev/null
./scripts/brats.sh
popd > /dev/null