diff --git a/lib/cisco_node_utils/route_map.rb b/lib/cisco_node_utils/route_map.rb index 977720f2..114a497d 100644 --- a/lib/cisco_node_utils/route_map.rb +++ b/lib/cisco_node_utils/route_map.rb @@ -309,7 +309,7 @@ def default_match_tag # match source-protocol tcp udp def match_src_proto str = config_get('route_map', 'match_src_proto', @get_args) - str.empty? ? default_match_src_proto : str.split + str.empty? ? default_match_src_proto : str.split.sort end def match_src_proto=(list) diff --git a/tests/test_route_map.rb b/tests/test_route_map.rb index 708ac191..c280b749 100644 --- a/tests/test_route_map.rb +++ b/tests/test_route_map.rb @@ -152,11 +152,9 @@ def test_match_tag def test_match_src_proto rm = create_route_map assert_equal(rm.default_match_src_proto, rm.match_src_proto) - array = %w(tcp udp igmp) + array = %w(tcp udp igmp).sort rm.match_src_proto = array - # Protocol order not maintained in running config starting Greensboro. - # Sorting arrays to check equality. - assert_equal(array.sort, rm.match_src_proto.sort) + assert_equal(array, rm.match_src_proto) rm.match_src_proto = rm.default_match_src_proto assert_equal(rm.default_match_src_proto, rm.match_src_proto) end