-
Notifications
You must be signed in to change notification settings - Fork 897
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
Set default server roles from env #15470
Merged
jrafanie
merged 5 commits into
ManageIQ:master
from
bdunne:set_default_server_roles_from_env
Jun 29, 2017
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
eeabe1e
Ensure the default roles are set for a server
bdunne cb805e3
Rename set_assigned_roles to sync_assigned_roles
bdunne 164bfc4
Delete a bunch of unnecessary allows
bdunne a3e5404
Save default roles to server settings so they are accurate in the UI
bdunne 6e84d92
Change ENV variable to MIQ_SERVER_DEFAULT_ROLES to avoid conflict
bdunne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -51,17 +51,10 @@ | |
|
||
context "'smartproxy' server and roles deactivated" do | ||
before(:each) do | ||
# Overwrite so that we set our own assigned roles instead of from config file | ||
allow_any_instance_of(MiqServer).to receive(:set_assigned_roles).and_return(nil) | ||
allow_any_instance_of(MiqServer).to receive(:sync_workers).and_return(nil) | ||
allow_any_instance_of(MiqServer).to receive(:sync_log_level).and_return(nil) | ||
allow_any_instance_of(MiqServer).to receive(:wait_for_started_workers).and_return(nil) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✂️ 🔥 |
||
|
||
server_roles = [FactoryGirl.create(:server_role, :name => "smartproxy", :max_concurrent => 0)] | ||
|
||
@server1.deactivate_all_roles | ||
@server1.role = 'smartproxy' | ||
allow_any_instance_of(Host).to receive_messages(:missing_credentials? => false) | ||
@server1.role = 'smartproxy' | ||
end | ||
|
||
it "will have no roles active" do | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should environment variable names be prefixed with
MIQ_
orMANAGEIQ_
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not too concerned about the variable name since I hope it will be short lived, but I namespaced it to avoid conflict.