beaker 2.42.0 → 2.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjU1MDAxYzhiZDg1YzJjZGUwMzJlYjJiM2Y4N2Y1NzY4MjFlNmFjYg==
4
+ NjVlYzZiNmZiMmI2MzY4YmZjY2U0YTkyNDZmMjMwMmNjMWQ3NmQzMA==
5
5
  data.tar.gz: !binary |-
6
- ZDA4MzRkYjEyYWM4YmFlNDE0ZjhlNWUxZTE2YWQ4ODMxZGIxNWIzZA==
6
+ ZDUyMWViNjYwYWFkM2E0ZjE3OWQ5YmNjNmM0MmQ2MmNiMmEyMTdkOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWRlM2Q5ZjRkZmI0YTNmYTFlMTlhMDJhNmMzNTQxOWMwYWI0ODQ0OTZiN2M0
10
- MzY4NGNhNDYxNWM0YjQ5MDcxYWQ4ZjI3MzU3YmRiNWI1ZTk5ODJiOTIxZjUw
11
- NzBhODljYzBhOWRhZWRjNTZmOTJiMjVkYjdmMDMwYTNjZTg5M2Y=
9
+ MDcxNDk4NTUwYzc2NGI1MDE3NmM4NjAyMzA5ZmM1MDY2MDYwZGY3N2I5MmIy
10
+ ZTRjNmY2YWY0YjEwMDU1OTQ4OWU2NzMyNDE4OTgwNTlmMTcwZWU1ZmE3MTMx
11
+ YThiNDk2OGVjM2U0ZDUxZThmM2Q0N2MxNmY3YzU5NDVlYTQ2NTQ=
12
12
  data.tar.gz: !binary |-
13
- YzEyMDM5M2VlNDZlMjI2NDVjMWZhN2NkMWIwMDI0ZjljNGI5MjQ3OGZhZGMz
14
- OGVlOGYyMjM4YWMzODBmMjc5ZjViNDNmZTk4MDg5NWQyNmIzMmE3NmIzNGQz
15
- ZGEyZWQ1NmQxY2QzNDRmMzA2Yzc3YzAwYWNjNDBlMDU2MTg3ZWU=
13
+ NTUzOWNhYjI5MzU2YjE1ODk5YzZjY2IxZDBmYzY4MWFmYTJkZGRmMTU2NWYw
14
+ YjAyZjU2MGNkMDFmM2Y2ZjE0YzFjZjAwOTQ3NTc5Mzg3YzY1MmU5MTUzOTVj
15
+ NWZhMDQ0NmRjOGUwM2IwM2ViNTlmMzVmYmQwY2UyOGM4ODEyYWY=
data/HISTORY.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 23 May, 2016 (67b70d4a)](#LATEST)
3
+ * [LATEST - 1 Jun, 2016 (83bf4f46)](#LATEST)
4
+ * [2.42.0 - 23 May, 2016 (c245fef7)](#2.42.0)
4
5
  * [2.41.0 - 10 May, 2016 (17c745bd)](#2.41.0)
5
6
  * [2.40.0 - 18 Apr, 2016 (0a7b948a)](#2.40.0)
6
7
  * [2.39.0 - 6 Apr, 2016 (5976e103)](#2.39.0)
@@ -118,7 +119,160 @@
118
119
  * [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
119
120
 
120
121
  ## Details
121
- ### <a name = "LATEST">LATEST - 23 May, 2016 (67b70d4a)
122
+ ### <a name = "LATEST">LATEST - 1 Jun, 2016 (83bf4f46)
123
+
124
+ * (GEM) update beaker version to 2.43.0 (83bf4f46)
125
+
126
+ * Merge pull request #1128 from puppetlabs/maint/master/update-shell-docs (81f6ab97)
127
+
128
+
129
+ ```
130
+ Merge pull request #1128 from puppetlabs/maint/master/update-shell-docs
131
+
132
+ (maint) Fix documentation example for shell
133
+ ```
134
+ * Merge pull request #1132 from kevpl/docs_vagrant_reconcile (1ec62530)
135
+
136
+
137
+ ```
138
+ Merge pull request #1132 from kevpl/docs_vagrant_reconcile
139
+
140
+ (MAINT) cleaned up vagrant hypervisor docs
141
+ ```
142
+ * Merge pull request #1113 from james-powis/BKR-758_fix-bitvise-ssh (3df2a046)
143
+
144
+
145
+ ```
146
+ Merge pull request #1113 from james-powis/BKR-758_fix-bitvise-ssh
147
+
148
+ (BKR-758) Fix Bitvise SSH issues and Various vagrant versions not forwarding ssh properly
149
+ ```
150
+ * (MAINT) cleaned up vagrant hypervisor docs (ad442334)
151
+
152
+
153
+ ```
154
+ (MAINT) cleaned up vagrant hypervisor docs
155
+
156
+ [skip ci]
157
+ ```
158
+ * (maint) Fix documentation example for shell (323a5296)
159
+
160
+
161
+ ```
162
+ (maint) Fix documentation example for shell
163
+
164
+ Shell cannot accept a host, so update inline docs accordingly.
165
+ ```
166
+ * Merge pull request #1125 from kevpl/maint_docs_installation_clarify (75d6244f)
167
+
168
+
169
+ ```
170
+ Merge pull request #1125 from kevpl/maint_docs_installation_clarify
171
+
172
+ (MAINT) clarifying between install docs
173
+ ```
174
+ * Merge pull request #1123 from kevpl/maint_docs_filebug_rm (c6a02b25)
175
+
176
+
177
+ ```
178
+ Merge pull request #1123 from kevpl/maint_docs_filebug_rm
179
+
180
+ (MAINT) rm File-a-Beaker-Bug doc, redundant
181
+ ```
182
+ * Merge pull request #1127 from kevpl/maint_docs_maintainers_consolidate (746f571f)
183
+
184
+
185
+ ```
186
+ Merge pull request #1127 from kevpl/maint_docs_maintainers_consolidate
187
+
188
+ (MAINT) clarify beaker maintainers
189
+ ```
190
+ * Merge pull request #1124 from kevpl/maint_docs_readme_01 (dbd4c1cf)
191
+
192
+
193
+ ```
194
+ Merge pull request #1124 from kevpl/maint_docs_readme_01
195
+
196
+ (MAINT) added overview to main README
197
+ ```
198
+ * (MAINT) clarify beaker maintainers (a9a9fb9a)
199
+
200
+
201
+ ```
202
+ (MAINT) clarify beaker maintainers
203
+
204
+ [skipci]
205
+ ```
206
+ * Merge pull request #1126 from tvpartytonight/maint_add_front_page_links (8540111a)
207
+
208
+
209
+ ```
210
+ Merge pull request #1126 from tvpartytonight/maint_add_front_page_links
211
+
212
+ (maint) Add front page link for Getting Started guide
213
+ ```
214
+ * (maint) Add front page link for Getting Started guide (74fe4247)
215
+
216
+ * (MAINT) clarifying between install docs (bbe3e500)
217
+
218
+
219
+ ```
220
+ (MAINT) clarifying between install docs
221
+
222
+ [skip ci]
223
+ ```
224
+ * (MAINT) added overview to main README (c0987a67)
225
+
226
+ * (MAINT) rm File-a-Beaker-Bug doc, redundant (c9af7dd7)
227
+
228
+ * Merge pull request #1122 from pinkypie/BKR-811 (6b586915)
229
+
230
+
231
+ ```
232
+ Merge pull request #1122 from pinkypie/BKR-811
233
+
234
+ (BKR-811) Adding documentation for the confine method.
235
+ ```
236
+ * Merge pull request #1121 from pinkypie/BKR-718 (8659c9d8)
237
+
238
+
239
+ ```
240
+ Merge pull request #1121 from pinkypie/BKR-718
241
+
242
+ (BKR-718) Check the available rake method
243
+ ```
244
+ * (BKR-811) Adding documentation for the confine method. (bf7921a7)
245
+
246
+ * (BKR-718) - Check the available rake method for the version of, rake to avoid deprecation errors/warnings. (2d98d384)
247
+
248
+ * (BKR-758) Fix Bitvise SSH issues and (1f9c6efd)
249
+
250
+
251
+ ```
252
+ (BKR-758) Fix Bitvise SSH issues and
253
+
254
+ correct various vagrant versions not forwarding ssh properly
255
+
256
+ petems - Add logic for PSWindows
257
+ petems - Replace host make command with mkdir_p helper
258
+ petems - Remove resolv.conf code
259
+ Could fix this with Windows specific stuff later, but leaving it out for now
260
+ joshsouza - Correct SSH config's HostName when connecting to Windows hosts (not using local port mapping)
261
+ joshsouza - Correct hieraconf to be hiera_config in puppet lookup
262
+
263
+ explicitly forwarding ssh
264
+ james-powis - forwarding ssh explicitly for windows
265
+
266
+ due to regression bugs in vagrant versions 1.6.2, 1.6.3, 1.6.4, 1.7.3+
267
+ this causes ssh vagrant@#{SUT} to fail to map to ssh -p 2222
268
+ vagrant@localhost. Explicitly setting absolutely ensures ssh forwarding
269
+ functions.
270
+
271
+ james-powis - fixing bitvise on windows
272
+ ```
273
+ ### <a name = "2.42.0">2.42.0 - 23 May, 2016 (c245fef7)
274
+
275
+ * (HISTORY) update beaker history for gem release 2.42.0 (c245fef7)
122
276
 
123
277
  * (GEM) update beaker version to 2.42.0 (67b70d4a)
124
278
 
data/MAINTAINERS.md ADDED
@@ -0,0 +1,21 @@
1
+ # Reviewers/Maintainers For Beaker
2
+
3
+ Beaker is maintained by Puppet's Quality Engineering (QE) Team. These people
4
+ will be reviewing & merging PRs to the project.
5
+ In particular, our current Beaker maintainers are:
6
+
7
+ | Name | Github | Email |
8
+ |:--------------:|:---------------------------------------------------:|:--------------------:|
9
+ | Kevin Imber | [kevpl](https://github.com/kevpl) | <ki@puppet.com> |
10
+ | Tony Vu | [tvpartytonight](https://github.com/tvpartytonight) | <tony.vu@puppet.com> |
11
+ | Sarah Thompson | [pinkypie](https://github.com/pinkypie) | <sarah@puppet.com> |
12
+
13
+ # Reviewers/Maintainers For Specific Areas of Beaker
14
+
15
+ For code to land in these specific areas of Beaker the following owners must provide review and :+1:
16
+
17
+ Code | Owners
18
+ :-------:|:----------:
19
+ Beaker::Hypervisor::Docker | [Richard Pijnenburg (electrical)](https://github.com/electrical)
20
+ FreeBSD | [Peter Souter (petems)](https://github.com/petems)
21
+ OpenBSD | [Matt Dainty (bodgit)](https://github.com/bodgit)
data/README.md CHANGED
@@ -1,41 +1,39 @@
1
1
  # Beaker
2
2
 
3
- Puppet Labs cloud enabled acceptance testing tool.
3
+ Beaker is an acceptance testing harness for Puppet PE and other Puppet Projects. It can also be used as a virtual machine provisioner - setting up machines, running any configuration on those machines and then exiting.
4
+
5
+ Beaker runs tests written in Ruby with an additional DSL API. This gives you access to all standard Ruby along with acceptance testing specific commands.
4
6
 
5
7
  # Installation
6
8
 
7
9
  See [Beaker Installation](docs/Beaker-Installation.md).
8
10
 
9
- #Documentation
11
+ # Documentation
10
12
 
11
13
  Documentation for Beaker can be found in this repository in [the docs/ folder](docs/README.md).
12
14
 
15
+ The [Getting Started](docs/How-To-Beaker.md) is a great place to start for new Beaker users.
16
+
13
17
  #Beaker Libraries
14
18
 
15
19
  Beaker functionality has been extended through the use of libraries available as gems. See the
16
20
  [complete list](docs/Beaker-Libraries.md) for available gems. See the [beaker-template documentation](https://github.com/puppetlabs/beaker-template/blob/master/README.md) for documentation on creating beaker-libraries.
17
21
 
18
- #Beaker API
22
+ # Beaker API
19
23
 
20
24
  [RubyDoc Beaker Documentation Server](http://rubydoc.info/github/puppetlabs/beaker/frames)
21
25
 
22
- #License
26
+ # License
23
27
 
24
28
  See [LICENSE](LICENSE) file.
25
29
 
26
- #Support & Issues
30
+ # Support & Issues
27
31
 
28
32
  Please log tickets and issues at our [Beaker Issue Tracker](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR). In addition there is an active #puppet-dev channel on Freenode.
29
33
 
30
34
  For additional information on filing tickets, please check out our [CONTRIBUTOR doc](CONTRIBUTING.md),
31
35
  and for ticket lifecycle information, checkout our [ticket process doc](docs/meta/ticket_process.md).
32
36
 
33
- #Maintainers
34
-
35
- Beaker is maintained by Puppet's Quality Engineering (QE) Team. In particular, our current Beaker maintainers are:
37
+ # Maintainers
36
38
 
37
- | Name | Email |
38
- |:--------------:|:--------------------:|
39
- | Kevin Imber | <ki@puppet.com> |
40
- | Tony Vu | <tony.vu@puppet.com> |
41
- | Sarah Thompson | <sarah@puppet.com> |
39
+ For information on project maintainers, please check out our [MAINTAINERS doc](MAINTAINERS.md).
data/docs/README.md CHANGED
@@ -2,11 +2,10 @@
2
2
 
3
3
  ## Beaker Info
4
4
 
5
- * [Beaker Owners & Reviewers](Beaker-Owners-and-Reviewers.md)
6
- * [How to install](Beaker-Installation.md)
5
+ * [MAINTAINERS](/MAINTAINERS.md)
6
+ * [Installing Beaker](Beaker-Installation.md)
7
7
  * [How to Beaker](How-To-Beaker.md)
8
8
  * [Overview](Overview.md)
9
- * [Beaker Installation](Beaker-Installation.md)
10
9
  * [Creating A Test Environment](Creating-A-Test-Environment.md)
11
10
  * [Roles, What Are They?](Roles-What-Are-They.md)
12
11
  * Supported Virtualization Techniques
@@ -25,8 +24,10 @@
25
24
  * [Running Masterless Beaker](Beaker-with-Masterless-Puppet.md)
26
25
  * [Types, Puppet 4, & The All-In-One Agent](Types,-Puppet-4,-and-the-All-In-One-Agent.md)
27
26
  * [The Beaker DSL](The-Beaker-DSL.md)
28
- * [Shared Options for Executing Beaker Commands](Shared-Options-for-Executing-Beaker-Commands.md)
29
27
  * [Beaker DSL on rdoc.info](http://rdoc.info/github/puppetlabs/beaker/master/Beaker/DSL)
28
+ * [How the confine method works](dsl/confine.md)
29
+ * [Platform Specific Tag Confines](dsl/platform_specific_tag_confines.md)
30
+ * [Shared Options for Executing Beaker Commands](Shared-Options-for-Executing-Beaker-Commands.md)
30
31
  * [Let's Write a Test!](Lets-Write-a-Test.md)
31
32
  * [Access The Live Test Console with Pry](Access-the-Live-Test-Console-with-Pry.md)
32
33
  * [Test Tagging](Beaker-Test-Tagging.md)
@@ -0,0 +1,76 @@
1
+ # Confine
2
+
3
+ ## How does it work?
4
+
5
+ The confine method will limit the hosts the testcase is run against. You can pass in either :to or :except
6
+ to control how the criteria is applied (**:to** will apply the criteria to the hosts in order to find a match,
7
+ **:except** will apply the criteria to the hosts, and return those hosts that do not match). The default behaviour
8
+ is that the **TestCase#hosts** array is modified to only contain the hosts that match (or don't match) the criteria.
9
+
10
+ Full method documentation here:
11
+
12
+ * [confine](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker/DSL/Structure#confine-instance_method)
13
+
14
+ ## How does the optional Array<Host> parameter work?
15
+
16
+ However, if you pass in the optional Array<Host> to the method, the criteria will be applied to this hosts array
17
+ (not **TestCase#hosts**). Subsequently, any of the hosts contained in **TestCase#hosts** that were not included in the Array<Host>
18
+ passed to the method, will remain in **TestCase#hosts**. But any hosts that were filtered out by the criteria match
19
+ will be overwritten.
20
+
21
+ Take the following example:
22
+
23
+ HOSTS:
24
+ ubuntu_master:
25
+ roles:
26
+ - master
27
+ - database
28
+ - dashboard
29
+ - classifier
30
+ platform: ubuntu-14.04-amd64
31
+ hypervisor: vcloud
32
+ template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1404-x86_64
33
+ centos7_agent:
34
+ roles:
35
+ - agent
36
+ - frictionless
37
+ platform: el-7-x86_64
38
+ template: Delivery/Quality Assurance/Templates/vCloud/centos-7-x86_64
39
+ hypervisor: vcloud
40
+ ubuntu_agent:
41
+ roles:
42
+ - agent
43
+ - frictionless
44
+ platform: ubuntu-14.04-amd64
45
+ template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1404-x86_64
46
+ hypervisor: vcloud
47
+
48
+
49
+ Using the following confine:
50
+
51
+ `confine :to, { :platform => 'el-7-x86_64' }, agents`
52
+
53
+ We will end up with a **TestCase#hosts** array with two hosts, one agent and one master.
54
+
55
+ Since we passed in the 'agents' host array to the method, the criteria (:platform => 'el-7-x86_64') will be applied
56
+ to this set of hosts. Only one agent matches this criteria (centos7_agent). Since the master host (ubuntu_master) was not
57
+ included in the 'agents' host array when the criteria match was performed, it will remain in **TestCase#hosts**. But only one agent
58
+ remains after the criteria match.
59
+
60
+ `confine :except, { :platform => 'el-7-x86_64' }, agents`
61
+
62
+ Will also return two hosts, one agent and one master. But it will be the other agent (ubuntu_agent) as its platform does not match
63
+ 'el-7-x86_64'.
64
+
65
+ `confine :to, { :platform => 'el-7-x86_64' }`
66
+
67
+ Will return one host (centos7_agent). Because no Array<Host> was passed to the confine method, the criteria match
68
+ is being applied directly to **TestCase#hosts** (which contains all hosts).
69
+
70
+ `confine :except, { :platform => 'el-7-x86_64' }`
71
+
72
+ Will return two hosts (ubuntu_master and ubuntu_agent).
73
+
74
+ In order to limit the hosts to only the ubuntu agent, you would need to use:
75
+
76
+ `confine :to, { :platform => 'ubuntu-14.04-amd64', :role => 'agent' }`
@@ -1,7 +1,90 @@
1
- When using the Vagrant Hypervisor, beaker can mount specific local directories as synced_folders inside the vagrant box.
2
- This is done by using the 'mount_folders' option in the nodeset file.
1
+ # Vagrant
3
2
 
4
- Example hosts file:
3
+ Vagrant's slogan is "development environments made easy". They provide an
4
+ abstraction on top of a VM or cloud provider that allows you to manage
5
+ hosts and their provisioning. [Their Site](https://www.vagrantup.com/).
6
+
7
+ # Getting Started
8
+
9
+ ### Requirements
10
+
11
+ A prerequisite for using the vagrant hypervisor with beaker is that the
12
+ **Vagrant 1.7+** package needs to installed -
13
+ see [downloads.vagrantup.com](http://downloads.vagrantup.com/) for downloads.
14
+
15
+ Currently, we provide a suite of pre-built, publicly available vagrant boxes for
16
+ use in constructing tests: [Puppet Labs Vagrant Boxes](https://vagrantcloud.com/puppetlabs/).
17
+ You can use these boxes easily by pulling one of our
18
+ [Example Vagrant Hosts Files](Example-Vagrant-Hosts-Files.md).
19
+
20
+ ### Setup a Vagrant Hosts File
21
+
22
+ A vm is identified by `box` or `box_url` in the config file. No snapshot name
23
+ is required as the vm is reverted back to original state post testing using
24
+ `vagrant destroy --force`.
25
+
26
+ **Example Vagrant hosts file**
27
+
28
+ HOSTS:
29
+ ubuntu-1404-x64:
30
+ roles:
31
+ - master
32
+ - agent
33
+ - dashboard
34
+ - cloudpro
35
+ platform: ubuntu-1404-x86_64
36
+ hypervisor: vagrant
37
+ box: puppetlabs/ubuntu-14.04-64-nocm
38
+ box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
39
+ CONFIG:
40
+ nfs_server: none
41
+ consoleport: 443
42
+
43
+ VagrantFiles are created per host configuration file. They can be found in the
44
+ `.vagrant/beaker_vagrant_files` directory of the current working directory in a
45
+ subdirectory named after the host configuration file.
46
+
47
+ > beaker --hosts sample.cfg
48
+ > cd .vagrant/beaker_vagrant_files; ls
49
+ sample.cfg
50
+ > cd sample.c
51
+
52
+ Below are details of vagrants features as they're supported through beaker. If
53
+ you'd like to see more examples of vagrant hosts files, checkout our
54
+ [vagrant hosts file examples doc](vagrant_hosts_file_examples.md).
55
+
56
+ # Vagrant-Specific Hosts File Settings
57
+
58
+ ### Running With a GUI
59
+
60
+ It is possible to have the VirtualBox VM run with a GUI (i.e. non-headless mode)
61
+ by specifying ``vb_gui`` of any non-nil value in the config file, i.e.:
62
+
63
+ **Example Vagrant hosts file with vb_gui**
64
+
65
+ HOSTS:
66
+ ubuntu-1404-x64:
67
+ roles:
68
+ - master
69
+ - agent
70
+ - dashboard
71
+ - cloudpro
72
+ platform: ubuntu-1404-x86_64
73
+ hypervisor: vagrant
74
+ box: puppetlabs/ubuntu-14.04-64-nocm
75
+ box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
76
+ vb_gui: true
77
+ CONFIG:
78
+ nfs_server: none
79
+ consoleport: 443
80
+
81
+ ### Mounting Local Folders
82
+
83
+ When using the Vagrant Hypervisor, beaker can mount specific local directories
84
+ as synced_folders inside the vagrant box. This is done by using the
85
+ `mount_folders` option in the nodeset file.
86
+
87
+ **Example hosts file**
5
88
 
6
89
  HOSTS:
7
90
  ubuntu-1404-x64-master:
@@ -34,7 +117,5 @@ Example hosts file:
34
117
  nfs_server: none
35
118
  consoleport: 443
36
119
 
37
- In the above beaker will mount the folders ./ to /vagrant/folder1 and the folder /tmp to /vagrant/tmp
38
-
39
- ## Supported Virtualization Providers ##
40
- * [Vagrant](Vagrant-Support.md)
120
+ In the above beaker will mount the folders `./` to `/vagrant/folder1` and the
121
+ folder `/tmp` to `/vagrant/tmp`.
@@ -110,10 +110,8 @@ module Beaker
110
110
  # end
111
111
  #
112
112
  # @example Using TestCase helpers from within a test.
113
- # agents.each do |agent|
114
- # shell('cat /etc/puppet/puppet.conf') do |result|
115
- # assert_match result.stdout, /server = #{master}/, 'WTF Mate'
116
- # end
113
+ # shell('cat /etc/puppet/puppet.conf') do |result|
114
+ # assert_match result.stdout, /server = #{master}/, 'WTF Mate'
117
115
  # end
118
116
  #
119
117
  # @return [Result] An object representing the outcome of *command*.
@@ -290,7 +290,12 @@ module Beaker
290
290
 
291
291
  # Certain install paths may not create the config dirs/files needed
292
292
  host.mkdir_p host['puppetpath'] unless host[:type] =~ /aio/
293
- on host, "echo '' >> #{host.puppet['hiera_config']}"
293
+
294
+ if ((host['platform'] =~ /windows/) and not host.is_cygwin?)
295
+ # Do nothing
296
+ else
297
+ on host, "echo '' >> #{host.puppet['hiera_config']}"
298
+ end
294
299
  end
295
300
  end
296
301
 
@@ -27,8 +27,6 @@ module Windows::File
27
27
  when :bitvise
28
28
  # swap out separators
29
29
  network_path = path.gsub('\\', scp_separator)
30
- # pull off drive prefix since base BitVise dir is '/'
31
- network_path.gsub('C:', '')
32
30
  when :openssh
33
31
  path
34
32
  else
@@ -293,7 +293,11 @@ module Beaker
293
293
  def get_domain_name(host)
294
294
  domain = nil
295
295
  search = nil
296
- resolv_conf = host.exec(Command.new("cat /etc/resolv.conf")).stdout
296
+ if ((host['platform'] =~ /windows/) and not host.is_cygwin?)
297
+ resolv_conf = host.exec(Command.new('type C:\Windows\System32\drivers\etc\hosts')).stdout
298
+ else
299
+ resolv_conf = host.exec(Command.new("cat /etc/resolv.conf")).stdout
300
+ end
297
301
  resolv_conf.each_line { |line|
298
302
  if line =~ /^\s*domain\s+(\S+)/
299
303
  domain = $1
@@ -322,6 +326,8 @@ module Beaker
322
326
  def set_etc_hosts(host, etc_hosts)
323
327
  if host['platform'] =~ /freebsd/
324
328
  host.echo_to_file(etc_hosts, '/etc/hosts')
329
+ elsif ((host['platform'] =~ /windows/) and not host.is_cygwin?)
330
+ host.exec(Command.new("echo '#{etc_hosts}' >> C:\\Windows\\System32\\drivers\\etc\\hosts"))
325
331
  else
326
332
  host.exec(Command.new("echo '#{etc_hosts}' >> /etc/hosts"))
327
333
  end
@@ -42,6 +42,10 @@ module Beaker
42
42
  end
43
43
 
44
44
  if /windows/i.match(host['platform'])
45
+ #due to a regression bug in versions of vagrant 1.6.2, 1.6.3, 1.6.4, >= 1.7.3 ssh fails to forward
46
+ #automatically (note <=1.6.1, 1.6.5, 1.7.0 - 1.7.2 are uneffected)
47
+ #Explicitly setting SSH port forwarding due to this bug
48
+ v_file << " v.vm.network :forwarded_port, guest: 22, host: 2222, id: 'ssh', auto_correct: true\n"
45
49
  v_file << " v.vm.network :forwarded_port, guest: 3389, host: 3389, id: 'rdp', auto_correct: true\n"
46
50
  v_file << " v.vm.network :forwarded_port, guest: 5985, host: 5985, id: 'winrm', auto_correct: true\n"
47
51
  v_file << " v.vm.guest = :windows\n"
@@ -59,7 +59,9 @@ module Beaker
59
59
 
60
60
  # @private
61
61
  def define(args, &task_block)
62
- desc "Run Beaker Acceptance" unless ::Rake.application.last_comment
62
+ # Depending on the version of rake, either last_description or last_comment will be available.
63
+ desc "Run Beaker Acceptance" unless (::Rake.application.respond_to?(:last_description) ? ::Rake.application.last_description : ::Rake
64
+ .application.last_comment)
63
65
  task name, *args do |_, task_args|
64
66
  RakeFileUtils.__send__(:verbose, verbose) do
65
67
  task_block.call(*[self, task_args].slice(0, task_block.arity)) if task_block
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '2.42.0'
3
+ STRING = '2.43.0'
4
4
  end
5
5
  end
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.42.0
4
+ version: 2.43.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-23 00:00:00.000000000 Z
11
+ date: 2016-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -473,6 +473,7 @@ files:
473
473
  - Gemfile
474
474
  - HISTORY.md
475
475
  - LICENSE
476
+ - MAINTAINERS.md
476
477
  - README.md
477
478
  - Rakefile
478
479
  - acceptance/config/acceptance-options.rb
@@ -579,15 +580,12 @@ files:
579
580
  - docs/Argument-Processing-and-Precedence.md
580
581
  - docs/Beaker-Installation.md
581
582
  - docs/Beaker-Libraries.md
582
- - docs/Beaker-Owners-and-Reviewers.md
583
583
  - docs/Beaker-Recipes.md
584
584
  - docs/Beaker-Test-Tagging.md
585
585
  - docs/Beaker-with-Masterless-Puppet.md
586
586
  - docs/Creating-A-Test-Environment.md
587
587
  - docs/Docker-Support.md
588
588
  - docs/EC2-Support.md
589
- - docs/Example-Vagrant-Hosts-Files.md
590
- - docs/File-a-Beaker-Bug.md
591
589
  - docs/Google-Compute-Engine-Support.md
592
590
  - docs/How-To-Beaker.md
593
591
  - docs/How-To-Use-User-Password-Authentication-with-Beaker.md
@@ -603,8 +601,8 @@ files:
603
601
  - docs/The-Command-Line.md
604
602
  - docs/Types,-Puppet-4,-and-the-All-In-One-Agent.md
605
603
  - docs/VMWare-Fusion-Support.md
606
- - docs/Vagrant-Support.md
607
604
  - docs/beaker-vs.-beaker-rspec.md
605
+ - docs/dsl/confine.md
608
606
  - docs/dsl/platform_specific_tag_confines.md
609
607
  - docs/hosts/README.md
610
608
  - docs/hosts/cisco.md
@@ -612,6 +610,7 @@ files:
612
610
  - docs/hypervisors/README.md
613
611
  - docs/hypervisors/aws.md
614
612
  - docs/hypervisors/vagrant.md
613
+ - docs/hypervisors/vagrant_hosts_file_examples.md
615
614
  - docs/meta/README.md
616
615
  - docs/meta/ticket_process.md
617
616
  - docs/runner/test_suites.md
@@ -1,16 +0,0 @@
1
- # Reviewers/Maintainers For Beaker
2
- For the majority of Beaker new code will be reviewed and merged by these owners.
3
-
4
- |Owners|
5
- |:------:|
6
- |[Alice Nodelman (anodelman)](https://github.com/anodelman)|
7
- |[Kevin Imber (kevpl)](https://github.com/kevpl)|
8
-
9
- # Reviewers/Maintainers For Specific Areas of Beaker
10
- For code to land in these specific areas of Beaker the following owners must provide review and :+1:
11
-
12
- Code | Owners
13
- :-------:|:----------:
14
- Beaker::Hypervisor::Docker | [Richard Pijnenburg (electrical)](https://github.com/electrical)
15
- FreeBSD | [Peter Souter (petems)](https://github.com/petems)
16
- OpenBSD | [Matt Dainty (bodgit)](https://github.com/bodgit)
@@ -1,3 +0,0 @@
1
- Something wrong? Need a new feature? File Beaker bugs here:
2
-
3
- [beaker jira ticket tracker](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR).
@@ -1,47 +0,0 @@
1
- For testing against local Vagrant boxes. As a prerequisite the **Vagrant 1.7+** package needs to installed - see <a href = "http://downloads.vagrantup.com/">downloads.vagrantup.com</a> for downloads.
2
-
3
- Currently, we provide a suite of pre-built, publicly available vagrant boxes for use in constructing tests: <a href = "https://vagrantcloud.com/puppetlabs/">Puppet Labs Vagrant Boxes</a>. You can use these boxes easily by pulling one of our [Example Vagrant Hosts Files](Example-Vagrant-Hosts-Files.md).
4
-
5
- The vm is identified by `box` or `box_url` in the config file. No snapshot name is required as the vm is reverted back to original state post testing using `vagrant destroy --force`.
6
-
7
- ### example Vagrant hosts file ###
8
- HOSTS:
9
- ubuntu-1404-x64:
10
- roles:
11
- - master
12
- - agent
13
- - dashboard
14
- - cloudpro
15
- platform: ubuntu-1404-x86_64
16
- hypervisor: vagrant
17
- box: puppetlabs/ubuntu-14.04-64-nocm
18
- box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
19
- CONFIG:
20
- nfs_server: none
21
- consoleport: 443
22
-
23
- VagrantFiles are created per host configuration file. They can be found in the `.vagrant/beaker_vagrant_files` directory of the current working directory in a subdirectory named after the host configuration file.
24
-
25
- > beaker --hosts sample.cfg
26
- > cd .vagrant/beaker_vagrant_files; ls
27
- sample.cfg
28
- > cd sample.c
29
-
30
- It is possible to have the VirtualBox VM run with a GUI (i.e. non-headless mode) by specifying ``vb_gui`` of any non-nil value in the config file, i.e.:
31
-
32
- ### example Vagrant hosts file with vb_gui ###
33
- HOSTS:
34
- ubuntu-1404-x64:
35
- roles:
36
- - master
37
- - agent
38
- - dashboard
39
- - cloudpro
40
- platform: ubuntu-1404-x86_64
41
- hypervisor: vagrant
42
- box: puppetlabs/ubuntu-14.04-64-nocm
43
- box_url: https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm
44
- vb_gui: true
45
- CONFIG:
46
- nfs_server: none
47
- consoleport: 443