Skip to content

Commit

Permalink
Fixes for testsuite - appended several testsuites into Makefile.am
Browse files Browse the repository at this point in the history
cherry picked from 44c2df6
Picked just the fix to make firewall_stage1_proposal_test work

Conflicts
	test/Makefile.am
  • Loading branch information
mchf authored and mvidner committed Jul 2, 2015
1 parent 47fe4d8 commit 9b8e7a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/clients/firewall_stage1_proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def main
# Don't override users settings
SuSEFirewall4Network.prepare_proposal unless SuSEFirewallProposal.GetChangedByUser

adjust_configuration
# this method is not easily mockable in rspec and currently is out of scope
# for testing in firewall_stage1_proposal_test.rb
adjust_configuration if !Mode.test

script_return = {
"preformatted_proposal" => preformatted_proposal,
Expand Down
7 changes: 7 additions & 0 deletions test/firewall_stage1_proposal_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ module Yast
# Ensure a fixed proposal
SuSEFirewallProposal.SetChangedByUser(true)
SuSEFirewall4Network.SetSshEnabled1stStage(true)

allow(SuSEFirewallServices)
.to receive(:all_services)
.and_return(SuSEFirewall4NetworkClass::SSH_SERVICES.zip([]).to_h)
allow(Mode)
.to receive(:test)
.and_return(true)
end

let(:proposal) do
Expand Down

0 comments on commit 9b8e7a8

Please sign in to comment.