Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit 5cf57b8

Browse files
committed
run portmap tests on CI
1 parent a7ff90e commit 5cf57b8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ clean:
1616

1717
test:
1818
CGO_ENABLED=1 go test -v -race -count 1 ./...
19+
cd ./cmd/cni-kindnet ; CGO_ENABLED=1 go test -v -race -count 1 .
1920

2021
# code linters
2122
lint:

cmd/cni-kindnet/cni_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929

3030
func TestCNIPlugin(t *testing.T) {
3131
if os.Getuid() != 0 {
32-
t.Fatalf("Test requires root privileges.")
32+
t.Skip("Test requires root privileges.")
3333
}
3434
tests := []struct {
3535
name string
@@ -139,7 +139,7 @@ func TestCNIPlugin(t *testing.T) {
139139

140140
func TestAddDel(t *testing.T) {
141141
if os.Getuid() != 0 {
142-
t.Fatalf("Test requires root privileges.")
142+
t.Skip("Test requires root privileges.")
143143
}
144144

145145
now := time.Now()
@@ -250,7 +250,7 @@ func TestAddDel(t *testing.T) {
250250

251251
func TestAdds(t *testing.T) {
252252
if os.Getuid() != 0 {
253-
t.Fatalf("Test requires root privileges.")
253+
t.Skip("Test requires root privileges.")
254254
}
255255

256256
now := time.Now()
@@ -372,7 +372,7 @@ func TestAdds(t *testing.T) {
372372

373373
func TestHostPort(t *testing.T) {
374374
if os.Getuid() != 0 {
375-
t.Fatalf("Test requires root privileges.")
375+
t.Skip("Test requires root privileges.")
376376
}
377377
containerPort := 8080
378378
tests := []struct {

0 commit comments

Comments
 (0)