Run make vet in CI (#693)

This commit is contained in:
Caleb Jasik 2023-03-13 14:35:12 -05:00 committed by GitHub
parent e1af37e46d
commit 5da79e2a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 26 deletions

View File

@ -37,6 +37,9 @@ jobs:
- name: Build - name: Build
run: make all run: make all
- name: Vet
run: make vet
- name: Test - name: Test
run: make test run: make test
@ -79,8 +82,11 @@ jobs:
- name: Build nebula-cert - name: Build nebula-cert
run: go build ./cmd/nebula-cert run: go build ./cmd/nebula-cert
- name: Vet
run: make vet
- name: Test - name: Test
run: go test -v ./... run: make test
- name: End 2 end - name: End 2 end
run: make e2evv run: make e2evv

View File

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

View File

@ -138,12 +138,12 @@ func TestFirewall_Drop(t *testing.T) {
l.SetOutput(ob) l.SetOutput(ob)
p := firewall.Packet{ p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10, LocalPort: 10,
90, RemotePort: 90,
firewall.ProtoUDP, Protocol: firewall.ProtoUDP,
false, Fragment: false,
} }
ipNet := net.IPNet{ ipNet := net.IPNet{
@ -313,12 +313,12 @@ func TestFirewall_Drop2(t *testing.T) {
l.SetOutput(ob) l.SetOutput(ob)
p := firewall.Packet{ p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10, LocalPort: 10,
90, RemotePort: 90,
firewall.ProtoUDP, Protocol: firewall.ProtoUDP,
false, Fragment: false,
} }
ipNet := net.IPNet{ ipNet := net.IPNet{
@ -372,12 +372,12 @@ func TestFirewall_Drop3(t *testing.T) {
l.SetOutput(ob) l.SetOutput(ob)
p := firewall.Packet{ p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
1, LocalPort: 1,
1, RemotePort: 1,
firewall.ProtoUDP, Protocol: firewall.ProtoUDP,
false, Fragment: false,
} }
ipNet := net.IPNet{ ipNet := net.IPNet{
@ -458,12 +458,12 @@ func TestFirewall_DropConntrackReload(t *testing.T) {
l.SetOutput(ob) l.SetOutput(ob)
p := firewall.Packet{ p := firewall.Packet{
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), LocalIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)), RemoteIP: iputil.Ip2VpnIp(net.IPv4(1, 2, 3, 4)),
10, LocalPort: 10,
90, RemotePort: 90,
firewall.ProtoUDP, Protocol: firewall.ProtoUDP,
false, Fragment: false,
} }
ipNet := net.IPNet{ ipNet := net.IPNet{