Skip to content

Commit

Permalink
Run make vet in CI (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasikpark authored Mar 13, 2023
1 parent e1af37e commit 5da79e2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: Build
run: make all

- name: Vet
run: make vet

- name: Test
run: make test

Expand Down Expand Up @@ -79,8 +82,11 @@ jobs:
- name: Build nebula-cert
run: go build ./cmd/nebula-cert

- name: Vet
run: make vet

- name: Test
run: go test -v ./...
run: make test

- name: End 2 end
run: make e2evv
Expand Down
2 changes: 1 addition & 1 deletion control.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *Control) Stop() {

// ShutdownBlock will listen for and block on term and interrupt signals, calling Control.Stop() once signalled
func (c *Control) ShutdownBlock() {
sigChan := make(chan os.Signal)
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGTERM)
signal.Notify(sigChan, syscall.SIGINT)

Expand Down
48 changes: 24 additions & 24 deletions firewall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ func TestFirewall_Drop(t *testing.T) {
l.SetOutput(ob)

p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10,
90,
firewall.ProtoUDP,
false,
LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
LocalPort: 10,
RemotePort: 90,
Protocol: firewall.ProtoUDP,
Fragment: false,
}

ipNet := net.IPNet{
Expand Down Expand Up @@ -313,12 +313,12 @@ func TestFirewall_Drop2(t *testing.T) {
l.SetOutput(ob)

p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10,
90,
firewall.ProtoUDP,
false,
LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
LocalPort: 10,
RemotePort: 90,
Protocol: firewall.ProtoUDP,
Fragment: false,
}

ipNet := net.IPNet{
Expand Down Expand Up @@ -372,12 +372,12 @@ func TestFirewall_Drop3(t *testing.T) {
l.SetOutput(ob)

p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
1,
1,
firewall.ProtoUDP,
false,
LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
LocalPort: 1,
RemotePort: 1,
Protocol: firewall.ProtoUDP,
Fragment: false,
}

ipNet := net.IPNet{
Expand Down Expand Up @@ -458,12 +458,12 @@ func TestFirewall_DropConntrackReload(t *testing.T) {
l.SetOutput(ob)

p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10,
90,
firewall.ProtoUDP,
false,
LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
LocalPort: 10,
RemotePort: 90,
Protocol: firewall.ProtoUDP,
Fragment: false,
}

ipNet := net.IPNet{
Expand Down

0 comments on commit 5da79e2

Please sign in to comment.