Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cisco_node_utils/route_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions tests/test_route_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down