diff options
author | Chris Koch <chrisko@google.com> | 2019-12-28 02:44:19 -0800 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2020-03-05 15:51:55 +0000 |
commit | 3b6f190b53285624aaba864ca57892d3b2a2bec4 (patch) | |
tree | 3464a136e12ce57a95c01e94a6804758fba3fa24 /dhcpv6/dhcpv6_test.go | |
parent | 20d19b1f0dd7e6c43af491199d8bd121d5c8a0c8 (diff) |
v6: RequestedOptions getter
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6/dhcpv6_test.go')
-rw-r--r-- | dhcpv6/dhcpv6_test.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/dhcpv6/dhcpv6_test.go b/dhcpv6/dhcpv6_test.go index d975308..1ecaa3c 100644 --- a/dhcpv6/dhcpv6_test.go +++ b/dhcpv6/dhcpv6_test.go @@ -242,14 +242,10 @@ func TestNewMessageTypeSolicit(t *testing.T) { require.Equal(t, cduid, &duid) // Check ORO - oroOption := s.GetOneOption(OptionORO) - require.NotNil(t, oroOption) - oro, ok := oroOption.(*OptRequestedOption) - require.True(t, ok) - opts := oro.RequestedOptions() - require.Contains(t, opts, OptionDNSRecursiveNameServer) - require.Contains(t, opts, OptionDomainSearchList) - require.Equal(t, len(opts), 2) + oro := s.Options.RequestedOptions() + require.Contains(t, oro, OptionDNSRecursiveNameServer) + require.Contains(t, oro, OptionDomainSearchList) + require.Equal(t, len(oro), 2) // Check IA_NA iaid := [4]byte{hwAddr[2], hwAddr[3], hwAddr[4], hwAddr[5]} |