File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,14 +33,13 @@ jobs:
3333
3434 - run : go generate -x
3535 - run : go build -v .
36-
37- - name : Setup integration test environment
38- run : sudo bash tests/setup.sh
39-
40- - run : PEERINGDB_API_KEY=${{ secrets.PEERINGDB_API_KEY }} go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... ./cmd/...
36+ - run : make test-setup
37+ - run : PEERINGDB_API_KEY=${{ secrets.PEERINGDB_API_KEY }} make test
4138
4239 - name : Upload coverage report
4340 uses : codecov/codecov-action@v1
4441 with :
4542 token : ${{ secrets.CODECOV_TOKEN }}
4643 file : ./coverage.txt
44+
45+ - run : make test-teardown
Original file line number Diff line number Diff line change @@ -26,4 +26,5 @@ vendorbuild/mikrotik/docker-buildx
2626
2727# Testing
2828test-cache /
29- test-conf.yml
29+ test-conf.yml
30+ nohup.out
Original file line number Diff line number Diff line change 1+ dummy-iface :
2+ # Allow UDP ping. For more information, see https://github.com/go-ping/ping#linux
3+ sudo sysctl -w net.ipv4.ping_group_range=" 0 2147483647"
14
5+ sudo ip link del dev dummy0
6+ sudo ip link add dev dummy0 type dummy
7+ sudo ip addr add dev dummy0 192.0.2.1/24
8+ sudo ip link set dev dummy0 up
29
310peeringdb-test-harness :
4- python3 tests/peeringdb/peeringdb-test-api.py
11+ nohup python3 tests/peeringdb/peeringdb-test-api.py &
12+
13+ test-setup : dummy-iface peeringdb-test-harness
14+
15+ test :
16+ go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... ./cmd/...
17+
18+ test-teardown :
19+ pkill -f tests/peeringdb/peeringdb-test-api.py
20+ sudo ip link del dev dummy0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments