Skip to content

Commit

Permalink
Adapted to the new API of Y2Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Jun 25, 2021
1 parent 1a95261 commit 6f9d1d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 4 additions & 4 deletions package/yast2-network.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ BuildRequires: yast2-devtools >= 3.1.15
#for install task
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
BuildRequires: yast2-storage-ng
# Yast::Equatable
BuildRequires: yast2 >= 4.4.7
# Updated API for Y2Issues
BuildRequires: yast2 >= 4.4.14

BuildRequires: yast2-packager >= 4.0.18
# Product control need xml agent
Expand All @@ -49,8 +49,8 @@ PreReq: /bin/rm
Requires: sysconfig >= 0.80.0
Requires: yast2-proxy
Requires: yast2-storage-ng
# Yast::Equatable
Requires: yast2 >= 4.4.7
# Updated API for Y2Issues
Requires: yast2 >= 4.4.14
# Packages::vnc_packages
Requires: yast2-packager >= 4.0.18
Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Lan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ def yast_config
def read_config(report: true)
result = Y2Network::Config.from(:wicked)
if result.issues? && report
return false unless Y2Issues.report(result.issues) == :yes
return false unless Y2Issues.report(result.issues)
end

system_config = result.config
Expand Down
14 changes: 3 additions & 11 deletions test/lan_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -556,23 +556,15 @@
end

context "when the user asks to continue" do
let(:user_answer) { :yes }
let(:user_answer) { true }

it "returns true" do
expect(subject.read_config).to eq(true)
end
end

context "when the user asks to not continue" do
let(:user_answer) { :no }

it "returns false" do
expect(subject.read_config).to eq(false)
end
end

context "when the user asks to abort" do
let(:user_answer) { :abort }
context "when the user does not want to continue" do
let(:user_answer) { false }

it "returns false" do
expect(subject.read_config).to eq(false)
Expand Down

0 comments on commit 6f9d1d2

Please sign in to comment.