Skip to content

Commit

Permalink
Update logic to find desired ds
Browse files Browse the repository at this point in the history
  • Loading branch information
karanthukral committed Jul 24, 2017
1 parent 437adaa commit 249367c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/helpers/fixture_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ def assert_daemon_set_present(name)
found = false
labels = "name=#{name},app=#{app_name}"
daemon_sets = v1beta1_kubeclient.get_daemon_sets(namespace: namespace, label_selector: labels)
daemon_sets.each do |ds|
found = true if ds.metadata.name == name
end
assert found, "Daemon set #{name} does not exist"
desired = daemon_sets.find { |ds| ds.metadata.name == name }
assert desired.present?, "Daemon set #{name} does not exist"
end

def assert_annotated(obj, annotation)
Expand Down

0 comments on commit 249367c

Please sign in to comment.