Skip to content

Commit 23c9943

Browse files
committed
fix: keep stdin coming
1 parent 9c3e362 commit 23c9943

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.github/workflows/operator_bundle_tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
operatorhub-test:
77
runs-on: ubuntu-latest
88
env:
9-
OP_TEST_CONTAINER_OPT: " "
9+
OP_TEST_CONTAINER_OPT: "-i"
1010
steps:
1111
- name: Set up Go env
1212
uses: actions/setup-go@v2
@@ -30,7 +30,10 @@ jobs:
3030
cd go/src/github.com/${{ env.REPOSITORY }}
3131
make lint-prepare bundle-test
3232
shell: bash
33-
- name: Print test logs if failure
33+
- name: Print test logs on failure
3434
if: ${{ failure() }}
3535
run: |
36+
cat /tmp/test.out
37+
echo -e "\n--------------------------------------------------------------------------\n"
3638
cat /tmp/op-test/log.out
39+
shell: bash

scripts/release/operatorhub.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,19 @@ if [[ $runTests -ne 0 ]]; then
9494
echo "Running tests: $tests"
9595

9696
cd "${TMP_DIR}"
97-
export OP_TEST_ANSIBLE_PULL_REPO="https://github.com/redhat-openshift-ecosystem/operator-test-playbooks" ## can be removed after https://github.com/redhat-openshift-ecosystem/operator-test-playbooks/pull/244 is merged
97+
98+
## can be removed after https://github.com/redhat-openshift-ecosystem/operator-test-playbooks/pull/244 is merged
99+
export OP_TEST_ANSIBLE_PULL_REPO="https://github.com/redhat-openshift-ecosystem/operator-test-playbooks"
100+
98101
bash <(curl -sL https://cutt.ly/AEeucaw) \
99102
"$tests" \
100-
"${OPERATOR_HUB}/${OPERATOR_NAME}/${OPERATOR_VERSION}"
103+
"${OPERATOR_HUB}/${OPERATOR_NAME}/${OPERATOR_VERSION}" > /tmp/test.out
104+
101105
## Until the script is fixed https://github.com/redhat-openshift-ecosystem/operator-test-playbooks/pull/247
102-
tail -n 4 /tmp/op-test/log.out | grep "Failed with rc="
103-
exit_code=$?
104-
if [ $exit_code -eq 0 ]; then exit $exit_code; fi # "Failed with rc=" was found in the logs
106+
if tail -n 4 /tmp/test.out | grep "Failed with rc";
107+
then
108+
exit 1;
109+
fi # "Failed" was found in the logs
105110
fi
106111

107112
if [[ ! $dryRun && -z $GITHUB_TOKEN ]]; then

0 commit comments

Comments
 (0)