beaker 2.21.0 → 2.22.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2I5OGQ5MGE4YzNkOTJjZWEyYTdkNGY0NjA3ZDJkNmExNmYwMjNjYQ==
4
+ NzA4NmIzODhiN2FkMWIyM2RjZDE1YzAxMWE3ZDc1NGFhODBlMDRhOA==
5
5
  data.tar.gz: !binary |-
6
- ODFkYTk5MzgxNzc3MjZjMWNhMjA3NjBjYjhjYjhmNjQxYzNjZDZjNw==
6
+ ODdjMmNhYTUwZmI2Yjc1ZjhlM2IxMjM1NGRkMjRiODNlMzMwYmM0ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGM5NDBkMTA3MDAxMWJjMTI1NWQyOTlhOWUzYjUyNDhhMGM0N2QyMjdlZjAw
10
- MGM0MDMxY2M1MDkxNmE4ZWM4YTY5MGNmYjJkMDljNjJjMjM3MzhiNjMwYzBj
11
- YjYxZDNkY2VlNmUwN2IyYzA1YTk4ZTZjYWUzOWNlMTlkMzIwM2E=
9
+ NDM5ZTdkNWI4N2M3Y2NjZTk1NTMyNmNlMWE1MGRhMjUxMjg0YjMyMzM4ZWRi
10
+ M2M4ZTM5YTdiNmY4ZDhlOTJkMDBjMjZhMzAzOGY3ODhjMjgxM2FhODU4ZTJi
11
+ YTJiNWQ2YjJmMTM5OGUwZDYzOWRiNzFmYmQ2MGU3NmIyZDVkMjk=
12
12
  data.tar.gz: !binary |-
13
- Y2E5YTZiZGVhMjdmYmEwZmE4OTYxM2EyMzU3NzY0MzRiZTc4NzFkYTJiMDU1
14
- YzlkZjRjYTZhNGZlMDI3YmRiNWYzZDk2YzdiNWY2NzZiYTQyNjY4YzM3OTdk
15
- NTc5ODM2Yzg1ZjVmNGM0MmFjZjFiMjBhYWM4NWUzZDEyN2RkZWQ=
13
+ M2U0YjRiMjYyZjczYzVhODA0NzE1MzkxODU4NTM0ODkzOWZhYjE4YzRmMTUy
14
+ MjQyNzAzNTNiM2VmYTVlYjE0MDg2OGMyMDU5MjE1N2UwM2Y4NjFiYTZlYWNh
15
+ MmQwMTRjMDkyMTYzZjZiODA1ZGU1YzQwMTFlZWViYjE0MjIxOGQ=
data/HISTORY.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 26 Aug, 2015 (a6ef010f)](#LATEST)
3
+ * [LATEST - 1 Sep, 2015 (e693a4e7)](#LATEST)
4
+ * [2.21.0 - 26 Aug, 2015 (40281eb2)](#2.21.0)
4
5
  * [2.20.0 - 17 Aug, 2015 (8a419e98)](#2.20.0)
5
6
  * [2.19.0 - 13 Aug, 2015 (80897129)](#2.19.0)
6
7
  * [2.18.3 - 28 Jul, 2015 (d9a02474)](#2.18.3)
@@ -93,7 +94,88 @@
93
94
  * [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
94
95
 
95
96
  ## Details
96
- ### <a name = "LATEST">LATEST - 26 Aug, 2015 (a6ef010f)
97
+ ### <a name = "LATEST">LATEST - 1 Sep, 2015 (e693a4e7)
98
+
99
+ * (GEM) update beaker version to 2.22.0 (e693a4e7)
100
+
101
+ * Merge pull request #935 from MikaelSmith/feat/master/BKR-470 (9a96c210)
102
+
103
+
104
+ ```
105
+ Merge pull request #935 from MikaelSmith/feat/master/BKR-470
106
+
107
+ (BKR-470) Add Solaris to install_puppet_agent_dev_repo_on
108
+ ```
109
+ * Merge pull request #938 from anodelman/none-hypervisor (c5ae989f)
110
+
111
+
112
+ ```
113
+ Merge pull request #938 from anodelman/none-hypervisor
114
+
115
+ (BKR-458) add beaker notouch hypervisor
116
+ ```
117
+ * Merge pull request #934 from anodelman/puppet-agent (8a495267)
118
+
119
+
120
+ ```
121
+ Merge pull request #934 from anodelman/puppet-agent
122
+
123
+ (BKR-459) update osx package name and directory to correspond...
124
+ ```
125
+ * (BKR-458) add beaker notouch hypervisor (f31ba283)
126
+
127
+
128
+ ```
129
+ (BKR-458) add beaker notouch hypervisor
130
+
131
+ - support for a 'noop' hypervisor that does no
132
+ configuration/validation/provision/cleanup/proxy-ing
133
+ ```
134
+ * (maint) Add spec test for install_puppet_agent_dev_repo_on (0a6eb377)
135
+
136
+ * (BKR-472) Add Solaris 11 support for installing puppet-agent (6960c09b)
137
+
138
+
139
+ ```
140
+ (BKR-472) Add Solaris 11 support for installing puppet-agent
141
+
142
+ Solaris 11 re-uses most of the setup for Solaris 10, but the root user's
143
+ home directory on Solaris 10 is special. Fix up the configuration to
144
+ special-case Solaris 10.
145
+ ```
146
+ * (BKR-470) Add Solaris to install_puppet_agent_dev_repo_on (265f6ec3)
147
+
148
+
149
+ ```
150
+ (BKR-470) Add Solaris to install_puppet_agent_dev_repo_on
151
+
152
+ Adds Solaris support for installing packages in the
153
+ install_puppet_agent_dev_repo_on helper.
154
+ ```
155
+ * (MAINT) fix ability to set external file dir through opts (65d2bbb7)
156
+
157
+
158
+ ```
159
+ (MAINT) fix ability to set external file dir through opts
160
+
161
+ - we were overriding for windows/mac hosts to a different default, so
162
+ anything passed in by the user was ignored
163
+ ```
164
+ * (BKR-459) update osx package name and directory to correspond... (db9090ef)
165
+
166
+
167
+ ```
168
+ (BKR-459) update osx package name and directory to correspond...
169
+
170
+ ... to RE changes
171
+
172
+ - updated install_puppet_agent_dev_repo_on to handle new directory
173
+ structure and name change
174
+ - backwards compatible, handles both old and new
175
+ ```
176
+ ### <a name = "2.21.0">2.21.0 - 26 Aug, 2015 (40281eb2)
177
+
178
+ * (HISTORY) update beaker history for gem release 2.21.0 (40281eb2)
97
179
 
98
180
  * (GEM) update beaker version to 2.21.0 (a6ef010f)
99
181
 
@@ -1088,12 +1088,17 @@ module Beaker
1088
1088
  if not opts[:puppet_agent_version]
1089
1089
  raise "must provide :puppet_agent_version (puppet-agent version) for install_puppet_agent_dev_repo_on"
1090
1090
  end
1091
+
1092
+ copy_base_external_defaults = Hash.new('/root').merge({
1093
+ :windows => '`cygpath -smF 35`/',
1094
+ :osx => '/var/root'
1095
+ })
1091
1096
  block_on hosts do |host|
1092
1097
  variant, version, arch, codename = host['platform'].to_array
1093
1098
  opts = FOSS_DEFAULT_DOWNLOAD_URLS.merge(opts)
1094
1099
  opts[:download_url] = "#{opts[:dev_builds_url]}/puppet-agent/#{ opts[:puppet_agent_sha] || opts[:puppet_agent_version] }/repos/"
1095
1100
  opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
1096
- opts[:copy_dir_external] ||= File.join('/', 'root')
1101
+ opts[:copy_dir_external] ||= copy_base_external_defaults[variant.to_sym]
1097
1102
  opts[:puppet_collection] ||= 'PC1'
1098
1103
  add_role(host, 'aio') #we are installing agent, so we want aio role
1099
1104
  release_path = opts[:download_url]
@@ -1114,7 +1119,6 @@ module Beaker
1114
1119
  release_file = "puppet-agent_#{opts[:puppet_agent_version]}-1#{codename}_#{arch}.deb"
1115
1120
  when /^windows$/
1116
1121
  release_path << 'windows'
1117
- onhost_copy_base = '`cygpath -smF 35`/'
1118
1122
  is_config_32 = host['ruby_arch'] == 'x86' || host['install_32'] || opts['install_32']
1119
1123
  should_install_64bit = host.is_x86_64? && !is_config_32
1120
1124
  # only install 64bit builds if
@@ -1123,10 +1127,29 @@ module Beaker
1123
1127
  arch_suffix = should_install_64bit ? '64' : '86'
1124
1128
  release_file = "puppet-agent-x#{arch_suffix}.msi"
1125
1129
  when /^osx$/
1126
- onhost_copy_base = File.join('/var', 'root')
1127
1130
  mac_pkg_name = "puppet-agent-#{opts[:puppet_agent_version]}"
1128
- release_path << "/apple/#{opts[:puppet_collection]}"
1129
- release_file = "#{mac_pkg_name}-#{variant}-#{version}-x86_64.dmg"
1131
+ version = version[0,2] + '.' + version[2,2] if (variant =~ /osx/ && !version.include?("."))
1132
+ path_chunk = ''
1133
+ # new hotness
1134
+ path_chunk = "apple/#{version}/#{opts[:puppet_collection]}/#{arch}"
1135
+ release_path << path_chunk
1136
+ release_file = "#{mac_pkg_name}-1.#{codename}.dmg"
1137
+ if not link_exists?("#{release_path}/") # oops, try the old stuff
1138
+ # the old school
1139
+ release_path.chomp!(path_chunk) #remove chunk that didn't work
1140
+ release_path << "apple/#{opts[:puppet_collection]}"
1141
+ release_file = "#{mac_pkg_name}-#{variant}-#{version}-x86_64.dmg"
1142
+ end
1143
+ when /^solaris$/
1144
+ if arch == 'x86_64'
1145
+ arch = 'i386'
1146
+ end
1147
+ if version == '10'
1148
+ # Solaris 10 uses / as the root user directory. Solaris 11 uses /root.
1149
+ onhost_copy_base = '/'
1150
+ end
1151
+ release_path << "/solaris/#{version}/#{opts[:puppet_collection]}"
1152
+ release_file = "puppet-agent-#{opts[:puppet_agent_version]}.#{arch}.pkg.gz"
1130
1153
  else
1131
1154
  raise "No repository installation step for #{variant} yet..."
1132
1155
  end
@@ -1148,6 +1171,39 @@ module Beaker
1148
1171
  install_msi_on(host, onhost_copied_file, {}, opts)
1149
1172
  when /^osx$/
1150
1173
  host.install_package("#{mac_pkg_name}*")
1174
+ when /^solaris$/
1175
+ noask = <<NOASK
1176
+ # Write the noask file to a temporary directory
1177
+ # please see man -s 4 admin for details about this file:
1178
+ # http://www.opensolarisforum.org/man/man4/admin.html
1179
+ #
1180
+ # The key thing we don't want to prompt for are conflicting files.
1181
+ # The other nocheck settings are mostly defensive to prevent prompts
1182
+ # We _do_ want to check for available free space and abort if there is
1183
+ # not enough
1184
+ mail=
1185
+ # Overwrite already installed instances
1186
+ instance=overwrite
1187
+ # Do not bother checking for partially installed packages
1188
+ partial=nocheck
1189
+ # Do not bother checking the runlevel
1190
+ runlevel=nocheck
1191
+ # Do not bother checking package dependencies (We take care of this)
1192
+ idepend=nocheck
1193
+ rdepend=nocheck
1194
+ # DO check for available free space and abort if there isn't enough
1195
+ space=quit
1196
+ # Do not check for setuid files.
1197
+ setuid=nocheck
1198
+ # Do not check if files conflict with other packages
1199
+ conflict=nocheck
1200
+ # We have no action scripts. Do not check for them.
1201
+ action=nocheck
1202
+ # Install to the default base directory.
1203
+ basedir=default
1204
+ NOASK
1205
+ create_remote_file host, File.join(onhost_copy_base, 'noask'), noask
1206
+ on host, "gunzip -c #{release_file} | pkgadd -d /dev/stdin -a noask -n all"
1151
1207
  end
1152
1208
  configure_type_defaults_on( host )
1153
1209
  end
@@ -1180,13 +1236,18 @@ module Beaker
1180
1236
  # @return nil
1181
1237
  def install_puppet_agent_pe_promoted_repo_on( hosts, opts )
1182
1238
  opts[:puppet_agent_version] ||= 'latest'
1239
+
1240
+ copy_base_external_defaults = Hash.new('/root').merge({
1241
+ :windows => '`cygpath -smF 35`/',
1242
+ :osx => '/var/root'
1243
+ })
1183
1244
  block_on hosts do |host|
1184
1245
  pe_ver = host[:pe_ver] || opts[:pe_ver] || '4.0.0-rc1'
1185
1246
  variant, version, arch, codename = host['platform'].to_array
1186
1247
  opts = FOSS_DEFAULT_DOWNLOAD_URLS.merge(opts)
1187
1248
  opts[:download_url] = "#{opts[:pe_promoted_builds_url]}/puppet-agent/#{ pe_ver }/#{ opts[:puppet_agent_version] }/repos"
1188
1249
  opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
1189
- opts[:copy_dir_external] ||= File.join('/', 'root')
1250
+ opts[:copy_dir_external] ||= copy_base_external_defaults[variant.to_sym]
1190
1251
  opts[:puppet_collection] ||= 'PC1'
1191
1252
  add_role(host, 'aio') #we are installing agent, so we want aio role
1192
1253
  release_path = opts[:download_url]
@@ -1207,7 +1268,6 @@ module Beaker
1207
1268
  release_file = "/repos/apt/#{codename}/pool/#{opts[:puppet_collection]}/p/puppet-agent/puppet-agent*#{arch}.deb"
1208
1269
  download_file = "puppet-agent-#{variant}-#{version}-#{arch}.tar.gz"
1209
1270
  when /^windows$/
1210
- onhost_copy_base = '`cygpath -smF 35`/'
1211
1271
  is_config_32 = host['ruby_arch'] == 'x86' || host['install_32'] || opts['install_32']
1212
1272
  should_install_64bit = host.is_x86_64? && !is_config_32
1213
1273
  # only install 64bit builds if
@@ -1218,7 +1278,6 @@ module Beaker
1218
1278
  release_file = "/puppet-agent-x#{arch_suffix}.msi"
1219
1279
  download_file = "puppet-agent-x#{arch_suffix}.msi"
1220
1280
  when /^osx$/
1221
- onhost_copy_base = File.join('/var', 'root')
1222
1281
  release_file = "/repos/apple/#{opts[:puppet_collection]}/puppet-agent-*"
1223
1282
  download_file = "puppet-agent-#{variant}-#{version}.tar.gz"
1224
1283
  else
@@ -1259,7 +1318,6 @@ module Beaker
1259
1318
  end
1260
1319
  end
1261
1320
 
1262
-
1263
1321
  # This method will install a pem file certificate on a windows host
1264
1322
  #
1265
1323
  # @param [Host] host A host object
@@ -56,7 +56,9 @@ module Beaker
56
56
  Beaker::Docker
57
57
  when /^openstack$/
58
58
  Beaker::OpenStack
59
- when /^none$/
59
+ when /^noop$/
60
+ Beaker::Noop
61
+ when /^(default)|(none)$/
60
62
  Beaker::Hypervisor
61
63
  else
62
64
  # Custom hypervisor
@@ -133,6 +135,6 @@ module Beaker
133
135
  end
134
136
  end
135
137
 
136
- [ 'vsphere_helper', 'vagrant', 'vagrant_virtualbox', 'vagrant_parallels', 'vagrant_libvirt', 'vagrant_fusion', 'vagrant_workstation', 'fusion', 'aws_sdk', 'vsphere', 'vmpooler', 'vcloud', 'aixer', 'solaris', 'docker', 'google_compute', 'openstack' ].each do |lib|
138
+ [ 'vsphere_helper', 'vagrant', 'vagrant_virtualbox', 'vagrant_parallels', 'vagrant_libvirt', 'vagrant_fusion', 'vagrant_workstation', 'fusion', 'aws_sdk', 'vsphere', 'vmpooler', 'vcloud', 'aixer', 'solaris', 'docker', 'google_compute', 'openstack', 'noop' ].each do |lib|
137
139
  require "beaker/hypervisor/#{lib}"
138
140
  end
@@ -0,0 +1,31 @@
1
+ module Beaker
2
+ class Noop < Beaker::Hypervisor
3
+
4
+ def initialize(new_hosts, options)
5
+ @options = options
6
+ @logger = options[:logger]
7
+ @hosts = new_hosts
8
+ end
9
+
10
+ def validate
11
+ # noop
12
+ end
13
+
14
+ def configure
15
+ # noop
16
+ end
17
+
18
+ def proxy_package_manager
19
+ # noop
20
+ end
21
+
22
+ def provision
23
+ # noop
24
+ end
25
+
26
+ def cleanup
27
+ # noop
28
+ end
29
+
30
+ end
31
+ end
@@ -21,10 +21,8 @@ module Beaker
21
21
  "precise" => "1204",
22
22
  "lucid" => "1004",
23
23
  },
24
- :osx => { "yosemite" => "10.10",
25
- "mavericks" => "10.9",
26
- "1010" => "10.10",
27
- "109" => "10.9"
24
+ :osx => { "yosemite" => "1010",
25
+ "mavericks" => "109",
28
26
  }
29
27
  }
30
28
 
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '2.21.0'
3
+ STRING = '2.22.0'
4
4
  end
5
5
  end
@@ -812,7 +812,7 @@ describe ClassMixedWithDSLInstallUtils do
812
812
  end
813
813
  end
814
814
 
815
- describe '#install_puppetagent_dev_repo' do
815
+ describe '#install_puppet_agent_dev_repo_on' do
816
816
 
817
817
  it 'raises an exception when host platform is unsupported' do
818
818
  platform = Object.new()
@@ -823,7 +823,7 @@ describe ClassMixedWithDSLInstallUtils do
823
823
  allow( subject ).to receive( :options ).and_return( {} )
824
824
 
825
825
  expect{
826
- subject.install_puppetagent_dev_repo( host, opts )
826
+ subject.install_puppet_agent_dev_repo_on( host, opts )
827
827
  }.to raise_error(RuntimeError, /No repository installation step for/)
828
828
  end
829
829
 
@@ -839,7 +839,7 @@ describe ClassMixedWithDSLInstallUtils do
839
839
  expect(subject).to receive(:scp_to).once.with(host, /-agent-/, "/root")
840
840
  expect(subject).to receive(:on).once.with(host, /rpm\ -ivh/)
841
841
 
842
- subject.install_puppetagent_dev_repo( host, opts )
842
+ subject.install_puppet_agent_dev_repo_on( host, opts )
843
843
  end
844
844
 
845
845
  it 'runs the correct install for debian-based platforms' do
@@ -855,7 +855,7 @@ describe ClassMixedWithDSLInstallUtils do
855
855
  expect(subject).to receive(:on).ordered.with(host, /dpkg\ -i\ --force-all/)
856
856
  expect(subject).to receive(:on).ordered.with(host, /apt-get\ update/)
857
857
 
858
- subject.install_puppetagent_dev_repo( host, opts )
858
+ subject.install_puppet_agent_dev_repo_on( host, opts )
859
859
  end
860
860
 
861
861
  it 'runs the correct install for windows platforms' do
@@ -874,7 +874,48 @@ describe ClassMixedWithDSLInstallUtils do
874
874
  expect(subject).to receive(:install_msi_on).with(host, copied_path, {}, {:debug => nil}).once
875
875
  expect(subject).to receive(:on).ordered.with(host, /echo/).and_return(mock_echo)
876
876
 
877
- subject.install_puppetagent_dev_repo( host, opts )
877
+ subject.install_puppet_agent_dev_repo_on( host, opts )
878
+ end
879
+
880
+ it 'runs the correct install for osx platforms (new link format)' do
881
+ platform = Object.new()
882
+ allow(platform).to receive(:to_array) { ['osx', '10.9', 'x86_64', 'mavericks']}
883
+ host = basic_hosts.first
884
+ host['platform'] = platform
885
+ opts = { :version => '0.1.0' }
886
+ allow( subject ).to receive( :options ).and_return( {} )
887
+ copied_path = "#{win_temp}\\puppet-agent-x64.msi"
888
+ mock_echo = Object.new()
889
+ allow( mock_echo ).to receive( :raw_output ).and_return( copied_path )
890
+
891
+ expect(subject).to receive(:link_exists?).with(/\/puppet-agent\/0.1.0\/repos\/apple\/10.9\/PC1\/x86_64\//).and_return(true)
892
+ expect(subject).to receive(:fetch_http_file).once.with(/\/apple\/10.9\/PC1\/x86_64$/, 'puppet-agent-0.1.0-1.mavericks.dmg', /\/osx$/)
893
+ expect(subject).to receive(:scp_to).once.with(host, /\/puppet-agent-0.1.0-1.mavericks.dmg$/, /var\/root/)
894
+ expect(host).to receive( :install_package ).with(/puppet-agent-0.1.0\*/)
895
+
896
+ subject.install_puppet_agent_dev_repo_on( host, opts )
897
+
898
+ end
899
+
900
+ it 'runs the correct install for osx platforms (old link format)' do
901
+ platform = Object.new()
902
+ allow(platform).to receive(:to_array) { ['osx', '10.9', 'x86_64', 'mavericks']}
903
+ host = basic_hosts.first
904
+ host['platform'] = platform
905
+ opts = { :version => '0.1.0' }
906
+ allow( subject ).to receive( :options ).and_return( {} )
907
+ copied_path = "#{win_temp}\\puppet-agent-x64.msi"
908
+ mock_echo = Object.new()
909
+ allow( mock_echo ).to receive( :raw_output ).and_return( copied_path )
910
+
911
+ expect(subject).to receive(:link_exists?).with(/\/puppet-agent\/0.1.0\/repos\/apple\/10.9\/PC1\/x86_64\//).and_return(false)
912
+ expect(subject).to receive(:fetch_http_file).once.with(/\/puppet-agent\/0.1.0\/repos\/apple\/PC1$/, 'puppet-agent-0.1.0-osx-10.9-x86_64.dmg', /\/osx$/)
913
+ expect(subject).to receive(:scp_to).once.with(host, /\/puppet-agent-0.1.0-osx-10.9-x86_64.dmg$/, /var\/root/)
914
+ expect(host).to receive( :install_package ).with(/puppet-agent-0.1.0\*/)
915
+
916
+ subject.install_puppet_agent_dev_repo_on( host, opts )
917
+
918
+
878
919
  end
879
920
 
880
921
  it 'allows you to override the local copy directory' do
@@ -890,7 +931,7 @@ describe ClassMixedWithDSLInstallUtils do
890
931
  expect(subject).to receive(:on).ordered.with(host, /dpkg\ -i\ --force-all/)
891
932
  expect(subject).to receive(:on).ordered.with(host, /apt-get\ update/)
892
933
 
893
- subject.install_puppetagent_dev_repo( host, opts )
934
+ subject.install_puppet_agent_dev_repo_on( host, opts )
894
935
  end
895
936
 
896
937
  it 'allows you to override the external copy directory' do
@@ -906,7 +947,7 @@ describe ClassMixedWithDSLInstallUtils do
906
947
  expect(subject).to receive(:on).ordered.with(host, /dpkg\ -i\ --force-all/)
907
948
  expect(subject).to receive(:on).ordered.with(host, /apt-get\ update/)
908
949
 
909
- subject.install_puppetagent_dev_repo( host, opts )
950
+ subject.install_puppet_agent_dev_repo_on( host, opts )
910
951
  end
911
952
  end
912
953
 
@@ -991,6 +1032,75 @@ describe ClassMixedWithDSLInstallUtils do
991
1032
  end
992
1033
  end
993
1034
 
1035
+ describe '#install_puppet_agent_dev_repo_on' do
1036
+ let( :package_name ) { 'puppet-agent' }
1037
+ let( :platform ) { @platform || 'other' }
1038
+ let( :host ) do
1039
+ FakeHost.create( 'fakvm', platform, opts )
1040
+ end
1041
+
1042
+ before :each do
1043
+ allow( subject ).to receive( :configure_foss_defaults_on ).and_return( true )
1044
+ end
1045
+
1046
+ def test_fetch_http_file()
1047
+ expect( subject ).to receive( :configure_type_defaults_on ).with(host)
1048
+ expect( subject ).to receive( :fetch_http_file ).with( /[^\/]\z/, anything, anything )
1049
+ subject.install_puppet_agent_dev_repo_on( host, opts.merge({ :puppet_agent_version => '1.0.0' }) )
1050
+ end
1051
+
1052
+ context 'on windows' do
1053
+ before :each do
1054
+ @platform = 'windows-7-x86_64'
1055
+ end
1056
+
1057
+ it 'copies package to the cygwin root directory and installs it' do
1058
+ expect( subject ).to receive( :install_msi_on ).with( any_args )
1059
+ expect( subject ).to receive( :scp_to ).with( host, /puppet-agent-x86\.msi/, '`cygpath -smF 35`/' )
1060
+ test_fetch_http_file
1061
+ end
1062
+ end
1063
+
1064
+ context 'on debian' do
1065
+ before :each do
1066
+ @platform = 'debian-5-x86_64'
1067
+ end
1068
+
1069
+ it 'copies repo_config to the root user directory and installs it' do
1070
+ expect( subject ).to receive( :scp_to ).with( host, /\/puppet-agent_1\.0\.0-1_amd64\.deb/, '/root' )
1071
+ expect( subject ).to receive( :on ).with( host, /dpkg -i --force-all .+puppet-agent_1\.0\.0-1_amd64\.deb/ )
1072
+ expect( subject ).to receive( :on ).with( host, /apt-get update/ )
1073
+ test_fetch_http_file
1074
+ end
1075
+ end
1076
+
1077
+ context 'on solaris 10' do
1078
+ before :each do
1079
+ @platform = 'solaris-10-x86_64'
1080
+ end
1081
+
1082
+ it "copies package to the root directory and installs it" do
1083
+ expect( subject ).to receive( :scp_to ).with( host, /\/puppet-agent-1\.0\.0\.i386\.pkg\.gz/, '/' )
1084
+ expect( subject ).to receive( :create_remote_file ).with( host, '/noask', /noask file/m )
1085
+ expect( subject ).to receive( :on ).with( host, 'gunzip -c puppet-agent-1.0.0.i386.pkg.gz | pkgadd -d /dev/stdin -a noask -n all' )
1086
+ test_fetch_http_file
1087
+ end
1088
+ end
1089
+
1090
+ context 'on solaris 11' do
1091
+ before :each do
1092
+ @platform = 'solaris-11-x86_64'
1093
+ end
1094
+
1095
+ it "copies package to the root user directory and installs it" do
1096
+ expect( subject ).to receive( :scp_to ).with( host, /\/puppet-agent-1\.0\.0\.i386\.pkg\.gz/, '/root' )
1097
+ expect( subject ).to receive( :create_remote_file ).with( host, '/root/noask', /noask file/m )
1098
+ expect( subject ).to receive( :on ).with( host, 'gunzip -c puppet-agent-1.0.0.i386.pkg.gz | pkgadd -d /dev/stdin -a noask -n all' )
1099
+ test_fetch_http_file
1100
+ end
1101
+ end
1102
+ end
1103
+
994
1104
  describe '#install_puppet_agent_pe_promoted_repo_on' do
995
1105
  let( :package_name ) { 'puppet-agent' }
996
1106
  let( :platform ) { @platform || 'other' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.0
4
+ version: 2.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -521,6 +521,7 @@ files:
521
521
  - lib/beaker/hypervisor/fusion.rb
522
522
  - lib/beaker/hypervisor/google_compute.rb
523
523
  - lib/beaker/hypervisor/google_compute_helper.rb
524
+ - lib/beaker/hypervisor/noop.rb
524
525
  - lib/beaker/hypervisor/openstack.rb
525
526
  - lib/beaker/hypervisor/solaris.rb
526
527
  - lib/beaker/hypervisor/vagrant.rb