Skip to content

Commit

Permalink
Merge pull request #17 from ti-mo/integration/kernel-modules
Browse files Browse the repository at this point in the history
Makefile - load nf and xt modules in integration tests
  • Loading branch information
ti-mo committed Nov 13, 2019
2 parents 1ed536e + 868d313 commit 38c2f3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ testv:
go test -v -race ./...

.PHONY: modprobe
kmods = nf_nat nf_conntrack xt_conntrack xt_MASQUERADE
modprobe:
ifeq ($(shell id -u),0)
-modprobe -a nf_conntrack nf_conntrack_ipv4 nf_conntrack_ipv6
-modprobe -a $(kmods)
else
-sudo modprobe -a nf_conntrack nf_conntrack_ipv4 nf_conntrack_ipv6
-sudo modprobe -a $(kmods)
endif

.PHONY: integration
Expand Down

0 comments on commit 38c2f3b

Please sign in to comment.