-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#9272) Refactor puppet-lvm (auto)testing
Testing needed refactoring due to recent merges and tests and autotesting was written for rspec 1.29. This has been refreshed for rspec 2 and autotest. There is still a little tweaking to do to get autotest runnning out of the box. Added .rspec and .autotest files while removing the autotesti directory as it was needed for previous autotest. Current autotest uses .autotest for simple configurations. Signed-off-by: Matthaus Litteken <matthaus@puppetlabs.com>
- Loading branch information
Showing
11 changed files
with
87 additions
and
154 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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Autotest.add_hook :initialize do |at| | ||
at.clear_mappings | ||
# watch out: Ruby bug (1.8.6): | ||
# %r(/) != /\// | ||
at.add_mapping(%r%^spec/.*\.rb$%) { |filename, _| | ||
filename | ||
} | ||
|
||
at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m| | ||
["spec/#{m[1]}_spec.rb"] | ||
} | ||
|
||
at.add_mapping(%r%^spec/(spec_helper|shared/.*)\.rb$%) { | ||
at.files_matching %r{^spec/.*_spec\.rb$} | ||
} | ||
# the libraries under lib/puppet | ||
|
||
at.add_mapping(%r%^lib/(.*)\.rb$%) { |filename, m| | ||
at.files_matching %r!spec/(unit|integration)/#{m[1]}.rb! | ||
} | ||
|
||
# the actual spec files themselves | ||
at.add_mapping(%r%^spec/(unit|integration)/.*\.rb$%) { |filename, _| | ||
filename | ||
} | ||
|
||
# force a complete re-run for all of these: | ||
|
||
# main puppet lib | ||
at.add_mapping(%r!^lib/puppet\.rb$!) { |filename, _| | ||
at.files_matching %r!spec/(unit|integration)/.*\.rb! | ||
} | ||
|
||
# the spec_helper | ||
at.add_mapping(%r!^spec/spec_helper\.rb$!) { |filename, _| | ||
at.files_matching %r!spec/(unit|integration)/.*\.rb! | ||
} | ||
|
||
# the puppet test libraries | ||
at.add_mapping(%r!^test/lib/puppettest/.*!) { |filename, _| | ||
at.files_matching %r!spec/(unit|integration)/.*\.rb! | ||
} | ||
|
||
# the puppet spec libraries | ||
at.add_mapping(%r!^spec/lib/spec.*!) { |filename, _| | ||
at.files_matching %r!spec/(unit|integration)/.*\.rb! | ||
} | ||
|
||
# the monkey patches for rspec | ||
at.add_mapping(%r!^spec/lib/monkey_patches/.*!) { |filename, _| | ||
at.files_matching %r!spec/(unit|integration)/.*\.rb! | ||
} | ||
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,4 @@ | ||
--format | ||
s | ||
|
||
--color |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
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