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

allow configurable artifacts directory in e2e testing #861

Merged
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ sgol.txt

# Testing dirs
/artifacts
# E2E customized env artifacts dir
stcafitra/
# E2E testing artifacts dir
e2e_test_artifacts/

# But we don't want to ignore the artifacts package
!/certification/artifacts
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/operator-test-customized-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OPERATOR_INDEXIMAGE=${OPERATOR_INDEXIMAGE:-"$DEFAULT_OPERATOR_INDEXIMAGE"}
customized_sa="customsa" \
customized_ns="customns" \
customized_logfile="sgol.txt" \
customized_artifacts="stcafitra" \
customized_artifacts="e2e_test_artifacts" \
results_file="./${customized_artifacts}/results.json"


Expand Down
8 changes: 5 additions & 3 deletions test/e2e/operator-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ set -e
DEFAULT_PREFLIGHT_BIN="preflight"
DEFAULT_OPERATOR_BUNDLE="quay.io/opdev/simple-demo-operator-bundle:latest"
DEFAULT_OPERATOR_INDEXIMAGE="quay.io/opdev/simple-demo-operator-catalog:latest"
DEFAULT_ARTIFACTS_DIR="e2e_test_artifacts"

PREFLIGHT_BIN=${PREFLIGHT_BIN:-"$DEFAULT_PREFLIGHT_BIN"}
OPERATOR_BUNDLE=${OPERATOR_BUNDLE:-"$DEFAULT_OPERATOR_BUNDLE"}
OPERATOR_INDEXIMAGE=${OPERATOR_INDEXIMAGE:-"$DEFAULT_OPERATOR_INDEXIMAGE"}
ARTIFACTS_DIR=${ARTIFACTS_DIR:-"$DEFAULT_ARTIFACTS_DIR"}

results_file="./artifacts/results.json"

results_file="${ARTIFACTS_DIR}/results.json"

USAGE="
Usage:
Expand Down Expand Up @@ -45,11 +46,12 @@ results_file="./artifacts/results.json"
echo "Preflight binary value: $PREFLIGHT_BIN"
echo "Operator bundle being tested: $OPERATOR_BUNDLE"
echo "Operator index for test: $OPERATOR_INDEXIMAGE"
echo "Artifacts directory for test: $ARTIFACTS_DIR"

# Run preflight.
echo "Running preflight"
echo -e "========================"
PFLT_LOGLEVEL=trace PFLT_INDEXIMAGE="${OPERATOR_INDEXIMAGE}" \
PFLT_LOGLEVEL=trace PFLT_INDEXIMAGE="${OPERATOR_INDEXIMAGE}" PFLT_ARTIFACTS="${ARTIFACTS_DIR}" \
"./${PREFLIGHT_BIN}" check operator "${OPERATOR_BUNDLE}"

echo -e "\n========================"
Expand Down