fmw_extract_spec.rb 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. require 'spec_helper'
  2. describe 'fmw_inst::internal::fmw_extract', :type => :define do
  3. describe "soa_suite 11g" do
  4. let(:params){{:source_file => '/software/ofm_soa_generic_11.1.1.7.0_disk1_1of2.zip',
  5. :source_2_file => '/software/ofm_soa_generic_11.1.1.7.0_disk1_2of2.zip',
  6. :create_file_check => '/tmp/soa_suite/Disk1',
  7. :create_2_file_check => '/tmp/soa_suite/Disk4',
  8. :os_user => 'oracle',
  9. :os_group => 'oinstall',
  10. :tmp_dir => '/tmp',
  11. }}
  12. let(:title) {'soa_suite'}
  13. let(:facts) {{ :kernel => 'Linux',
  14. :operatingsystem => 'CentOS',
  15. :osfamily => 'RedHat' }}
  16. it { should contain_package('unzip').with_ensure('present') }
  17. it {
  18. should contain_exec('extract soa_suite file 1').with(
  19. command: 'unzip -o /software/ofm_soa_generic_11.1.1.7.0_disk1_1of2.zip -d /tmp/soa_suite',
  20. creates: '/tmp/soa_suite/Disk1',
  21. user: 'oracle',
  22. group: 'oinstall',
  23. cwd: '/tmp',
  24. ).that_requires('Package[unzip]')
  25. }
  26. it {
  27. should contain_exec('extract soa_suite file 2').with(
  28. command: 'unzip -o /software/ofm_soa_generic_11.1.1.7.0_disk1_2of2.zip -d /tmp/soa_suite',
  29. creates: '/tmp/soa_suite/Disk4',
  30. user: 'oracle',
  31. group: 'oinstall',
  32. cwd: '/tmp',
  33. ).that_requires('Exec[extract soa_suite file 1]')
  34. }
  35. end
  36. describe "soa_suite 12c" do
  37. let(:params){{:source_file => '/software/fmw_12.1.3.0.0_soa_Disk1_1of1.zip',
  38. :create_file_check => '/tmp/soa_suite/fmw_12.1.3.0.0_soa.jar',
  39. :os_user => 'oracle',
  40. :os_group => 'oinstall',
  41. :tmp_dir => '/tmp',
  42. }}
  43. let(:title) {'soa_suite'}
  44. let(:facts) {{ :kernel => 'Linux',
  45. :operatingsystem => 'CentOS',
  46. :osfamily => 'RedHat' }}
  47. it { should contain_package('unzip').with_ensure('present') }
  48. it {
  49. should contain_exec('extract soa_suite file 1').with(
  50. command: 'unzip -o /software/fmw_12.1.3.0.0_soa_Disk1_1of1.zip -d /tmp/soa_suite',
  51. creates: '/tmp/soa_suite/fmw_12.1.3.0.0_soa.jar',
  52. user: 'oracle',
  53. group: 'oinstall',
  54. cwd: '/tmp',
  55. ).that_requires('Package[unzip]')
  56. }
  57. end
  58. end