Skip to content

Commit

Permalink
Small polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Aug 13, 2020
1 parent a4abf48 commit 8cbe94c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/autoinstall/autosetup_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def need_second_stage_run?
# ssh / vnc port can be blocked.
remote_installer = Yast::Linuxrc.usessh || Yast::Linuxrc.vnc
second_stage_required = profile.dig("general", "mode", "second_stage")
firewall_enabled = profile["firewall"].fetch("enable_firewall", false)
firewall_enabled = profile.dig("firewall", "enable_firewall")

remote_installer && second_stage_required && firewall_enabled
end
Expand Down
4 changes: 2 additions & 2 deletions test/lib/autosetup_helpers_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ class DummyClient < Yast::Client
end

describe "#autosetup_firewall" do
let(:profile) { firewall_section }
let(:firewall_section) { { "firewall" => { "default_zone" => "external" } } }
let(:profile) { { "firewall" => firewall_section } }
let(:firewall_section) { { "default_zone" => "external" } }

before(:each) do
Yast::Profile.current = profile
Expand Down

0 comments on commit 8cbe94c

Please sign in to comment.