Skip to content

Commit

Permalink
(choria-io#102) drop duplicate discovered names
Browse files Browse the repository at this point in the history
  • Loading branch information
ripienaar committed Dec 26, 2016
1 parent 91d7f11 commit 078a8f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mcollective/util/playbook/nodes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def prepare
def resolve_nodes(node_set)
node_props = @nodes[node_set]
node_props[:resolver].prepare
node_props[:discovered] = node_props[:resolver].discover
node_props[:discovered] = node_props[:resolver].discover.uniq
end

# Checks if the agents on the nodes matches the desired versions
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/mcollective/util/playbook/nodes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Playbook
seq = sequence(:nodes)
resolver = nodes.nodes["load_balancers"][:resolver]
resolver.expects(:prepare).in_sequence(seq)
resolver.expects(:discover).in_sequence(seq).returns(["rspec1", "rspec2"])
resolver.expects(:discover).in_sequence(seq).returns(["rspec1", "rspec2", "rspec1"])

nodes.resolve_nodes("load_balancers")

Expand Down

0 comments on commit 078a8f8

Please sign in to comment.