Commit 51981e1c authored by Francis Dupont's avatar Francis Dupont
Browse files

[5241] Updated get_config unit tests

parent 0c9b8b88
......@@ -3260,19 +3260,19 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3356,19 +3356,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3430,19 +3430,19 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3525,19 +3525,19 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 1,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 2,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3603,27 +3603,27 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 222,\n"
" \"csv-format\": true,\n"
" \"data\": \"11\",\n"
" \"name\": \"base-option\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 1,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 2,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3724,11 +3724,11 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"AB\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3744,19 +3744,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3829,11 +3829,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"0102030405060708090A\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3863,11 +3863,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"FF\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -3943,19 +3943,19 @@ const char* UNPARSED_CONFIGS[] = {
" {\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4028,11 +4028,11 @@ const char* UNPARSED_CONFIGS[] = {
" {\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 56,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"dhcp-message\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4041,11 +4041,11 @@ const char* UNPARSED_CONFIGS[] = {
" {\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4104,19 +4104,19 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 1,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-encapsulated-options-space\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 2,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-encapsulated-options-space\"\n"
" }\n"
" ],\n"
......@@ -4182,27 +4182,27 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 43,\n"
" \"csv-format\": false,\n"
" \"data\": \"0104000004D20204C0A80201\",\n"
" \"name\": \"vendor-encapsulated-options\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 1,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-encapsulated-options-space\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 2,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-encapsulated-options-space\"\n"
" }\n"
" ],\n"
......@@ -4294,17 +4294,17 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": false,\n"
" \"data\": \"1234\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-1234\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-4491\"\n"
" }\n"
" ],\n"
......@@ -4377,11 +4377,11 @@ const char* UNPARSED_CONFIGS[] = {
" },\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": true,\n"
" \"data\": \"this is a string vendor-opt\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-4491\"\n"
" }\n"
" ],\n"
......@@ -4741,19 +4741,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 5,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.0.3.95\",\n"
" \"name\": \"name-servers\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": true,\n"
" \"data\": \"11\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4768,19 +4768,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 5,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.0.3.15\",\n"
" \"name\": \"name-servers\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": true,\n"
" \"data\": \"32\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4841,19 +4841,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 5,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.0.4.11\",\n"
" \"name\": \"name-servers\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 23,\n"
" \"csv-format\": true,\n"
" \"data\": \"95\",\n"
" \"name\": \"default-ip-ttl\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp4\"\n"
" }\n"
" ],\n"
......@@ -4947,11 +4947,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"next-server\": \"0.0.0.0\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": true,\n"
" \"data\": \"123\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......
......@@ -65,6 +65,7 @@ namespace {
///@{
/// @brief extracted configurations
const char* EXTRACTED_CONFIGS[] = {
/// put this after const char* EXTRACTED_CONFIGS[] = {
// CONFIGURATION 0
"{\n"
" \"interfaces-config\": {\n"
......@@ -3142,19 +3143,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"mac-sources\": [ \"any\" ],\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 7,\n"
" \"csv-format\": true,\n"
" \"data\": \"01\",\n"
" \"name\": \"preference\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3251,19 +3252,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"interface-id\": \"\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 7,\n"
" \"csv-format\": false,\n"
" \"data\": \"01\",\n"
" \"name\": \"preference\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3328,19 +3329,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"mac-sources\": [ \"any\" ],\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"ABCDEF0105\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3431,19 +3432,19 @@ const char* UNPARSED_CONFIGS[] = {
" \"mac-sources\": [ \"any\" ],\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 110,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 111,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3518,27 +3519,27 @@ const char* UNPARSED_CONFIGS[] = {
" \"mac-sources\": [ \"any\" ],\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": true,\n"
" \"data\": \"11\",\n"
" \"name\": \"base-option\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 110,\n"
" \"csv-format\": true,\n"
" \"data\": \"1234\",\n"
" \"name\": \"foo\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" },\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 111,\n"
" \"csv-format\": true,\n"
" \"data\": \"192.168.2.1\",\n"
" \"name\": \"foo2\",\n"
" \"always-send\": false,\n"
" \"space\": \"isc\"\n"
" }\n"
" ],\n"
......@@ -3663,11 +3664,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"interface-id\": \"\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"0102030405060708090A\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3696,11 +3697,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"interface-id\": \"\",\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 15,\n"
" \"csv-format\": false,\n"
" \"data\": \"FFFEFDFCFB\",\n"
" \"name\": \"user-class\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3787,11 +3788,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"excluded-prefix-len\": 0,\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"112233445566\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3804,11 +3805,11 @@ const char* UNPARSED_CONFIGS[] = {
" \"excluded-prefix-len\": 0,\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 15,\n"
" \"csv-format\": false,\n"
" \"data\": \"AABBCCDDEE\",\n"
" \"name\": \"user-class\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3820,11 +3821,11 @@ const char* UNPARSED_CONFIGS[] = {
" {\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 38,\n"
" \"csv-format\": false,\n"
" \"data\": \"0102030405060708090A\",\n"
" \"name\": \"subscriber-id\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3833,11 +3834,11 @@ const char* UNPARSED_CONFIGS[] = {
" {\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 15,\n"
" \"csv-format\": false,\n"
" \"data\": \"FFFEFDFCFB\",\n"
" \"name\": \"user-class\",\n"
" \"always-send\": false,\n"
" \"space\": \"dhcp6\"\n"
" }\n"
" ],\n"
......@@ -3898,17 +3899,17 @@ const char* UNPARSED_CONFIGS[] = {
" \"mac-sources\": [ \"any\" ],\n"
" \"option-data\": [\n"
" {\n"
" \"always-send\": false,\n"
" \"code\": 100,\n"
" \"csv-format\": false,\n"
" \"data\": \"1234\",\n"
" \"always-send\": false,\n"
" \"space\": \"vendor-1234