-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from glennsarti/fix-tests
(MODULES-2957) Fix registry_value tests
- Loading branch information
Showing
7 changed files
with
124 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
fixtures: | ||
symlinks: | ||
registry: "#{source_dir}" | ||
mixed_default_settings: "#{source_dir}/spec/fixtures/mixed_default_settings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require 'spec_helper' | ||
|
||
# The manifest used for testing, is located in spec/fixtures/mixed_default_settings/manifests/init.pp | ||
|
||
# This test is to ensure that the way of setting default values (trailing slash) compiles correctly | ||
# when there is a similar looking path in the manifest. It mixes default and non-default value_names in the same manifest | ||
# | ||
# This manifest attempts to manage two registry values | ||
# | ||
# + HKLM | ||
# + Software | ||
# - foo <-- This is a value called 'foo' in the 'HKLM\Sofware' key. | ||
# | This is the 'hklm\Software\foo' resource | ||
# | | ||
# + foo | ||
# + (default value) <-- This is the default value for a key called 'HKLM\Software\foo'. | ||
# This is the 'hklm\Software\foo\\' resource | ||
# | ||
|
||
describe 'mixed_default_settings' do | ||
it { is_expected.to compile } | ||
|
||
it { is_expected.to contain_registry_value('hklm\Software\foo\\') } | ||
it { is_expected.to contain_registry_value('hklm\Software\foo') } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class mixed_default_settings { | ||
registry_value { 'hklm\Software\foo\\': | ||
ensure => present, | ||
type => string, | ||
data => 'default', | ||
} | ||
|
||
registry_value { 'hklm\Software\foo': | ||
ensure => present, | ||
type => string, | ||
data => 'nondefault', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters