spec_helper_acceptance.rb 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. require 'beaker-rspec/spec_helper'
  2. require 'beaker-rspec/helpers/serverspec'
  3. hosts.each do |host|
  4. # Install Puppet
  5. install_puppet
  6. end
  7. RSpec.configure do |c|
  8. # Project root
  9. proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
  10. # Readable test descriptions
  11. c.formatter = :documentation
  12. # Configure all nodes in nodeset
  13. c.before :suite do
  14. # Install module and dependencies
  15. puppet_module_install(:source => proj_root, :module_name => 'oracle')
  16. oracle_base_install = <<-EOS
  17. puppetDownloadMntPoint = "puppet:///modules/oradb/"
  18. oradb::installdb{ '12.1.0.1_Linux-x86-64':
  19. version => '12.1.0.1',
  20. file => 'linuxamd64_12c_database',
  21. databaseType => 'EE',
  22. oracleBase => '/oracle',
  23. oracleHome => '/oracle/product/12.1/db',
  24. createUser => true,
  25. user => 'oracle',
  26. group => 'dba',
  27. downloadDir => '/data/install',
  28. zipExtract => true,
  29. puppetDownloadMntPoint => $puppetDownloadMntPoint,
  30. }
  31. EOS
  32. apply_manifest(pp,:catch_failures => true)
  33. hosts.each do |host|
  34. on host, puppet('module', 'install', 'puppetlabs/stdlib'), { :acceptable_exit_codes => [0,1] }
  35. on host, puppet('module', 'install', 'biemond/oradb'), { :acceptable_exit_codes => [0,1] }
  36. on host, puppet('module', 'install', 'hajee/easy_type'), { :acceptable_exit_codes => [0,1] }
  37. end
  38. end
  39. end