Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20072 from jrafanie/eager-load-api-collection-cla…
…sses-in-web-service-worker Eager load collection constants to avoid constant loading problems. (cherry picked from commit 747ab52) https://bugzilla.redhat.com/show_bug.cgi?id=1823849
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
RSpec.describe MiqWebServiceWorker do | ||
it "preload_for_worker_role autoloads api collection classes and descendants" do | ||
allow(EvmDatabase).to receive(:seeded_primordially?).and_return(true) | ||
expect(MiqWebServiceWorker).to receive(:configure_secret_token) | ||
MiqWebServiceWorker.preload_for_worker_role | ||
expect(defined?(ServiceAnsibleTower)).to be_truthy | ||
end | ||
end |