-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
12 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,12 +1,10 @@ | ||
# The baseline for module testing used by Puppet Labs is that each manifest | ||
# should have a corresponding test manifest that declares that class or defined | ||
# type. | ||
# | ||
# Tests are then run by using puppet apply --noop (to check for compilation | ||
# errors and view a log of events) or by fully applying the test in a virtual | ||
# environment (to compare the resulting system state to the desired state). | ||
# | ||
# Learn more about module testing here: | ||
# http://docs.puppetlabs.com/guides/tests_smoke.html | ||
# | ||
include ::eyaml_tools | ||
# For these tests to work, a valid hiera.yaml will need to be set up with hiera-eyaml, | ||
# and you'll also need both private and public keys. You can set hiera_config to | ||
# spec/fixtures/hiera.yaml. | ||
|
||
$encrypted = eyaml_tools::encrypt('foo') | ||
$decrypted = eyaml_tools::decrypt($encrypted) | ||
|
||
if ($decrypted != 'foo') { | ||
fail("Decrypted data should have been 'foo' but instead it was '$decrypted'!") | ||
} |