File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed
Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Integration Test
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Run integration tests
16+ run : make test
Original file line number Diff line number Diff line change 1+ FROM ubuntu:22.04
2+
3+ # Install required packages
4+ RUN apt-get update && \
5+ apt-get install -y \
6+ net-tools \
7+ iproute2 \
8+ && rm -rf /var/lib/apt/lists/*
9+
10+ # Copy the script
11+ COPY check_netio.sh /usr/local/bin/check_netio.sh
12+
13+ # Make it executable
14+ RUN chmod +x /usr/local/bin/check_netio.sh
15+
16+ # Set working directory
17+ WORKDIR /usr/local/bin
18+
19+ # Default command that runs basic test
20+ CMD ["./check_netio.sh" , "-i" , "eth0" ]
Original file line number Diff line number Diff line change 1+ .PHONY : build test test-basic test-error test-tcp test-legacy test-invalid
2+
3+ IMAGE_NAME = check-netio
4+
5+ build :
6+ docker build -t $(IMAGE_NAME ) .
7+
8+ test-basic : build
9+ docker run --network host $(IMAGE_NAME )
10+
11+ test-error : build
12+ docker run --network host $(IMAGE_NAME ) ./check_netio.sh -i eth0 -e
13+
14+ test-tcp : build
15+ docker run --network host $(IMAGE_NAME ) ./check_netio.sh -i eth0 -t
16+
17+ test-legacy : build
18+ docker run --network host $(IMAGE_NAME ) ./check_netio.sh -i eth0 -l
19+
20+ test-invalid : build
21+ docker run --network host $(IMAGE_NAME ) ./check_netio.sh -i eth999 || test $$? -eq 3
22+
23+ test : test-basic test-error test-tcp test-legacy test-invalid
You can’t perform that action at this time.
0 commit comments