Skip to content

Commit

Permalink
Smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
halfninja committed Sep 1, 2016
1 parent 2327c2b commit e3e0e8b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions tests/init.pp
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'!")
}

0 comments on commit e3e0e8b

Please sign in to comment.