mysql_cb unit tests fail on Mac OS
some unit tests fail on Mac OS
[ RUN ] MySqlConfigBackendDHCPv6Test.getAllSubnets6 mysql_cb_dhcp6_unittest.cc:856: Failure Expected equality of these values: test_subnets_[i + 1]->toElement()->str() Which is:
"{ "id": 1024, "option-data": [ ], "pd-pools": [ { "delegated-len": 64, "option-data": [ { "always-send": true, "code": 1254, "csv-format": false, "data": "20010DB8000000000000000000000003", "name": "option-1254", "space": "dhcp6" }, { "always-send": true, "code": 1, "csv-format": false, "data": "", "name": "isc-1", "space": "isc" } ],
"prefix": "2001:db8:c::", "prefix-len": 48 }, { "delegated-len": 64, "option-data": [ ],
"prefix": "2001:db8:d::", "prefix-len": 48 } ], "pools": [ { "option-data": [ { "always-send": true, "code": 1254, "csv-format": false, "data": "20010DB8000000000000000000000003", "name": "option-1254", "space": "dhcp6" }, { "always-send": true, "code": 1, "csv-format": false, "data": "", "name": "isc-1", "space": "isc" } ], "pool": "2001:db8:1::10-2001:db8:1::20" }, { "option-data": [ ], "pool": "2001:db8:1::50-2001:db8:1::60" } ], "preferred-lifetime": 40, "rebind-timer": 30, "relay": { "ip-addresses": [ ] }, "renew-timer": 20, "subnet": "2001:db8:1::/48", "valid-lifetime": 50 }"
subnets[i]->toElement()->str() Which is:
"{ "id": 1024, "option-data": [ ], "pd-pools": [ { "delegated-len": 64, "option-data": [ { "always-send": true, "code": 1254, "csv-format": false, "data": "20010DB8000000000000000000000003", "name": "option-1254", "space": "dhcp6" }, { "always-send": true, "code": 1, "csv-format": false, "data": "", "name": "isc-1", "space": "isc" } ],
"prefix": "2001:db8:d::", "prefix-len": 48 } ], "pools": [ { "option-data": [ { "always-send": true, "code": 1254, "csv-format": false, "data": "20010DB8000000000000000000000003", "name": "option-1254", "space": "dhcp6" }, { "always-send": true, "code": 1, "csv-format": false, "data": "", "name": "isc-1", "space": "isc" } ], "pool": "2001:db8:1::10-2001:db8:1::20" }, { "option-data": [ ], "pool": "2001:db8:1::50-2001:db8:1::60" } ], "preferred-lifetime": 40, "rebind-timer": 30, "relay": { "ip-addresses": [ ] }, "renew-timer": 20, "subnet": "2001:db8:1::/48", "valid-lifetime": 50 }"
[ FAILED ] MySqlConfigBackendDHCPv6Test.getAllSubnets6 (113 ms)
[ RUN ] MySqlConfigBackendDHCPv6Test.getSharedNetworkSubnets6 mysql_cb_dhcp6_unittest.cc:984: Failure Value of: isEquivalent(test_subnets_[1]->toElement(), subnets[0]->toElement()) Actual: false Expected: true mysql_cb_dhcp6_unittest.cc:992: Failure Value of: isEquivalent(test_subnets_[1]->toElement(), subnets[0]->toElement()) Actual: false Expected: true [ FAILED ] MySqlConfigBackendDHCPv6Test.getSharedNetworkSubnets6 (113 ms)
I have made an initial investigation. The data in the database is similar for Linux and Mac OS, but it seems that the same query returns the data in a different order. I am not sure how is this actually impacting the actual serialization of the subnet form the database