Skip to content

Commit

Permalink
fixing testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 7, 2020
1 parent 66e25da commit f96e2cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion library/general/src/lib/cfa/sysctl_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def conflict?(only: [], show_information: true)
textdomain "base"
return false if yast_config_file.empty?

conflicting_attrs = Sysctl::ATTRIBUTES.keys & only
conflicting_attrs = Sysctl::ATTRIBUTES.keys
conflicting_attrs &= only unless only.empty?
conflicts = {}
higher_precedence_files.each do |file|
# Checking all "higher" files if their values overrule the current
Expand Down
17 changes: 9 additions & 8 deletions library/general/test/cfa/sysctl_config_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,21 +196,22 @@
end
end
end
# context "when some main file value is overriden" do
# let(:tcp_syncookies) { false }
#
# it "returns true" do
# expect(config.conflict?).to eq(true)
# end
# end

context "when some main file value is overriden" do
let(:tcp_syncookies) { false }

it "returns true" do
expect(config.conflict?).to eq(true)
end
end

context "when no value is overriden" do
let(:tcp_syncookies) { true }

it "returns false" do
expect(config.conflict?).to be(false)
end
end

end
end
end

0 comments on commit f96e2cd

Please sign in to comment.