beaker 3.16.0 → 3.17.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 +8 -8
- data/CONTRIBUTING.md +1 -1
- data/docs/tutorials/subcommands.md +13 -12
- data/docs/tutorials/test_run.md +19 -27
- data/lib/beaker/hypervisor/docker.rb +6 -0
- data/lib/beaker/tasks/quick_start.rb +1 -1
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/hypervisor/docker_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTlmZTY1M2UyMzhmMzVjOWYzZWM0M2MxMmYzZWU3YzBmZmQ3MmE3MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2NhNzU3MmUwMmM3NWEyYjlkN2ZiMzFjN2YxMzM3NWMyZTY1NTEyZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Nzk5NTRhYjBjMDIxNWI5OGRkMGMzMzY3MDZkODJjMDNjODVkZjJhNTQzZjY5
|
10
|
+
MmUwOTE1NGYxNjEzYWU2YTgwN2IxNjJjYzczNWNmOWNmYTA3Y2JjZjBiNDZi
|
11
|
+
ODIzNmM3YjQyNjJlM2ZjNGJkYmY4MjI1NjZlYTQ0YTEyY2M0YTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTRmODZkMTQxOGYwYTIzMjRiYjgzMmUyNThkNGExMDBiYjNlMzg0NmY1YWEy
|
14
|
+
NDMwYmQ5MWVlNzQyNjI5NzU4NDYyNzMwY2U2NjhjNmFkNzA3YzYyYzFhNGJh
|
15
|
+
NGU0NmYyZmM1NWU5NjU5NzUzMzJhNDBiNzJjNjk5ZjRiZGI1MmI=
|
data/CONTRIBUTING.md
CHANGED
@@ -83,7 +83,7 @@ To prepare for a new gem release of Beaker (after the version has been bumped) t
|
|
83
83
|
|
84
84
|
# Additional Resources
|
85
85
|
|
86
|
-
* [
|
86
|
+
* [Puppet community guidelines](https://docs.puppet.com/community/community_guidelines.html)
|
87
87
|
* [Bug tracker (Jira)](http://tickets.puppetlabs.com)
|
88
88
|
* [BKR Jira Project](https://tickets.puppetlabs.com/issues/?jql=project%20%3D%20BKR)
|
89
89
|
* [Contributor License Agreement](http://links.puppetlabs.com/cla)
|
@@ -1,23 +1,24 @@
|
|
1
1
|
# Using Subcommands
|
2
2
|
|
3
|
-
The document gives an overview of the subcommands that
|
4
|
-
describes
|
3
|
+
The document gives an overview of the subcommands that Beaker supports and
|
4
|
+
describes how to use them.
|
5
5
|
|
6
6
|
## Why Subcommands?
|
7
7
|
|
8
8
|
Subcommands are designed to make test development and iteration simpler by
|
9
|
-
separating out all of the phases of a
|
10
|
-
entirety of your
|
11
|
-
execute each phase independently. This allows for faster feedback
|
12
|
-
failures and better control for iterating over actual test
|
9
|
+
separating out all of the phases of a Beaker [test run](test_run.md)*. Instead
|
10
|
+
of requiring the entirety of your Beaker execution in one command, subcommands
|
11
|
+
allow you to execute each phase independently. This allows for faster feedback
|
12
|
+
for potential failures and better control for iterating over actual test
|
13
|
+
development.
|
13
14
|
|
14
|
-
Most subcommands pass through flags to the
|
15
|
+
Most subcommands pass through flags to the Beaker options. For instance, you can
|
15
16
|
pass through `--hosts` to the `init` subcommand and it will parse the `--hosts`
|
16
|
-
argument as if you were executing a
|
17
|
+
argument as if you were executing a Beaker run*. Please review the
|
17
18
|
subcommand specific help for further information. You can see the help for a
|
18
19
|
specific subcommand by running `beaker help SUBCOMMAND`.
|
19
20
|
|
20
|
-
*Please note that in this document, a
|
21
|
+
*Please note that in this document, a Beaker `run` is standard beaker invocation
|
21
22
|
without any subcommands.
|
22
23
|
## Available Subcommands
|
23
24
|
|
@@ -31,9 +32,9 @@ Provisions hosts defined in your `subcommand_options file`. You can pass the
|
|
31
32
|
`--hosts` flag here to override any hosts provided there.
|
32
33
|
|
33
34
|
### beaker exec
|
34
|
-
Run a single file, directory, or
|
35
|
+
Run a single file, directory, or Beaker suite. If supplied a file or directory,
|
35
36
|
that resource will be run in the context of the `tests` suite; if supplied a
|
36
|
-
|
37
|
+
Beaker suite, then just that suite will run. If no resource is supplied, then
|
37
38
|
this command executes the suites as they are defined in the configuration in the
|
38
39
|
`subcommand_options.yaml`.
|
39
40
|
|
@@ -49,6 +50,6 @@ beaker provision
|
|
49
50
|
# or directory. Do not pass GO. Do not collect $200.
|
50
51
|
beaker exec ./tests/my_test.rb
|
51
52
|
# Repeating the above command as needed
|
52
|
-
# When you're done testing using the VM that
|
53
|
+
# When you're done testing using the VM that Beaker provisioned
|
53
54
|
beaker destroy
|
54
55
|
```
|
data/docs/tutorials/test_run.md
CHANGED
@@ -1,31 +1,23 @@
|
|
1
|
-
# Beaker Test Runs
|
1
|
+
# Beaker Test Runs
|
2
2
|
|
3
|
-
A Beaker run
|
3
|
+
A Beaker test run consists of two primary phases: an SUT provision phase and
|
4
|
+
suite execution phase. After suite execution, Beaker defaults to cleaning up and
|
5
|
+
destroying the SUTs. Leave SUTs running with the `--preserve-hosts` flag.
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
+
|
8
|
+
* **Provision**
|
7
9
|
* Using supported hypervisors provision SUTs for testing on
|
8
10
|
* Do any initial configuration to ensure that the SUTs can communicate with beaker and each other
|
9
|
-
|
10
|
-
|
11
|
-
* Validation
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
* For test running options, please refer to [Test Suites & Failure Modes](test_suites.md)
|
23
|
-
|
24
|
-
|
25
|
-
* Reverting
|
26
|
-
* Skip with `--preserve-hosts`
|
27
|
-
* Destroy and cleanup all SUTs
|
28
|
-
|
29
|
-
|
30
|
-
* Cleanup
|
31
|
-
* Report test results
|
11
|
+
* skip with `--no-provision`
|
12
|
+
* Provisioning also runs some basic setup on the SUTs
|
13
|
+
* Validation
|
14
|
+
* Check the SUTs for necessary packages (curl, ntpdate)
|
15
|
+
* skip with `--no-validate`
|
16
|
+
* Configuration
|
17
|
+
* Do any post-provisioning configuration to the SUTs
|
18
|
+
* skip with `--no-configure`
|
19
|
+
|
20
|
+
|
21
|
+
* **Execution**
|
22
|
+
* Execute the files specified in each of the suites; for further documentation,
|
23
|
+
please refer to [Test Suites & Failure Modes](test_suites.md)
|
@@ -246,9 +246,12 @@ module Beaker
|
|
246
246
|
EOF
|
247
247
|
|
248
248
|
# Configure sshd service to allowroot login using password
|
249
|
+
# Also, disable reverse DNS lookups to prevent every. single. ssh
|
250
|
+
# operation taking 30 seconds while the lookup times out.
|
249
251
|
dockerfile += <<-EOF
|
250
252
|
RUN sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
251
253
|
RUN sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
254
|
+
RUN sed -ri 's/^#?UseDNS .*/UseDNS no/' /etc/ssh/sshd_config
|
252
255
|
EOF
|
253
256
|
|
254
257
|
|
@@ -286,6 +289,9 @@ module Beaker
|
|
286
289
|
container.exec(['sed','-ri',
|
287
290
|
's/^#?PasswordAuthentication .*/PasswordAuthentication yes/',
|
288
291
|
'/etc/ssh/sshd_config'])
|
292
|
+
container.exec(['sed','-ri',
|
293
|
+
's/^#?UseDNS .*/UseDNS no/',
|
294
|
+
'/etc/ssh/sshd_config'])
|
289
295
|
container.exec(%w(service ssh restart))
|
290
296
|
end
|
291
297
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'beaker-hostgenerator'
|
2
2
|
|
3
|
-
CONFIG_DIR = '
|
3
|
+
CONFIG_DIR = 'acceptance/config'
|
4
4
|
|
5
5
|
VAGRANT = ['ubuntu1404-64default.mdcal-ubuntu1404-64af', '--hypervisor=vagrant',
|
6
6
|
'--global-config={box_url=https://vagrantcloud.com/puppetlabs/boxes/ubuntu-14.04-64-nocm,box=puppetlabs/ubuntu-14.04-64-nocm}']
|
data/lib/beaker/version.rb
CHANGED
@@ -309,7 +309,7 @@ module Beaker
|
|
309
309
|
host['docker_container_name'] = container_name
|
310
310
|
|
311
311
|
expect( ::Docker::Container ).to receive(:all).and_return([container])
|
312
|
-
expect(container).to receive(:exec).exactly(
|
312
|
+
expect(container).to receive(:exec).exactly(4).times
|
313
313
|
end
|
314
314
|
docker.provision
|
315
315
|
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: 3.
|
4
|
+
version: 3.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|