Skip to content

Commit

Permalink
Fix Y2ModuleConfig test
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Nov 17, 2016
1 parent 7025984 commit 84ceaeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/Y2ModuleConfig_test.rb
Expand Up @@ -32,20 +32,20 @@
allow(Yast::WFM).to receive(:ClientExists).with("partitioning_auto").and_return(false)
allow(Yast::WFM).to receive(:ClientExists).with("upgrade_auto").and_return(false)
allow(Yast::WFM).to receive(:ClientExists).with("cobbler_auto").and_return(false)
allow(Yast::WFM).to receive(:ClientExists).with("services-manager_auto").and_return(true)
end

describe "#unhandled_profile_sections" do
let(:profile_unhandled) { File.join(FIXTURES_PATH, 'profiles', 'unhandled_and_obsolete.xml') }

it "returns all unsupported and unknown profile sections" do
Yast::Profile.ReadXML(profile_unhandled)
Yast::Y2ModuleConfig.instance_variable_set("@ModuleMap", DESKTOP_DATA)
Yast::Profile.ReadXML(profile_unhandled)

expect(Yast::Y2ModuleConfig.unhandled_profile_sections.sort).to eq(
[
"audit-laf", "autofs", "ca_mgm", "cobbler", "firstboot", "language", "restore",
"runlevel", "sshd", "sysconfig", "unknown_profile_item_1",
"unknown_profile_item_2"
"sshd", "sysconfig", "unknown_profile_item_1", "unknown_profile_item_2"
].sort
)
end
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/desktop_files/desktops.yml
Expand Up @@ -66,3 +66,8 @@ security:
GenericName: Configure secure defaults
X-SuSE-YaST-AutoInst: all
X-SuSE-YaST-AutoInstClient: security_auto
services-manager:
X-SuSE-YaST-Group: System
X-SuSE-YaST-AutoInst: all
X-SuSE-YaST-AutoInstClonable: true
X-SuSE-YaST-AutoInstResourceAliases: runlevel

0 comments on commit 84ceaeb

Please sign in to comment.