Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log less details about the targets #16405

Merged
merged 1 commit into from
Nov 7, 2017
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
6 changes: 3 additions & 3 deletions app/models/manager_refresh/target_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ def add_target(association:, manager_ref:, manager: nil, manager_id: nil, event_
:options => options)
end

# @return [String] A String containing a name of each target in the TargetCollection
# @return [String] A String containing a summary
def name
"Collection of targets with name: #{targets.collect(&:name)}"
"Collection of #{targets.size} targets"
end

# @return [String] A String containing an id of each target in the TargetCollection
def id
"Collection of targets with id: #{targets.collect(&:id)}"
"Collection of targets with id: #{targets.collect(&:manager_ref)}"
end

# Returns targets in a format:
Expand Down
3 changes: 2 additions & 1 deletion spec/models/manager_refresh/target_collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
:options => {:opt1 => "opt1", :opt2 => "opt2"}
)

expect(target_collection.name).to eq "Collection of targets with name: [{:ems_ref=>\"vm_1\"}, {:ems_ref=>\"vm_2\"}]"
expect(target_collection.name).to eq "Collection of 2 targets"
expect(target_collection.id).to eq "Collection of targets with id: [{:ems_ref=>\"vm_1\"}, {:ems_ref=>\"vm_2\"}]"
end
end

Expand Down