diff options
author | Christopher Koch <c@chrisko.ch> | 2019-01-15 20:55:06 +0000 |
---|---|---|
committer | Chris K <c@chrisko.ch> | 2019-01-19 14:44:00 -0800 |
commit | feb8958aff848a6d7363fea2e29a2ac071685055 (patch) | |
tree | 768aee371b4b7a1af1aba5691e97b7970d5c560d /dhcpv4/option_tftp_server_name_test.go | |
parent | fe6f307df5d78a54ddd4a56a275043317148fe5a (diff) |
dhcpv4: consolidate string options into one file.
Diffstat (limited to 'dhcpv4/option_tftp_server_name_test.go')
-rw-r--r-- | dhcpv4/option_tftp_server_name_test.go | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/dhcpv4/option_tftp_server_name_test.go b/dhcpv4/option_tftp_server_name_test.go deleted file mode 100644 index c46b5db..0000000 --- a/dhcpv4/option_tftp_server_name_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package dhcpv4 - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func TestOptTFTPServerNameCode(t *testing.T) { - opt := OptTFTPServerName{} - require.Equal(t, OptionTFTPServerName, opt.Code()) -} - -func TestOptTFTPServerNameToBytes(t *testing.T) { - opt := OptTFTPServerName{ - TFTPServerName: "linuxboot", - } - data := opt.ToBytes() - expected := []byte{ - 'l', 'i', 'n', 'u', 'x', 'b', 'o', 'o', 't', - } - require.Equal(t, expected, data) -} - -func TestParseOptTFTPServerName(t *testing.T) { - expected := []byte{ - 'l', 'i', 'n', 'u', 'x', 'b', 'o', 'o', 't', - } - opt, err := ParseOptTFTPServerName(expected) - require.NoError(t, err) - require.Equal(t, "linuxboot", string(opt.TFTPServerName)) -} - -func TestOptTFTPServerNameString(t *testing.T) { - o := OptTFTPServerName{TFTPServerName: "testy test"} - require.Equal(t, "TFTP Server Name -> testy test", o.String()) -} |