Skip to content

Commit bf0ed7a

Browse files
authored
Refactoring and cleanup (#14)
* refactoring to support multiple ips and add more documentation * fix #12 * adds more tests * adds a makefile to help testing on macbooks
1 parent 90a2e77 commit bf0ed7a

File tree

5 files changed

+475
-207
lines changed

5 files changed

+475
-207
lines changed

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Extract the Go version directly from go.mod (e.g., "1.23")
2+
GO_VERSION = $(shell awk '/^toolchain / {sub(/go/,"",$$2) ; print $$2}' go.mod)
3+
4+
DOCKER_IMAGE = cni-outbound-test
5+
6+
.PHONY: test
7+
test:
8+
# Build the Docker image, passing GO_VERSION to the Docker build
9+
docker build \
10+
--build-arg GO_VERSION=$(GO_VERSION) \
11+
-f Dockerfile.test \
12+
-t $(DOCKER_IMAGE) .
13+
# Run the container, which by default executes "go test -v ./..."
14+
docker run --rm $(DOCKER_IMAGE)
15+
16+
.PHONY: clean
17+
clean:
18+
docker rmi $(DOCKER_IMAGE) || true

0 commit comments

Comments
 (0)