beaker 3.12.0 → 3.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +8 -8
  2. data/acceptance/tests/subcommands/init.rb +17 -15
  3. data/acceptance/tests/subcommands/provision.rb +45 -0
  4. data/beaker.gemspec +5 -9
  5. data/bin/beaker +1 -1
  6. data/docs/concepts/test_tagging.md +27 -14
  7. data/docs/how_to/archive_sut_files.md +19 -1
  8. data/docs/how_to/hypervisors/README.md +20 -3
  9. data/docs/how_to/hypervisors/ec2.md +4 -0
  10. data/docs/how_to/hypervisors/vmpooler.md +24 -0
  11. data/docs/how_to/hypervisors/vsphere.md +0 -3
  12. data/docs/tutorials/installation.md +22 -7
  13. data/lib/beaker/cli.rb +28 -12
  14. data/lib/beaker/dsl.rb +2 -1
  15. data/lib/beaker/dsl/helpers/puppet_helpers.rb +1 -1
  16. data/lib/beaker/dsl/helpers/tk_helpers.rb +1 -1
  17. data/lib/beaker/dsl/structure.rb +0 -130
  18. data/lib/beaker/dsl/test_tagging.rb +157 -0
  19. data/lib/beaker/host/unix/exec.rb +9 -1
  20. data/lib/beaker/host_prebuilt_steps.rb +1 -1
  21. data/lib/beaker/hypervisor/openstack.rb +8 -9
  22. data/lib/beaker/options/command_line_parser.rb +19 -4
  23. data/lib/beaker/options/parser.rb +18 -9
  24. data/lib/beaker/options/presets.rb +6 -4
  25. data/lib/beaker/options/validator.rb +11 -5
  26. data/lib/beaker/subcommand.rb +84 -6
  27. data/lib/beaker/subcommands/subcommand_util.rb +58 -7
  28. data/lib/beaker/version.rb +1 -1
  29. data/spec/beaker/cli_spec.rb +44 -1
  30. data/spec/beaker/dsl/structure_spec.rb +1 -214
  31. data/spec/beaker/dsl/test_tagging_spec.rb +274 -0
  32. data/spec/beaker/host/cisco_spec.rb +4 -4
  33. data/spec/beaker/host/unix/exec_spec.rb +2 -2
  34. data/spec/beaker/host_prebuilt_steps_spec.rb +1 -1
  35. data/spec/beaker/options/command_line_parser_spec.rb +2 -2
  36. data/spec/beaker/options/parser_spec.rb +33 -24
  37. data/spec/beaker/options/validator_spec.rb +18 -3
  38. data/spec/beaker/subcommand/subcommand_util_spec.rb +121 -10
  39. metadata +12 -8
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGJkNWQ2MjM2NzVmMjFiMzIzNDUwMzBhNGRkMDUzMzFlNjk1ZTk2OA==
4
+ NDRiMDdjNTBhMTU4NTljNWFmZDM1MDNhZjk0ZDI1MjJiNWI2YzE5ZQ==
5
5
  data.tar.gz: !binary |-
6
- MTVlOGIwNTBlNmRmOTgyMjc1YzBkZWE3NzU3YzIxZTBmNjc5YWIyMA==
6
+ NzI4NDM0YTE4ZDMxZWEwODU0YTM1ODQ5YTcwNzIwNjM4YTgzYzU2ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDhiOTc5ZWQyMDA3NWE4MmM4ZjA4MTMwOWJkODg1ZjA3N2Q1Mzk4YmEyNzIw
10
- OWVhYzE3OTI2YTFiZDkxNmIzNzA2YzI4YWQ5ZTA0YzMzNTk0ZGJhMDU0NzFm
11
- OTJkYmFiZjk3NzVhNTVjZGE0ZjY1Yzc3MGYxNjdjYzdhMzE4NGM=
9
+ MzQ4NmY3MzljYjJmZTk3ZWU4OTFlODc1Nzk4ZDAxZjAxMjlkZGM0ZTg3ZTQx
10
+ MjNlMzQzY2JkNGFmNDU4ZmRiYTE2YjYyNTQyMzRiOGY2NjI1YWYzY2ZjYWIx
11
+ ZmFiN2Q3MjFlMTgwOGNkMmM2YzU5ZTAxYTc5YmM0NjU4MjAyYjc=
12
12
  data.tar.gz: !binary |-
13
- NWYyYTNiYzgxMGY3OWIxNWMzNGViMTBlYmIyODI4MGQ3MmFiNzYzMTQzZTg3
14
- NzQ5ZGJlZDExZDU0Yzc3OTY5M2RkMmEyYzQ5NDU4ZDVhM2M1Y2ExOThmMjQ5
15
- NDQyNGIxOTA1YWE0YWVkMWRjMDUyY2RmMDlhZjhlYTU1ZmY1MTQ=
13
+ MTFmYWUzMTQ3NTc1MzZiNmUyYzdmOTBmNmU2YjIxYjBhMTQ2ODI1NmQzMzc4
14
+ NzRkODcyYmYwNWZiOTA4NTJiYTZkNTEwMDI3MmU1NzVjNTM3MjY1NzdiNWU5
15
+ NGQwOGQ2NGJlYTAxYjExYzRhMTQyOTY3ZmVhMDc2OTk1NjllMzg=
@@ -1,27 +1,30 @@
1
1
  test_name 'use the init subcommand' do
2
2
 
3
3
  def delete_root_folder_contents
4
- on default, 'rm -rf /root/*'
4
+ on default, 'rm -rf /root/* /root/.beaker'
5
5
  end
6
6
 
7
- step 'ensure that `beaker init` fails correctly when not provided a hypervisor' do
8
- expect_failure('it should return a non-zero code when it fails') do
9
- result = on(default, 'beaker init', :accept_all_exit_codes => true)
10
- refute_equal(0, result.exit_code, '`beaker init` without a hypervisor argument should return a non-zero exit code')
11
- end
12
- end
7
+ step 'ensure that `beaker init` exit value should be 1 when not provided with a supported hypervisor' do
8
+ result = on(default, 'beaker init ec2', :accept_all_exit_codes => true)
9
+ assert_match(/Invalid hypervisor. Currently supported hypervisors are.+/, result.stdout)
10
+ refute_equal(0, result.exit_code, '`beaker init` with an unsupported hypervisor argument should return a non-zero exit code')
11
+ end
13
12
 
14
13
  step 'ensure that `beaker help init` works' do
15
14
  result = on(default, 'beaker help init')
16
- assert_equal(0, result.exit_code, '`beaker help init` should return a zero exit code')
15
+ assert_match(/Usage+/, result.stdout)
17
16
  end
18
17
 
19
- step 'ensure that `beaker init` accepts both vmpooler and vagrant hypervisor arguments' do
18
+ step 'ensure that `beaker init --help` works' do
19
+ result = on(default, 'beaker init --help')
20
+ assert_match(/Usage.+/, result.stdout)
21
+ assert_equal(0, result.exit_code, '`beaker init --help` should return a zero exit code')
22
+ end
20
23
 
21
- ['vmpooler', 'vagrant'].each do |hypervisor|
22
- result = on(default, "beaker init --hypervisor=#{hypervisor}")
24
+ step 'ensure that `beaker init` accepts no argument as well as accepts either vmpooler or vagrant hypervisor arguments' do
25
+ ['vmpooler', 'vagrant', ''].each do |hypervisor|
26
+ result = on(default, "beaker init #{hypervisor}")
23
27
  assert_match(/Writing host config.+/, result.stdout)
24
- assert_equal(0, result.exit_code, "`beaker init --hypervisor=#{hypervisor}` should return a zero exit code")
25
28
  step 'ensure that the Rakefile is present' do
26
29
  on(default, '[ -e "Rakefile" ]')
27
30
  end
@@ -29,14 +32,13 @@ test_name 'use the init subcommand' do
29
32
  end
30
33
  end
31
34
 
32
-
33
35
  step 'ensure that a Rakefile is not overwritten if it does exist prior' do
34
36
  delete_root_folder_contents
35
- on(default, "beaker init --hypervisor=vmpooler")
37
+ on(default, "beaker init vmpooler")
36
38
  prepended_rakefile = on(default, 'cat Rakefile').stdout
37
39
  delete_root_folder_contents
38
40
  on(default, 'echo "require \'tempfile\'" >> Rakefile')
39
- on(default, 'beaker init --hypervisor=vmpooler', :accept_all_exit_codes => true)
41
+ on(default, 'beaker init vmpooler', :accept_all_exit_codes => true)
40
42
  rakefile = on(default, 'cat Rakefile')
41
43
 
42
44
  # Assert that the Rakefile contents includes the original and inserted requirements
@@ -0,0 +1,45 @@
1
+ test_name 'use the provision subcommand' do
2
+
3
+ def delete_root_folder_contents
4
+ on default, 'rm -rf /root/* /root/.beaker'
5
+ end
6
+
7
+ step 'ensure that `beaker provision` fails correctly when a configuration has not been initialized' do
8
+ delete_root_folder_contents
9
+ result = on(default, 'beaker provision', :accept_all_exit_codes => true)
10
+ assert_match(/Please initialise a configuration/, result.stdout)
11
+ refute_equal(0, result.exit_code, '`beaker provision` in an uninitialised configuration should return a non-zero exit code')
12
+ end
13
+
14
+ step 'ensure that `beaker help provision` works' do
15
+ result = on(default, 'beaker help provision')
16
+ assert_match(/Usage/, result.stdout)
17
+ assert_equal(0, result.exit_code, '`beaker help provision` should return a zero exit code')
18
+ end
19
+
20
+ step 'ensure that `beaker provision --help` works' do
21
+ result = on(default, 'beaker provision --help')
22
+ assert_match(/Usage/, result.stdout)
23
+ assert_equal(0, result.exit_code, '`beaker provision --help` should return a zero exit code')
24
+ end
25
+
26
+ step 'ensure that `beaker provision` provisions vmpooler configuration' do
27
+ result = on(default, "beaker init vmpooler")
28
+ assert_match(/Writing host config/, result.stdout)
29
+ assert_equal(0, result.exit_code, "`beaker init vmpooler` should return a zero exit code")
30
+ step 'ensure that the Rakefile is present' do
31
+ on(default, '[ -e "Rakefile" ]')
32
+ end
33
+ step 'ensure provision provisions, validates, and configures new hosts' do
34
+ result = on(default, "beaker provision")
35
+ assert_equal(0, result.exit_code, "`beaker provision` should return a zero exit code")
36
+ end
37
+ step 'ensure provision will not provision new hosts if hosts have already been provisioned' do
38
+ result = on(default, 'beaker provision')
39
+ assert_match(/Hosts have already been provisioned/, result.stdout)
40
+ assert_equal(0, result.exit_code, "`beaker provision` should return a zero exit code")
41
+ end
42
+ delete_root_folder_contents
43
+ end
44
+
45
+ end
data/beaker.gemspec CHANGED
@@ -5,11 +5,11 @@ require 'beaker/version'
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "beaker"
7
7
  s.version = Beaker::Version::STRING
8
- s.authors = ["Puppetlabs"]
9
- s.email = ["delivery@puppetlabs.com"]
8
+ s.authors = ["Puppet"]
9
+ s.email = ["delivery@puppet.com"]
10
10
  s.homepage = "https://github.com/puppetlabs/beaker"
11
11
  s.summary = %q{Let's test Puppet!}
12
- s.description = %q{Puppetlabs accceptance testing harness}
12
+ s.description = %q{Puppet's accceptance testing harness}
13
13
  s.license = 'Apache2'
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
19
 
20
- s.required_ruby_version = Gem::Requirement.new('>= 2.2.5')
20
+ s.required_ruby_version = Gem::Requirement.new('>= 2.1.8')
21
21
 
22
22
  # Testing dependencies
23
23
  s.add_development_dependency 'rspec', '~> 3.0'
@@ -36,11 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.add_runtime_dependency 'hocon', '~> 1.0'
37
37
  s.add_runtime_dependency 'net-ssh', '~> 4.0'
38
38
  s.add_runtime_dependency 'net-scp', '~> 1.2'
39
- s.add_runtime_dependency 'inifile', '~> 2.0'
40
- ## inifile: keep <3.0, breaks puppet_helpers.rb:puppet_conf_for when updated
41
- ## will need to fix that to upgrade this gem
42
- ## indicating test from puppet acceptance:
43
- ## tests/security/cve-2013-1652_improper_query_params.rb
39
+ s.add_runtime_dependency 'inifile', '~> 3.0'
44
40
 
45
41
  s.add_runtime_dependency 'rake', '~> 10.0'
46
42
  s.add_runtime_dependency 'rsync', '~> 1.0.9'
data/bin/beaker CHANGED
@@ -6,7 +6,7 @@ require 'beaker'
6
6
  if Beaker::Subcommands::SubcommandUtil.execute_subcommand?(ARGV[0])
7
7
  Beaker::Subcommand.start(ARGV)
8
8
  else
9
- Beaker::CLI.new.execute!
9
+ Beaker::CLI.new.parse_options.execute!
10
10
  puts "Beaker completed successfully, thanks."
11
11
  end
12
12
 
@@ -1,6 +1,10 @@
1
1
  ## What is This?
2
2
 
3
- Beaker test tagging allows you to add tags to tests (using the [`tag` DSL method](http://www.rubydoc.info/github/puppetlabs/beaker/master/Beaker/DSL/Structure#tag-instance_method)), so that you can include or exclude a specific subset of the tests given for use in this run. Why would you want to use this? Here are some examples of what you can do with this functionality:
3
+ Beaker test tagging allows you to add tags to tests (using the
4
+ [`tag` DSL method](http://www.rubydoc.info/github/puppetlabs/beaker/master/Beaker/DSL/TestTagging#tag-instance_method)),
5
+ so that you can include or exclude a specific subset of the tests given for use
6
+ in this run. Why would you want to use this? Here are some examples of what
7
+ you can do with this functionality:
4
8
 
5
9
  - Run groups of tests separately from the same testing codebase
6
10
  - Declare different actions that should be taken when a test fails
@@ -8,12 +12,14 @@ Beaker test tagging allows you to add tags to tests (using the [`tag` DSL method
8
12
 
9
13
  ## How Tagging Works
10
14
 
11
- Add tags to a Beaker test at the beginning, like you would if you were using confine. Things to stay aware of:
15
+ Add tags to a Beaker test at the beginning, like you would if you were using
16
+ confine. Things to stay aware of:
12
17
 
13
18
  - A test that is not executed due to a tag will be considered a ‘skipped’ test
14
19
  - Tags are free form strings and will not be subjected to any correctness testing
15
20
  - Tags are NOT case sensitive
16
21
  - Tagging was added after Beaker 2.14.1. If you're using that version or older, this isn't available
22
+ - `--test-tag-or` was added after Beaker 3.12.0. If you're using an older version, this isnt available
17
23
 
18
24
  ## Test Examples
19
25
 
@@ -39,38 +45,45 @@ Preferred style no-block example:
39
45
 
40
46
  ## Command Line Interaction
41
47
 
42
- `--tag`: Run the set of tests matching ALL of the provided single or comma separated list of tags.
48
+ `--test-tag-and`: Run the set of tests matching ALL of the provided single or comma-separated list of tags.
43
49
 
44
- `--exclude-tag`: Run the set of tests that do not contain ANY of the provided single or command separated list of tags
50
+ `--test-tag-or`: Run the set of tests matching ANY of the provided single or comma-separated list of tags.
45
51
 
46
- To do set intersection combine `--tag` and `--exclude-tag`.
52
+ `--test-tag-exclude`: Run the set of tests that do not contain ANY of the provided single or comma-separated list of tags.
47
53
 
48
- Beaker will raise an error if `--tag` & `--exclude-tag` contain the same tag, however.
54
+ Beaker will raise an error if `--test-tag-and` & `--test-tag-exclude` contain the same tag, however.
55
+
56
+ Beaker will also raise an error if you use both `--test-tag-or` & `--test-tag-and`, because
57
+ it won't be able to determine which order they should be used in.
49
58
 
50
59
  ## CLI Examples
51
60
 
52
61
  Execute all ‘long_running’ tests.
53
62
 
54
- $ beaker --tests path/to/tests --tag long_running
63
+ $ beaker --tests path/to/tests --test-tag-and long_running
55
64
 
56
65
  Execute all tests, except those that are ‘feature_test’
57
66
 
58
- $ beaker --tests path/to/tests --exclude-tag feature_test
67
+ $ beaker --tests path/to/tests --test-tag-exclude feature_test
59
68
 
60
69
  Execute all tests that are long_running but not feature_test
61
70
 
62
- $ beaker --tests path/to/tests --tag long_running --exclude-tag feature_test
71
+ $ beaker --tests path/to/tests --test-tag-and long_running --test-tag-exclude feature_test
63
72
 
64
73
  Execute all tests marked both 'long_running' and 'feature_test'
65
74
 
66
- $ beaker --tests /path/to/tests --tags long_running,feature_test
75
+ $ beaker --tests /path/to/tests --test-tag-and long_running,feature_test
67
76
 
68
77
  ## Environment Variable Support
69
78
 
70
- Equivalent to `--tag`:
79
+ Equivalent to `--test-tag-and`:
80
+
81
+ BEAKER_TEST_TAG_AND=long_running,feature_test
82
+
83
+ Equivalent to `--test-tag-or`:
71
84
 
72
- BEAKER_TAG=long_running,feature_test
85
+ BEAKER_TEST_TAG_OR=long_running,feature_test
73
86
 
74
- Equivalent to `--no-tag`:
87
+ Equivalent to `--test-tag-exclude`:
75
88
 
76
- BEAKER_EXCLUDE_TAG=long_running,feature_test
89
+ BEAKER_TEST_TAG_EXCLUDE=long_running,feature_test
@@ -24,8 +24,26 @@ and details of all method arguments are documented there as well. Check it out,
24
24
  and with the right use, you won't need to preserve hosts at all to debug any
25
25
  test failures.
26
26
 
27
+ # Challenges
28
+
29
+ ## Conditionally Saving Files From SUTs
30
+
31
+ One thing that people tend to want from this functionality is to only archive
32
+ files from SUTs when a beaker run has failed. At this point, beaker does not
33
+ have access to other suites from a current one. This means that in practice,
34
+ a post-suite (where one would typically put archiving and other post-processes)
35
+ will not be able to archive files ONLY IF the test suite has had any failures
36
+ or errors.
37
+
38
+ Our suggestion to get the functionality required would be to have beaker always
39
+ archive the appropriate files in the post-suite of your tests, but then only
40
+ have Jenkins (or your job running system, whatever that may be) conditionally
41
+ take them from the beaker coordinator to whatever external archive system you
42
+ rely on for later analysis. This can both get you the files that you need from
43
+ the SUTs and save on space, as only files that need analysis will be kept.
44
+
27
45
  # When Did This Come Out?
28
46
 
29
47
  `archive_file_from` was originally added to the DSL in beaker
30
48
  [2.48.0](https://github.com/puppetlabs/beaker/releases/tag/2.48.0), released on
31
- [July 27, 2016](https://github.com/puppetlabs/beaker/blob/master/HISTORY.md#2480---27-jul-2016-47d3aa18).
49
+ [July 27, 2016](https://github.com/puppetlabs/beaker/blob/master/HISTORY.md#2480---27-jul-2016-47d3aa18).
@@ -9,9 +9,26 @@ assumptions.
9
9
 
10
10
  # Credentials File
11
11
 
12
- Beaker uses credentials from a .fog file for authentication.
13
- By default, the file is located under the user's home directory. This helps to keep the credentials confidential.
14
- The path of .fog file can be changed by setting the 'dot_fog' option.
12
+ Beaker uses credentials from a `.fog` file for authentication. This file came
13
+ from using the [fog cloud services library](http://fog.io). Beaker now only uses
14
+ fog functionality in the openstack hypervisor, but we still use the `.fog` file
15
+ for a credentials store.
16
+
17
+ By default, the file is located under the user's home directory. This helps to
18
+ keep the credentials confidential. The path of `.fog` file can be changed by
19
+ setting the `dot_fog` global beaker option.
20
+
21
+ The `.fog` file is written in YAML. The keys are particular to the service that
22
+ they correspond to, and each hypervisor's documentation should include the keys
23
+ that are needed for it. An example `.fog` file is below:
24
+
25
+ ```yaml
26
+ :default:
27
+ :vsphere_server: 'vsphere.example.com'
28
+ :vsphere_username: 'joe'
29
+ :vsphere_password: 'MyP@$$w0rd'
30
+ :vmpooler_token: 'randomtokentext'
31
+ ```
15
32
 
16
33
  # External Hypervisors
17
34
 
@@ -20,6 +20,7 @@ hypervisor: ec2
20
20
  hypervisor: ec2
21
21
  amisize: c1.medium
22
22
  snapshot: pe
23
+ user: ec2-user
23
24
  centos-5-64-1:
24
25
  roles:
25
26
  - agent
@@ -28,6 +29,7 @@ hypervisor: ec2
28
29
  hypervisor: ec2
29
30
  amisize: c1.medium
30
31
  snapshot: pe
32
+ user: ec2-user
31
33
  CONFIG:
32
34
  nfs_server: none
33
35
  consoleport: 443
@@ -75,3 +77,5 @@ AMI:
75
77
  Size of the [EBS Volume](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) that will be attached to the EC2 instance.
76
78
  ####`vpc_id`####
77
79
  ID of the [VPC](https://aws.amazon.com/vpc/) to create the instances in. If not provided will either use the default VPC for the provided region (marked as `isDefault`), otherwise falls back to `nil`. If subnet information is provided (`subnet_id`/`subnet_ids`) this must be defined.
80
+ ####`user`####
81
+ By default root login is not allowed with Amazon Linux. Setting it to ec2-user will trigger `sshd_config` and `authorized_keys` changes by beaker.
@@ -0,0 +1,24 @@
1
+ [vmpooler](https://github.com/puppetlabs/vmpooler) is a puppet-built abstraction
2
+ layer over vSphere infrastructure that pools VMs to be used by beaker & other
3
+ systems.
4
+
5
+ beaker's vmpooler hypervisor interacts with vmpooler to get Systems Under Test
6
+ (SUTs) for testing purposes.
7
+
8
+ # Tokens
9
+
10
+ Using tokens will allow you to extend your VMs lifetime, as well as interact
11
+ with vmpooler and your VMs in more complex ways. You can have beaker do these
12
+ same things by providing your `vmpooler_token` in the `~/.fog` file. For more
13
+ info about how the `.fog` file works, please refer to the
14
+ [hypervisor README](README.md).
15
+
16
+ An example of a `.fog` file with just the vmpooler details is below:
17
+ ```yaml
18
+ :default:
19
+ :vmpooler_token: 'randomtokentext'
20
+ ```
21
+
22
+ Users with Puppet credentials can follow our instructions for getting & using
23
+ vmpooler tokens in our
24
+ [internal documentation](https://confluence.puppetlabs.com/pages/viewpage.action?spaceKey=SRE&title=Generating+and+using+vmpooler+tokens).
@@ -7,9 +7,6 @@ To do this create a `~/.fog` file with your vSphere credentials:
7
7
  :vsphere_server: 'vsphere.example.com'
8
8
  :vsphere_username: 'joe'
9
9
  :vsphere_password: 'MyP@$$w0rd'
10
- :vmpooler_token: 'randomtokentext'
11
-
12
- The vmpooler_token can be used with https://github.com/puppetlabs/vmpooler. Users with Puppet Labs credentials can follow directions for getting and using tokens at https://confluence.puppetlabs.com/display/QE/Generating+and+using+vmpooler+tokens.
13
10
 
14
11
  These follow the conventions used by Cloud Provisioner and Fog.
15
12
 
@@ -1,10 +1,10 @@
1
- #Beaker Installation
1
+ # Beaker Installation
2
2
 
3
3
  In most cases, beaker is running on a system separate from the SUT; we will commonly refer to this system as the beaker coordinator. This page outlines how to install requirements for the beaker coordinator and options for the installation of beaker itself.
4
4
 
5
5
  ## Beaker Requirements
6
6
 
7
- * Ruby >= 2.2.5
7
+ * Ruby >= 2.1.8 (but we [only test on >= 2.2.5](installation.md#ruby-version))
8
8
  * libxml2, libxslt (needed for the [Nokogiri](http://nokogiri.org/tutorials/installing_nokogiri.html) gem)
9
9
  * g++ (needed for the [unf_ext](http://rubydoc.info/gems/unf_ext/) gem)
10
10
  * curl (needed for some DSL functions to be able to execute successfully)
@@ -17,13 +17,13 @@ On an EL or Fedora system use:
17
17
 
18
18
  sudo yum install make gcc gcc-c++ libxml2-devel libxslt-devel ruby-devel
19
19
 
20
- ##Installing Beaker
21
- ###From Gem (Preferred)
20
+ ## Installing Beaker
21
+ ### From Gem (Preferred)
22
22
 
23
23
  $ gem install beaker
24
24
  $ beaker --help
25
25
 
26
- ###From Latest Git
26
+ ### From Latest Git
27
27
 
28
28
  If you need the latest and greatest (and mostly likely broken/untested/no warranty) beaker code.
29
29
 
@@ -35,7 +35,7 @@ If you need the latest and greatest (and mostly likely broken/untested/no warran
35
35
  $ bundle install
36
36
  $ bundle exec beaker --help
37
37
 
38
- ###From Latest Git, As Installed Gem
38
+ ### From Latest Git, As Installed Gem
39
39
 
40
40
  If you need the latest and greatest, but prefer to work from gem instead of through bundler.
41
41
 
@@ -45,7 +45,7 @@ If you need the latest and greatest, but prefer to work from gem instead of thro
45
45
  $ gem build beaker.gemspec
46
46
  $ gem install ./beaker-*.gem
47
47
 
48
- ###Special Case Installation
48
+ ### Special Case Installation
49
49
 
50
50
  The beaker gem can be built and installed in the context of the current test suite by adding the github repos as the source in the Gemspec file (see <a href = "http://bundler.io/git.html">bundler git documentation</a>).
51
51
 
@@ -57,3 +57,18 @@ The beaker gem can be built and installed in the context of the current test sui
57
57
  gem 'chromedriver2-helper'
58
58
  gem 'beaker', :github => 'puppetlabs/beaker', :branch => 'master', :ref => 'fffe7'
59
59
  end
60
+
61
+ ## Ruby Version
62
+
63
+ In moving to beaker 3.0, we added in a hard requirement that a
64
+ beaker test writer be using Ruby 2.2.5 or higher. Since Puppet
65
+ has versions that support earlier versions of Ruby, this made
66
+ writing tests more difficult than it needed to be.
67
+
68
+ In order to make this easier, in beaker 3.13.0 we've relaxed
69
+ this requirement to Ruby 2.1.8. Note that the beaker team does
70
+ not internally test Ruby versions below 2.2.5, and that if bugs
71
+ are submitted that are found to be specific to versions below
72
+ 2.2.5, they will not be worked on by the beaker team. This
73
+ doesn't mean we won't merge fixes to bugs that are specific to
74
+ those versions that are submitted by the community, however.