From 4ea6567c43d146d00b4d297295382336dfdb882e Mon Sep 17 00:00:00 2001 From: Stefan Schubert Date: Fri, 29 May 2020 09:17:37 +0200 Subject: [PATCH] fixed testcase --- test/lib/y2firewall/clients/auto_test.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/lib/y2firewall/clients/auto_test.rb b/test/lib/y2firewall/clients/auto_test.rb index a5f16838..ecad7a36 100755 --- a/test/lib/y2firewall/clients/auto_test.rb +++ b/test/lib/y2firewall/clients/auto_test.rb @@ -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 } @@ -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) @@ -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)