Skip to content

Commit

Permalink
Merge 0e4808d into 64ff8b5
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 25, 2020
2 parents 64ff8b5 + 0e4808d commit 7beed48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 1 addition & 2 deletions library/general/src/lib/cfa/sysctl.rb
Expand Up @@ -52,7 +52,6 @@ class Sysctl < BaseModel

Yast.import "Stage"

PARSER = AugeasParser.new("sysctl.lns")
PATH = "/etc/sysctl.d/70-yast.conf".freeze

class << self
Expand Down Expand Up @@ -116,7 +115,7 @@ def boolean_attr(*attrs)
boolean_attr(*BOOLEAN_ATTRIBUTES)

def initialize(file_handler: Yast::TargetFile, file_path: PATH)
super(PARSER, file_path, file_handler: file_handler)
super(AugeasParser.new("sysctl.lns"), file_path, file_handler: file_handler)
end

def empty?
Expand Down
7 changes: 7 additions & 0 deletions library/general/test/cfa/sysctl_test.rb
Expand Up @@ -44,6 +44,13 @@
sysctl.load
end

describe "#initialize" do
it "creates an own Augeas instance" do
expect(::CFA::AugeasParser).to receive(:new).with("sysctl.lns").and_call_original
CFA::Sysctl.new(file_handler: file_handler)
end
end

describe "#raw_forward_ipv4" do
it "returns IPv4 forwarding raw value" do
expect(sysctl.raw_forward_ipv4).to eq("1")
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Feb 24 15:02:15 CET 2020 - schubi@suse.de

- Creating an own Augeas instance for each parsed sysctl file
(bsc#1151649).
- 4.2.67

-------------------------------------------------------------------
Mon Feb 17 17:59:07 UTC 2020 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 4.2.66
Version: 4.2.67
Release: 0
Summary: YaST2 Main Package
License: GPL-2.0-only
Expand Down

0 comments on commit 7beed48

Please sign in to comment.