In NnToJsonLeafrefType#leafrefFromLeafListToLeafTest, the leaf list is
unordered but the regex expects a certain order based on the way the
list is currently hashed. But this makes it susceptible to failure if
something changes upstream to alter the order. So I changed the regex to
not depend on the order.
Note: an upcoming yang tools patch will alter the order as a side effect
that affects this test.
Change-Id: Ibf95271b008134c3f75fc99c9ee7ba0d643dfe7a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
public void leafrefFromLeafListToLeafTest() throws Exception {
final String json = toJson("/nn-to-json/leafref/xml/data_relativ_ref_from_leaflist_to_existing_leaf.xml");
validateJson(
- ".*\"cont-augment-module\\p{Blank}*:\\p{Blank}*lflst1\":\\p{Blank}*.*\"346\",*\"347\",*\"345\".*",
+ ".*\"cont-augment-module\\p{Blank}*:\\p{Blank}*lflst1\":\\p{Blank}*.*\"34[5|6|7]\",*\"34[5|6|7]\",*\"34[5|6|7]\".*",
json);
}