summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/bsdp/bsdp_option_misc_test.go
diff options
context:
space:
mode:
authorAndrea Barberio <insomniac@slackware.it>2019-05-08 13:51:39 +0100
committerinsomniac <insomniacslk@users.noreply.github.com>2019-05-08 20:08:19 +0100
commit5dea7039d65e5b94fa681b17bc4a3bf63aa47994 (patch)
tree5726ea67a6a46cef01edc18efc2ab886cb53b724 /dhcpv4/bsdp/bsdp_option_misc_test.go
parent7f47189c0d8f5c8b06ab1787a94506fbb673e6e0 (diff)
[CI] Added linters
Now the CI will also run golangci-lint Signed-off-by: Andrea Barberio <insomniac@slackware.it>
Diffstat (limited to 'dhcpv4/bsdp/bsdp_option_misc_test.go')
-rw-r--r--dhcpv4/bsdp/bsdp_option_misc_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/dhcpv4/bsdp/bsdp_option_misc_test.go b/dhcpv4/bsdp/bsdp_option_misc_test.go
index 44e2813..675a5db 100644
--- a/dhcpv4/bsdp/bsdp_option_misc_test.go
+++ b/dhcpv4/bsdp/bsdp_option_misc_test.go
@@ -22,7 +22,7 @@ func TestGetReplyPort(t *testing.T) {
require.Equal(t, uint16(1234), port)
o = VendorOptions{dhcpv4.Options{}}
- port, err = o.ReplyPort()
+ _, err = o.ReplyPort()
require.Error(t, err, "no reply port present")
}
@@ -40,7 +40,7 @@ func TestGetServerPriority(t *testing.T) {
require.Equal(t, uint16(1234), prio)
o = VendorOptions{dhcpv4.Options{}}
- prio, err = o.ServerPriority()
+ _, err = o.ServerPriority()
require.Error(t, err, "no server prio present")
}
@@ -73,19 +73,19 @@ func TestGetVersion(t *testing.T) {
require.Equal(t, ver, Version1_1)
o = VendorOptions{dhcpv4.Options{}}
- ver, err = o.Version()
+ _, err = o.Version()
require.Error(t, err, "no version present")
o = VendorOptions{dhcpv4.Options{OptionVersion.Code(): []byte{}}}
- ver, err = o.Version()
+ _, err = o.Version()
require.Error(t, err, "empty version field")
o = VendorOptions{dhcpv4.Options{OptionVersion.Code(): []byte{1}}}
- ver, err = o.Version()
+ _, err = o.Version()
require.Error(t, err, "version option too short")
o = VendorOptions{dhcpv4.Options{OptionVersion.Code(): []byte{1, 2, 3}}}
- ver, err = o.Version()
+ _, err = o.Version()
require.Error(t, err, "version option too long")
}