Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Macedo <camila.macedo@foundries.io>
  • Loading branch information
Camila Macedo committed Nov 3, 2023
1 parent f391410 commit 631437f
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ jobs:
run: |
mkdir -p ./data/certs
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out ./data/certs/local-ca.key
openssl req -x509 -new -nodes -key ./data/certs/local-ca.key -sha256 -days 3650 -out ./data/certs/local-ca.pem -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=local-ca.example.com"
openssl req -x509 -new -nodes -key ./data/certs/local-ca.key -sha256 -days 3650 -out ./data/certs/factory_ca.pem -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out ./data/certs/server.key
openssl req -new -key ./data/certs/server.key -out ./data/certs/server.csr -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com"
openssl x509 -req -in ./data/certs/server.csr -CA ./data/certs/factory_ca.pem -CAkey ./data/certs/local-ca.key -CAcreateserial -out ./data/certs/tls-crt -days 365 -sha256
openssl x509 -req -in ./data/certs/server.csr -CA ./data/certs/local-ca.pem -CAkey ./data/certs/local-ca.key -CAcreateserial -out ./data/certs/tls-crt -days 365 -sha256
ls -la ./data/certs
- name: Build Docker Compose
Expand All @@ -43,23 +44,9 @@ jobs:
docker-compose up -d
sleep 30
- name: Execute Script with Expectation of ConnectionResetError
- name: Execute Script
run: |
set +e
output=$(python3 fake-lmp-device-register --registration-url "http://localhost:80/sign" --factory fake-test-sample 2>&1)
exit_code=$?
set -e
# if [ $exit_code -ne 0 ]; then
# echo "Non-zero exit code: $exit_code"
# if echo "$output" | grep -q 'ConnectionResetError'; then
# echo "Expected connection reset failure occurred."
# else
# echo "Unexpected failure occurred."
# exit 1
# fi
# fi
echo "Output:"
echo "$output"
python3 fake-lmp-device-register --registration-url "http://localhost:80/sign" --factory fake-test-sample
- name: Check relative /var/sota directory and pkey.pem file
run: |
Expand Down

0 comments on commit 631437f

Please sign in to comment.