Skip to content

Commit

Permalink
Fixes #33430 - do not error on pulpcore with 1 worker
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill committed Sep 7, 2021
1 parent 0eda431 commit 770894c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
5 changes: 1 addition & 4 deletions app/models/katello/ping.rb
Expand Up @@ -195,10 +195,7 @@ def pulp3_without_auth(url)
end

workers = json["online_workers"] || []

unless workers.count > 1
fail _("Not all necessary pulp workers running at %s.") % url
end
fail _("Not all necessary pulp workers running at %s.") % url if workers.empty?

json
end
Expand Down
9 changes: 1 addition & 8 deletions test/models/ping_test.rb
Expand Up @@ -230,17 +230,10 @@ def test_failure_on_all_workers_empty
}, /Not all necessary pulp workers running/)
end

def test_failure_on_no_resource_manager
run_exception_test({ "database_connection" => {"connected" => true},
"redis_connection" => {"connected" => true},
"online_workers" => [{"name" => "reserved_resource_worker-1"}]
}, /Not all necessary pulp workers running/)
end

def test_failure_on_no_reserved_resource_worker
run_exception_test({ "database_connection" => {"connected" => true},
"redis_connection" => {"connected" => true},
"online_workers" => [{"name" => "resource_manager"}]
"online_workers" => []
}, /Not all necessary pulp workers running/)
end

Expand Down

0 comments on commit 770894c

Please sign in to comment.