Skip to content

Commit

Permalink
Changes default return value for cluster.batch_connect_ssh_allow? (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant authored Nov 28, 2023
1 parent 8d32bb4 commit 6504b5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 6504b5f

Please sign in to comment.