Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Add test action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
baluchicken committed Mar 4, 2024
1 parent c561003 commit 1563d92
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Run smoke tests"
description: "Runs the smoke tests for Camblet"

runs:
using: "composite"
steps:
- name: Run smoke tests
working-directory: camblet-driver
timeout-minutes: 1
run: |
touch /tmp/camblet.log /tmp/file-server.log /tmp/python.log
echo "Run processes"
sudo AGENT_METADATACOLLECTORS_DOCKER_ENABLED=true camblet agent > /tmp/camblet.log &
go run test/file-server.go >/tmp/file-server.log &
docker run -d --rm -p 8080:80 nginx
sleep 2
echo "Test downloading a bigger file"
head -c 2M </dev/urandom > bigfile.o
curl -v -o /tmp/bigfile_downloaded.o http://localhost:8000/bigfile.o
echo "Test uploading this file"
curl -v -F "bigfile_downloaded.o=@/tmp/bigfile_downloaded.o" http://localhost:8000/upload
diff bigfile.o bigfile_downloaded.o
echo "Test bearssl with non-bearssl compatibility"
python3 -m http.server 7000 >/tmp/python.log &
sleep 1
echo "testing with curl..."
curl -k -v https://localhost:7000/
echo "testing with wget..."
wget --no-check-certificate https://localhost:7000/
echo "Test openssl client connect to python with default cipher"
openssl s_client -connect 127.0.0.1:7000
echo "Test openssl client connect to python with ECDHE-RSA-CHACHA20-POLY1305 cipher"
openssl s_client -cipher ECDHE-RSA-CHACHA20-POLY1305 -connect 127.0.0.1:7000
echo "Test sendfile with NGiNX using curl"
curl -v http://localhost:8080
echo "Test sendfile with NGiNX using wget"
wget -v http://localhost:8000
echo "Stop processes"
sudo kill -9 $(jobs -p)
sudo pkill -9 camblet
- name: Kernel log
if: always()
run: |
sudo dmesg -T
- name: Camblet agent log
if: always()
run: |
cat /tmp/camblet.log
- name: File server log
if: always()
run: |
cat /tmp/file-server.log
- name: Python log
if: always()
run: |
cat /tmp/python.log

0 comments on commit 1563d92

Please sign in to comment.