Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
681334e
Run some test
weiiwang01 Jun 9, 2025
9079dda
Run some test
weiiwang01 Jun 9, 2025
b1daf69
Update integration-tests.yaml
weiiwang01 Jun 25, 2025
357cdb6
Merge branch 'main' into test
weiiwang01 Jun 25, 2025
dca5af8
Update integration-tests.yaml
weiiwang01 Jun 25, 2025
97fa3ef
Run e2e test
weiiwang01 Jul 3, 2025
809019f
Merge remote-tracking branch 'origin/test' into test
weiiwang01 Jul 3, 2025
bae18b8
Run e2e test
weiiwang01 Jul 3, 2025
af2d693
Run e2e test
weiiwang01 Jul 3, 2025
4b0d900
Run e2e test
weiiwang01 Jul 3, 2025
72e8a5e
Update tests
weiiwang01 Jul 10, 2025
680e17b
Update tests
weiiwang01 Jul 10, 2025
138df71
Update tests
weiiwang01 Jul 10, 2025
656906b
Update tests
weiiwang01 Jul 10, 2025
a57ed69
Update tests
weiiwang01 Jul 10, 2025
934a273
Update tests
weiiwang01 Jul 10, 2025
86a25ec
Update tests
weiiwang01 Jul 10, 2025
3f129e3
Update tests
weiiwang01 Jul 14, 2025
163101d
Update tests
weiiwang01 Jul 22, 2025
ec892dc
Update tests
weiiwang01 Jul 22, 2025
0b55eff
Update tests
weiiwang01 Jul 22, 2025
7297872
Update tests
weiiwang01 Jul 22, 2025
02b8a3b
Update tests
weiiwang01 Jul 22, 2025
df8cbe9
Update tests
weiiwang01 Jul 22, 2025
f617ab7
Update tests
weiiwang01 Jul 22, 2025
ad695c9
Update tests
weiiwang01 Aug 11, 2025
10ff77e
Update tests
weiiwang01 Aug 11, 2025
f2b7e16
Update tests
weiiwang01 Aug 11, 2025
c60955a
Update tests
weiiwang01 Aug 11, 2025
b83d0c3
Update tests
weiiwang01 Aug 11, 2025
3c300c4
Update tests
weiiwang01 Aug 11, 2025
8c55ba4
Update tests
weiiwang01 Aug 11, 2025
bbafa8d
Update tests
weiiwang01 Aug 15, 2025
63ac415
Update tests
weiiwang01 Aug 15, 2025
8380923
Update tests
weiiwang01 Aug 15, 2025
1d78e12
Update integration-tests.yaml
weiiwang01 Sep 22, 2025
cf1d908
Merge branch 'main' into test
weiiwang01 Sep 22, 2025
dddcdc5
Merge remote-tracking branch 'origin/test' into test
weiiwang01 Sep 22, 2025
f90a8c0
Modify test workflow with new runners and certification test
weiiwang01 Nov 13, 2025
4503aec
Simplify job runner to use self-hosted only
weiiwang01 Nov 13, 2025
fb23532
Update tests.yaml
weiiwang01 Nov 13, 2025
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
11 changes: 8 additions & 3 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
table ip aproxy {
chain prerouting {
type nat hook prerouting priority dstnat; policy accept;
ip daddr != \$private-ips tcp dport { 80, 443, 11371, 4242 } counter dnat to \$default-ip:\$aproxy-port
ct state new ip daddr != \$private-ips tcp dport { 80, 443, 11371, 4242, 22 } counter dnat to \$default-ip:\$aproxy-port
}

chain output {
type nat hook output priority -100; policy accept;
ip daddr != \$private-ips tcp dport { 80, 443, 11371, 4242 } counter dnat to \$default-ip:\$aproxy-port
ct state new ip daddr != \$private-ips tcp dport { 80, 443, 11371, 4242, 22 } counter dnat to \$default-ip:\$aproxy-port
}
}
EOF
Expand All @@ -70,6 +70,10 @@ jobs:
run: |
timeout 60 gpg -vvv --keyserver hkp://keyserver.ubuntu.com --recv-keys E1DE584A8CCA52DC29550F18ABAC58F075A17EFA

- name: Test SSH
run: |
printf "" | timeout 60 nc github.com 22 | head -n 1 | grep SSH

- name: Test TCP4
run: |
sudo apt install -y socat
Expand All @@ -80,10 +84,11 @@ jobs:
sudo snap logs aproxy.aproxy | grep -Fq "example.com:80"
sudo snap logs aproxy.aproxy | grep -Fq "example.com:443"
sudo snap logs aproxy.aproxy | grep -Fq "keyserver.ubuntu.com:11371"
sudo snap logs aproxy.aproxy | grep -Fq "[0-9.]+:22"
sudo snap logs aproxy.aproxy | grep -Eq "[0-9.]+:4242"

- name: Show Access Logs
if: failure()
if: always()
run: |
sudo snap logs aproxy.aproxy -n=all

Expand Down
48 changes: 33 additions & 15 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
name: Tests
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.

name: Run End-to-End test

on:
pull_request:
workflow_call:

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest

e2e-test:
name: End-to-End Test Run
runs-on: self-hosted-linux-amd64-jammy-large
steps:
- uses: actions/checkout@v2
- name: Test certification.canonical.com
run: |
curl -vvv -x http://egress.ps7.internal:3128 https://certification.canonical.com

- name: Test repo-compliance
run: |
curl -vvv --noproxy '*' --connect-timeout 60 https://repo-policy-compliance.canonical.com/health

- name: Test HTTP
run: |
timeout 60 curl --noproxy "*" http://example.com -svS -o /dev/null

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Test HTTPS
run: |
timeout 60 curl --noproxy "*" https://example.com -svS -o /dev/null

- name: Ensure No Formatting Changes
- name: Test HKP
run: |
go fmt ./...
git diff --exit-code
timeout 60 gpg -vvv --keyserver hkp://keyserver.ubuntu.com --recv-keys E1DE584A8CCA52DC29550F18ABAC58F075A17EFA

- name: Test SSH
run: |
printf "" | timeout 60 nc github.com 22 | head -n 1 | grep SSH

- name: Test SSH (Launchpad)
run: printf "" | timeout 60 nc git.launchpad.net 22 | head -n 1 | grep SSH

- name: Build and Test
- name: Show Access Logs
if: always()
run: |
go test -race ./...
sudo snap logs aproxy.aproxy -n=all
Loading