MCPcopy Create free account
hub / github.com/danderson/netboot / TestExtractLLAddressOrIdWithDUIDEN

Function TestExtractLLAddressOrIdWithDUIDEN

dhcp6/packet_builder_test.go:498–505  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

496}
497
498func TestExtractLLAddressOrIdWithDUIDEN(t *testing.T) {
499 builder := &PacketBuilder{}
500 expectedID := []byte{0x0, 0x1, 0x2, 0x3, 0xac, 0xbc, 0x32, 0xae, 0x86, 0x37}
501 id := builder.extractLLAddressOrID([]byte{0x0, 0x2, 0x0, 0x1, 0x2, 0x3, 0xac, 0xbc, 0x32, 0xae, 0x86, 0x37})
502 if string(expectedID) != string(id) {
503 t.Fatalf("Expected id %x, got: %x", expectedID, id)
504 }
505}
506
507func TestExtractLLAddressOrIdWithDUIDLL(t *testing.T) {
508 builder := &PacketBuilder{}

Callers

nothing calls this directly

Calls 1

extractLLAddressOrIDMethod · 0.95

Tested by

no test coverage detected