]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Split out tests
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 15 Nov 2020 15:43:16 +0000 (09:43 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 15 Nov 2020 15:43:16 +0000 (09:43 -0600)
src/tests/unit/protocols/dhcpv6/packet.txt
src/tests/unit/protocols/dhcpv6/relay_reply.txt [new file with mode: 0644]

index a597773f31b8235fdacff1b3d2c4b1226229dbea..e39066954215bacb0f62a03ebf77272f8c329ace 100644 (file)
@@ -13,12 +13,5 @@ match 03 ab cd ef 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e
 decode-proto -
 match Packet-Type = Request, Transaction-ID = 0xabcdef, Client-ID-DUID = Client-ID-DUID-UUID, Client-ID-DUID-UUID-Value = 0x000102030405060708090a0b0c0d0e0f
 
-encode-proto Packet-Type = Relay-Reply, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x6c61672d373a3130352e313238, Relay-Message = { Packet-Type = Relay-Reply, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Advertise, Transaction-ID = 0x950806, Client-ID-DUID = Client-ID-DUID-LLT, Client-ID-DUID-LLT-Hardware-Type = Client-ID-DUID-LLT-Ethernet, Client-ID-DUID-LLT-Time = "Jul 27 2020 16:06:09 UTC", Client-ID-DUID-LLT-Ethernet-Address = 00:50:56:a3:53:fe } }
-match 0d 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 0d 6c 61 67 2d 37 3a 31 30 35 2e 31 32 38 00 09 00 5c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 16 02 95 08 06 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe
-
-decode-proto -
-match Packet-Type = Relay-Reply, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x6c61672d373a3130352e313238, Relay-Message = { Packet-Type = Relay-Reply, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Advertise, Transaction-ID = 0x950806, Client-ID-DUID = Client-ID-DUID-LLT, Client-ID-DUID-LLT-Hardware-Type = Client-ID-DUID-LLT-Ethernet, Client-ID-DUID-LLT-Time = "Jul 27 2020 16:06:09 UTC", Client-ID-DUID-LLT-Ethernet-Address = 00:50:56:a3:53:fe } }
-
-
 count
-match 10
+match 6
diff --git a/src/tests/unit/protocols/dhcpv6/relay_reply.txt b/src/tests/unit/protocols/dhcpv6/relay_reply.txt
new file mode 100644 (file)
index 0000000..8259798
--- /dev/null
@@ -0,0 +1,23 @@
+#
+#  -*- text -*-
+#  Copyright (C) 2020 Network RADIUS SARL <legal@networkradius.com>
+#  This work is licensed under CC-BY version 4.0 https://creativecommons.org/licenses/by/4.0
+#
+#  Version $Id$
+#
+#  Test vectors for relay packets in the DHCPv6 protocol
+#
+proto dhcpv6
+proto-dictionary dhcpv6
+
+encode-proto Packet-Type = Relay-Reply, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x6c61672d373a3130352e313238, Relay-Message = { Packet-Type = Relay-Reply, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Advertise, Transaction-ID = 0x950806, Client-ID-DUID = Client-ID-DUID-LLT, Client-ID-DUID-LLT-Hardware-Type = Client-ID-DUID-LLT-Ethernet, Client-ID-DUID-LLT-Time = "Jul 27 2020 16:06:09 UTC", Client-ID-DUID-LLT-Ethernet-Address = 00:50:56:a3:53:fe } }
+match 0d 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 0d 6c 61 67 2d 37 3a 31 30 35 2e 31 32 38 00 09 00 5c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 16 02 95 08 06 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe
+
+decode-proto -
+match Packet-Type = Relay-Reply, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x6c61672d373a3130352e313238, Relay-Message = { Packet-Type = Relay-Reply, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Advertise, Transaction-ID = 0x950806, Client-ID-DUID = Client-ID-DUID-LLT, Client-ID-DUID-LLT-Hardware-Type = Client-ID-DUID-LLT-Ethernet, Client-ID-DUID-LLT-Time = "Jul 27 2020 16:06:09 UTC", Client-ID-DUID-LLT-Ethernet-Address = 00:50:56:a3:53:fe } }
+
+decode-proto 0d 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 0d 6c 61 67 2d 37 3a 31 30 35 2e 31 32 38 00 09 00 7a 0d 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 34 0d 1e 70 36 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 00 01 00 0e 00 01 00 01 86 61 e4 eb 00 50 56 a3 53 fe
+match foo
+
+count
+match 4