Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ab77 committed Apr 30, 2024
1 parent 73388e9 commit ede70a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,8 @@ jobs:
with_backoff ssh-uuid -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
${{ steps.register-test-device.outputs.balena_device_uuid }}.balena \
'balena ps -q \
| grep -vE "(^resin|^balena)_supervisor$|^sut_$|^dut_$" \
'balena ps -q | xargs balena inspect \
| jq -re '.[] | select(.Name | (contains("_supervisor") or contains("sut_") or contains("dut_")) | not).Id' \
| xargs balena restart'
# wait for Docker healthchecks (ignore Supervisor and test services)
Expand Down Expand Up @@ -480,7 +480,9 @@ jobs:
# ensure SUT and DUT are running
with_backoff ssh-uuid -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
${{ steps.register-test-device.outputs.balena_device_uuid }}.balena \
"balena container ls -a --format='{{json .}}' | jq -re 'select(.Names | (startswith("sut_")) or startswith("dut_")).ID' | xargs balena start"
"balena container ls -a --format='{{json .}}' \
| jq -re 'select(.Names | (startswith("sut_")) or startswith("dut_")).ID' \
| xargs balena start"
# tests service is working while its status == running
status=''
Expand Down Expand Up @@ -514,7 +516,9 @@ jobs:
expected_exit_code=0
response="$(with_backoff ssh-uuid -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
${{ steps.register-test-device.outputs.balena_device_uuid }}.balena \
"balena container ls -a --format='{{json .}}' | jq -re 'select(.Names | startswith("sut_")).ID' | xargs balena inspect")"
"balena container ls -a --format='{{json .}}' \
| jq -re 'select(.Names | startswith("sut_")).ID' \
| xargs balena inspect")"
actual_exit_code="$(echo "${response}" | jq -r '.[].State.ExitCode')"
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ update-pki:
| awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/ {print $0}' > $(TMPKI).srv

mkdir -p /usr/local/share/ca-certificates

diff --suppress-common-lines --unchanged-line-format= $(TMPKI).srv $(TMPKI).ca \
>/usr/local/share/ca-certificates/open-balena.pem || true

update-ca-certificates

curl https://api.${DNS_TLD}/ping
cat </usr/local/share/ca-certificates/open-balena.pem
curl --fail --retry 3 --silent https://api.$(DNS_TLD)/ping

up:
echo "DNS_TLD=$(DNS_TLD)" > .env
Expand Down

0 comments on commit ede70a5

Please sign in to comment.