Skip to content

Commit

Permalink
Merge pull request #1240 from ancorgs/non_fatal
Browse files Browse the repository at this point in the history
Adapted to the new API of Y2Issues
  • Loading branch information
ancorgs committed Jun 25, 2021
2 parents 1a95261 + b44336a commit 8f04391
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
7 changes: 7 additions & 0 deletions package/yast2-network.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Jun 25 08:07:09 UTC 2021 - Ancor Gonzalez Sosa <ancor@suse.com>

- Adapted to the new API of Y2Issues (related to jsc#PM-2620 and
bsc#1166743)
- 4.4.19

-------------------------------------------------------------------
Thu Jun 17 16:20:44 UTC 2021 - Knut Anderssen <kanderssen@suse.com>

Expand Down
10 changes: 5 additions & 5 deletions package/yast2-network.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-network
Version: 4.4.18
Version: 4.4.19
Release: 0
Summary: YaST2 - Network Configuration
License: GPL-2.0-only
Expand All @@ -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 8f04391

Please sign in to comment.