Skip to content

Commit

Permalink
fixed testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed May 29, 2020
1 parent adc97b1 commit 4ea6567
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/lib/y2firewall/clients/auto_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
require_relative "../../../test_helper"
require "y2firewall/dialogs/main"
require "y2firewall/clients/auto"
require "installation/autoinst_issues"

describe Y2Firewall::Clients::Auto do
let(:firewalld) { Y2Firewall::Firewalld.instance }
Expand Down Expand Up @@ -171,6 +172,14 @@
end

context "once the current configuration has been set" do

let(:fw_section) { Y2Firewall::AutoinstProfile::FirewallSection.new }

before do
allow(Y2Firewall::AutoinstProfile::FirewallSection).to receive(:new_from_hashes)
.and_return(fw_section)
end

it "imports the given profile" do
expect(autoyast).to receive(:import).with(arguments)

Expand All @@ -192,7 +201,7 @@
{ "interfaces" => ["eth0", "eth0"], "name" => "trusted" }])
expect(i_list).to receive(:add)
.with(::Installation::AutoinstIssues::InvalidValue,
"firewall", "interfaces",
fw_section, "interfaces",
"eth0",
"This interface has been defined for more than one zone.")
subject.import(arguments, false)
Expand Down

0 comments on commit 4ea6567

Please sign in to comment.