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

Changes default return value for cluster.batch_connect_ssh_allow? #818

Merged
merged 1 commit into from
Nov 28, 2023
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
4 changes: 2 additions & 2 deletions lib/ood_core/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,9 @@ def allow?
# @return [Boolean, nil] whether cluster supports SSH to batch connect node
def batch_connect_ssh_allow?
return @batch_connect_ssh_allow if defined?(@batch_connect_ssh_allow)
return @batch_connect_ssh_allow = nil if batch_connect_config.nil?
return @batch_connect_ssh_allow = true if batch_connect_config.nil?

@batch_connect_ssh_allow = batch_connect_config.fetch(:ssh_allow, nil)
@batch_connect_ssh_allow = batch_connect_config.fetch(:ssh_allow, true)
end

# The comparison operator
Expand Down
2 changes: 1 addition & 1 deletion spec/cluster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
end

it 'has default for batch_connect_ssh_allow?' do
expect(owens.batch_connect_ssh_allow?).to be_nil
expect(owens.batch_connect_ssh_allow?).to be true
end

it 'can enable batch_connect_ssh_allow?' do
Expand Down
Loading