diff options
author | Josh Cooper <josh@puppet.com> | 2018-07-09 23:26:12 -0700 |
---|---|---|
committer | Josh Cooper <josh@puppet.com> | 2018-07-10 11:03:14 -0700 |
commit | a080a3d68662c0d19ece9e0b7019d8820ed79842 (patch) | |
tree | a5fafc2b660849593166c2add4b6970bd933ba6a /spec/acceptance/tests/create_aliases_spec.rb | |
parent | b8240868f897bf74262d59c85320833bb1854edb (diff) | |
download | puppet-hosts_core-a080a3d68662c0d19ece9e0b7019d8820ed79842.tar.gz puppet-hosts_core-a080a3d68662c0d19ece9e0b7019d8820ed79842.tar.bz2 |
Convert create based tests to rspec
Consolidate tests relating to creating host entries.
Diffstat (limited to 'spec/acceptance/tests/create_aliases_spec.rb')
-rw-r--r-- | spec/acceptance/tests/create_aliases_spec.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/acceptance/tests/create_aliases_spec.rb b/spec/acceptance/tests/create_aliases_spec.rb deleted file mode 100644 index a76263a..0000000 --- a/spec/acceptance/tests/create_aliases_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -test_name 'host should create aliases' - -tag 'audit:low', - 'audit:refactor', # Use block style `test_name` - 'audit:acceptance' # Could be done at the integration (or unit) layer though -# actual changing of resources could irreparably damage a -# host running this, or require special permissions. - -agents.each do |agent| - target = agent.tmpfile('host-create-aliases') - - step 'clean up the system for testing' - on agent, "rm -f #{target}" - - step 'create the record' - on(agent, puppet_resource('host', 'test', 'ensure=present', - 'ip=127.0.0.7', "target=#{target}", 'host_aliases=alias')) - - step 'verify that the aliases were added' - on(agent, "cat #{target} ; rm -f #{target}") do - fail_test 'alias was missing' unless - stdout =~ %r{^127\.0\.0\.7[[:space:]]+test[[:space:]]alias} - end -end |