beaker 2.27.0 → 2.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +8 -8
  2. data/HISTORY.md +378 -2
  3. data/README.md +1 -3
  4. data/acceptance/config/acceptance-options.rb +3 -0
  5. data/acceptance/fixtures/files/failing_shell_script.txt +3 -0
  6. data/acceptance/fixtures/files/retry_script.txt +14 -0
  7. data/acceptance/fixtures/files/shell_script_with_output.txt +3 -0
  8. data/acceptance/fixtures/files/simple_text_file.txt +3 -0
  9. data/acceptance/fixtures/files/sles-11-x86_64.repo +5 -0
  10. data/acceptance/lib/helpers/test_helper.rb +111 -0
  11. data/acceptance/tests/base/dsl/helpers/configuration_test.rb +17 -0
  12. data/acceptance/tests/base/dsl/helpers/host_helpers/add_system32_hosts_entry_test.rb +50 -0
  13. data/acceptance/tests/base/dsl/helpers/host_helpers/backup_the_file_test.rb +64 -0
  14. data/acceptance/tests/base/dsl/helpers/host_helpers/check_for_package_test.rb +100 -0
  15. data/acceptance/tests/base/dsl/helpers/host_helpers/create_remote_file_test.rb +201 -0
  16. data/acceptance/tests/base/dsl/helpers/host_helpers/create_tmpdir_on_test.rb +68 -0
  17. data/acceptance/tests/base/dsl/helpers/host_helpers/curl_on_test.rb +48 -0
  18. data/acceptance/tests/base/dsl/helpers/host_helpers/curl_with_retries_test.rb +28 -0
  19. data/acceptance/tests/base/dsl/helpers/host_helpers/deploy_package_repo_test.rb +142 -0
  20. data/acceptance/tests/base/dsl/helpers/host_helpers/echo_on_test.rb +13 -0
  21. data/acceptance/tests/base/dsl/helpers/host_helpers/install_package_test.rb +67 -0
  22. data/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb +109 -0
  23. data/acceptance/tests/base/dsl/helpers/host_helpers/retry_on_test.rb +42 -0
  24. data/acceptance/tests/base/dsl/helpers/host_helpers/rsync_to_test.rb +143 -0
  25. data/acceptance/tests/base/dsl/helpers/host_helpers/run_cron_on_test.rb +242 -0
  26. data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_on_test.rb +69 -0
  27. data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_test.rb +53 -0
  28. data/acceptance/tests/base/dsl/helpers/host_helpers/scp_from_test.rb +53 -0
  29. data/acceptance/tests/base/dsl/helpers/host_helpers/scp_to_test.rb +54 -0
  30. data/acceptance/tests/base/dsl/helpers/host_helpers/shell_test.rb +51 -0
  31. data/acceptance/tests/base/dsl/helpers/host_helpers/upgrade_package_test.rb +92 -0
  32. data/acceptance/tests/base/dsl/install_utils/clone_git_repo_on_test.rb +47 -0
  33. data/acceptance/tests/base/{host.rb → host_test.rb} +2 -0
  34. data/acceptance/tests/hypervisor/{communication.rb → communication_test.rb} +0 -0
  35. data/acceptance/tests/load_path_bootstrap.rb +10 -0
  36. data/acceptance/tests/puppet/{install_smoke.rb → install_smoke_test.rb} +0 -0
  37. data/beaker.gemspec +1 -1
  38. data/docs/Access-the-Live-Test-Console-with-Pry.md +305 -0
  39. data/docs/Argument-Processing-and-Precedence.md +325 -0
  40. data/docs/Beaker-Installation.md +59 -0
  41. data/docs/Beaker-Owners-and-Reviewers.md +16 -0
  42. data/docs/Beaker-Test-Tagging.md +76 -0
  43. data/docs/Beaker-with-Masterless-Puppet.md +42 -0
  44. data/docs/Creating-A-Test-Environment.md +91 -0
  45. data/docs/Docker-Support.md +129 -0
  46. data/docs/EC2-Support.md +77 -0
  47. data/docs/Example-Vagrant-Hosts-Files.md +66 -0
  48. data/docs/File-a-Beaker-Bug.md +3 -0
  49. data/docs/Google-Compute-Engine-Support.md +41 -0
  50. data/docs/How-To-Beaker.md +7 -0
  51. data/docs/How-To-Use-User-Password-Authentication-with-Beaker.md +53 -0
  52. data/docs/How-to-Write-a-Beaker-Test-for-a-Module.md +145 -0
  53. data/docs/Lets-Write-a-Test.md +73 -0
  54. data/docs/Openstack-Support.md +32 -0
  55. data/docs/Overview.md +31 -0
  56. data/docs/README.md +43 -0
  57. data/docs/Roles-What-Are-They.md +44 -0
  58. data/docs/Shared-Options-for-Executing-Beaker-Commands.md +43 -0
  59. data/docs/Solaris-Support.md +10 -0
  60. data/docs/The-Beaker-DSL.md +283 -0
  61. data/docs/The-Command-Line.md +24 -0
  62. data/docs/Types,-Puppet-4,-and-the-All-In-One-Agent.md +13 -0
  63. data/docs/VMWare-Fusion-Support.md +36 -0
  64. data/docs/Vagrant-Support.md +47 -0
  65. data/docs/beaker-vs.-beaker-rspec.md +87 -0
  66. data/docs/hosts/README.md +8 -0
  67. data/docs/hosts/eos.md +30 -0
  68. data/docs/hypervisors/README.md +8 -0
  69. data/docs/hypervisors/aws.md +143 -0
  70. data/docs/vSphere-Support.md +46 -0
  71. data/lib/beaker/dsl/helpers/host_helpers.rb +2 -4
  72. data/lib/beaker/dsl/helpers/puppet_helpers.rb +45 -11
  73. data/lib/beaker/dsl/install_utils/foss_utils.rb +20 -23
  74. data/lib/beaker/dsl/install_utils/module_utils.rb +4 -0
  75. data/lib/beaker/dsl/install_utils/pe_utils.rb +2 -6
  76. data/lib/beaker/dsl/patterns.rb +1 -1
  77. data/lib/beaker/host.rb +3 -0
  78. data/lib/beaker/host/eos.rb +56 -0
  79. data/lib/beaker/host/mac/pkg.rb +1 -1
  80. data/lib/beaker/host/unix/pkg.rb +36 -0
  81. data/lib/beaker/hypervisor/aws_sdk.rb +1 -1
  82. data/lib/beaker/hypervisor/vagrant.rb +3 -3
  83. data/lib/beaker/logger.rb +1 -0
  84. data/lib/beaker/options/presets.rb +5 -0
  85. data/lib/beaker/shared/host_manager.rb +7 -4
  86. data/lib/beaker/version.rb +1 -1
  87. data/spec/beaker/dsl/helpers/puppet_helpers_spec.rb +87 -0
  88. data/spec/beaker/dsl/install_utils/foss_utils_spec.rb +53 -20
  89. data/spec/beaker/dsl/install_utils/module_utils_spec.rb +1 -1
  90. data/spec/beaker/dsl/install_utils/pe_utils_spec.rb +7 -14
  91. data/spec/beaker/host/eos_spec.rb +65 -0
  92. data/spec/beaker/host/unix/pkg_spec.rb +42 -0
  93. data/spec/beaker/hypervisor/aws_sdk_spec.rb +17 -56
  94. data/spec/beaker/hypervisor/vagrant_spec.rb +1 -1
  95. data/spec/beaker/logger_spec.rb +1 -1
  96. data/spec/mocks.rb +0 -13
  97. metadata +76 -6
  98. data/acceptance/tests/dsl/install_utils/clone_git_repo_on.rb +0 -50
@@ -0,0 +1,325 @@
1
+ Beaker uses arguments and settings from a variety of sources to determine how your test run is executed.
2
+
3
+ * [Environment Variables](Argument-Processing-and-Precedence.md#environment-variables)
4
+ * [Host/Config File Options](Argument-Processing-and-Precedence.md#host-file-options)
5
+ * [ARGV](Argument-Processing-and-Precedence.md#argv-or-provided-arguments-array)
6
+ * [Supported Command Line Arguments](Argument-Processing-and-Precedence.md#supported-command-line-arguments)
7
+ * [Options File Values](Argument-Processing-and-Precedence.md#options-file-values)
8
+ * [Example Options File](Argument-Processing-and-Precedence.md#example-options-file)
9
+ * [Default Values](Argument-Processing-and-Precedence.md#default-values)
10
+ * [Beaker Default Values](Argument-Processing-and-Precedence.md#beaker-default-values)
11
+ * [Priority of Settings](Argument-Processing-and-Precedence.md#priority-of-settings)
12
+
13
+
14
+ ## Environment Variables
15
+ ###Supported Environment Variables:
16
+ ```
17
+ BEAKER VARIABLE NAME => ENVIRONMENT VARIABLE NAME
18
+ :home => 'HOME',
19
+ :project => ['BEAKER_PROJECT', 'BEAKER_project'],
20
+ :department => ['BEAKER_DEPARTMENT', 'BEAKER_department'],
21
+ :jenkins_build_url => ['BEAKER_BUILD_URL', 'BUILD_URL'],
22
+ :created_by => ['BEAKER_CREATED_BY'],
23
+ :consoleport => ['BEAKER_CONSOLEPORT', 'consoleport'],
24
+ :is_pe => ['BEAKER_IS_PE', 'IS_PE'],
25
+ :pe_dir => ['BEAKER_PE_DIR', 'pe_dist_dir'],
26
+ :pe_version_file => ['BEAKER_PE_VERSION_FILE', 'pe_version_file'],
27
+ :pe_ver => ['BEAKER_PE_VER', 'pe_ver'],
28
+ :forge_host => ['BEAKER_FORGE_HOST', 'forge_host'],
29
+ :package_proxy => ['BEAKER_PACKAGE_PROXY'],
30
+ :release_apt_repo_url => ['BEAKER_RELEASE_APT_REPO', 'RELEASE_APT_REPO'],
31
+ :release_yum_repo_url => ['BEAKER_RELEASE_YUM_REPO', 'RELEASE_YUM_REPO'],
32
+ :dev_builds_url => ['BEAKER_DEV_BUILDS_URL', 'DEV_BUILDS_URL'],
33
+ :vbguest_plugin => ['BEAKER_VB_GUEST_PLUGIN', 'BEAKER_vb_guest_plugin'],
34
+ :answers => [/\Aq_*'/],
35
+ ```
36
+ ## Host File Options
37
+ Any values included for an individual host in a host file.
38
+ ```
39
+ HOSTS:
40
+ pe-ubuntu-lucid:
41
+ roles:
42
+ - agent
43
+ - dashboard
44
+ - database
45
+ - master
46
+ vmname : pe-ubuntu-lucid
47
+ platform: ubuntu-10.04-i386
48
+ snapshot : clean-w-keys
49
+ hypervisor : fusion
50
+ ```
51
+ `roles`, `vmname`, `platform`, `snapshot` and `hypervisor` are all options set for the host `pe-ubuntu-lucid`. Any additional values can be included on a per-host basis by adding arbitrary key-value pairs.
52
+
53
+ ## `CONFIG` section of Hosts File
54
+ ```
55
+ HOSTS:
56
+ pe-ubuntu-lucid:
57
+ roles:
58
+ - agent
59
+ - dashboard
60
+ - database
61
+ - master
62
+ vmname : pe-ubuntu-lucid
63
+ platform: ubuntu-10.04-i386
64
+ snapshot : clean-w-keys
65
+ hypervisor : fusion
66
+ CONFIG:
67
+ nfs_server: none
68
+ consoleport: 443
69
+ pe_dir: http://path/to/pe/builds
70
+ ```
71
+ `nfs_server`, `consoleport`, `pe_dir` are examples of `CONFIG` section arguments. The values of these will be rolled up into each host defined, thus `host[pe_dir]` is valid.
72
+
73
+ ## ARGV or Provided Arguments Array
74
+ ```
75
+ $ beaker --debug --tests acceptance/tests/base/host.rb --hosts configs/fusion/winfusion.cfg
76
+ ```
77
+ `--debug`, `--tests acceptance/tests/base/host.rb` and `--hosts configs/fusion/winfusion.cfg` are the provided command line values for this test run.
78
+
79
+ ###Supported Command Line Arguments:
80
+ ```
81
+ $ beaker --help
82
+ Usage: beaker [options...]
83
+ -h, --hosts FILE Use host configuration FILE
84
+ (default sample.cfg)
85
+ -o, --options-file FILE Read options from FILE
86
+ This should evaluate to a ruby hash.
87
+ CLI optons are given precedence.
88
+ --type TYPE one of git, foss, or pe
89
+ used to determine underlying path structure of puppet install
90
+ (default pe)
91
+ --helper PATH/TO/SCRIPT Ruby file evaluated prior to tests
92
+ (a la spec_helper)
93
+ --load-path /PATH/TO/DIR,/ADDITIONAL/DIR/PATHS
94
+ Add paths to LOAD_PATH
95
+ -t /PATH/TO/DIR,/ADDITIONA/DIR/PATHS,/PATH/TO/FILE.rb,
96
+ --tests Execute tests from paths and files
97
+ --pre-suite /PRE-SUITE/DIR/PATH,/ADDITIONAL/DIR/PATHS,/PATH/TO/FILE.rb
98
+ Path to project specific steps to be run BEFORE testing
99
+ --post-suite /POST-SUITE/DIR/PATH,/OPTIONAL/ADDITONAL/DIR/PATHS,/PATH/TO/FILE.rb
100
+ Path to project specific steps to be run AFTER testing
101
+ --[no-]provision Do not provision vm images before testing
102
+ (default: true)
103
+ --[no-]configure Do not configure vm images before testing
104
+ (default: true)
105
+ --preserve-hosts [MODE] How should SUTs be treated post test
106
+ Possible values:
107
+ always (keep SUTs alive)
108
+ onfail (keep SUTs alive if failures occur during testing)
109
+ onpass (keep SUTs alive if no failures occur during testing)
110
+ never (cleanup SUTs - shutdown and destroy any changes made during testing)
111
+ (default: never)
112
+ --root-keys Install puppetlabs pubkeys for superuser
113
+ (default: false)
114
+ --keyfile /PATH/TO/SSH/KEY Specify alternate SSH key
115
+ (default: ~/.ssh/id_rsa)
116
+ --timeout TIMEOUT (vCloud only) Specify a provisioning timeout (in seconds)
117
+ (default: 300)
118
+ -i, --install URI Install a project repo/app on the SUTs
119
+ Provide full git URI or use short form KEYWORD/name
120
+ supported keywords: PUPPET, FACTER, HIERA, HIERA-PUPPET
121
+ -m, --modules URI Select puppet module git install URI
122
+ -q, --[no-]quiet Do not log output to STDOUT
123
+ (default: false)
124
+ --[no-]color Do not display color in log output
125
+ (default: true)
126
+ --log-level LEVEL Log level
127
+ Supported LEVEL keywords:
128
+ trace : all messages, full stack trace of errors, file copy details
129
+ debug : all messages, plus full stack trace of errors
130
+ verbose : all messages
131
+ info : info messages, notifications and warnings
132
+ notify : notifications and warnings
133
+ warn : warnings only
134
+ (default: info)
135
+ -d, --[no-]dry-run Report what would happen on targets
136
+ (default: false)
137
+ --fail-mode [MODE] How should the harness react to errors/failures
138
+ Possible values:
139
+ fast (skip all subsequent tests)
140
+ slow (attempt to continue run post test failure)
141
+ stop (DEPRECATED, please use fast)
142
+ (default: slow)
143
+ --[no-]ntp Sync time on SUTs before testing
144
+ (default: false)
145
+ --repo-proxy Proxy packaging repositories on ubuntu, debian, cumulus and solaris-11
146
+ (default: false)
147
+ --add-el-extras Add Extra Packages for Enterprise Linux (EPEL) repository to el-* hosts
148
+ (default: false)
149
+ --package-proxy URL Set proxy url for package managers (yum and apt)
150
+ --[no-]validate Validate that SUTs are correctly provisioned before running tests
151
+ (default: true)
152
+ --version Report currently running version of beaker
153
+ --parse-only Display beaker parsed options and exit
154
+ --help Display this screen
155
+ -c, --config FILE DEPRECATED, use --hosts
156
+ --[no-]debug DEPRECATED, use --log-level
157
+ -x, --[no-]xml DEPRECATED - JUnit XML now generated by default
158
+ --collect-perf-data Use sysstat on linux hosts to collect performance and load data
159
+ ```
160
+
161
+ ## Options File Values
162
+ ```
163
+ $ beaker --options-file additional_options.rb
164
+ ```
165
+ The additional options file is provided with `--options-file /path/to/file.rb`. The file itself must contain a properly formatted Ruby hash. You can override any beaker internal option variable in the options file hash, but you have to associate the new value with the correct, internal key name.
166
+
167
+ ### Example Options File
168
+ ```
169
+ {
170
+ :hosts_file => 'hosts.cfg',
171
+ :ssh => {
172
+ :keys => ["/Users/anode/.ssh/id_rsa-acceptance"],
173
+ },
174
+ :timeout => 1200,
175
+ :log_level => 'debug',
176
+ :fail_mode => 'slow',
177
+ :tests => [
178
+ 'tests/agent/agent_disable_lockfile.rb',
179
+ 'tests/agent/fallback_to_cached_catalog.rb',
180
+ ],
181
+ :forge_host => 'api-forge-aio01-petest.puppetlabs.com',
182
+ 'service-wait' => true,
183
+ 'xml' => true,
184
+ }
185
+ ```
186
+ ## Default Values
187
+ Values already included in Beaker as defaults for required arguments.
188
+ ### Beaker Default Values
189
+ ```
190
+ {
191
+ :project => 'Beaker',
192
+ :department => 'unknown',
193
+ :created_by => ENV['USER'] || ENV['USERNAME'] || 'unknown',
194
+ :openstack_api_key => ENV['OS_PASSWORD'],
195
+ :openstack_username => ENV['OS_USERNAME'],
196
+ :openstack_auth_url => "#{ENV['OS_AUTH_URL']}/tokens",
197
+ :openstack_tenant => ENV['OS_TENANT_NAME'],
198
+ :jenkins_build_url => nil,
199
+ :validate => true,
200
+ :configure => true,
201
+ :log_level => 'info',
202
+ :trace_limit => 10,
203
+ :"master-start-curl-retries" => 120,
204
+ :masterless => false,
205
+ :options_file => nil,
206
+ :type => 'pe',
207
+ :provision => true,
208
+ :preserve_hosts => 'never',
209
+ :root_keys => false,
210
+ :quiet => false,
211
+ :project_root => File.expand_path(File.join(File.dirname(__FILE__), "../")),
212
+ :xml_dir => 'junit',
213
+ :xml_file => 'beaker_junit.xml',
214
+ :xml_stylesheet => 'junit.xsl',
215
+ :log_dir => 'log',
216
+ :log_sut_event => 'sut.log',
217
+ :color => true,
218
+ :dry_run => false,
219
+ :timeout => 300,
220
+ :fail_mode => 'slow',
221
+ :accept_all_exit_codes => false,
222
+ :timesync => false,
223
+ :disable_iptables => false,
224
+ :set_env => true,
225
+ :repo_proxy => false,
226
+ :package_proxy => false,
227
+ :add_el_extras => false,
228
+ :release_apt_repo_url => "http://apt.puppetlabs.com",
229
+ :release_yum_repo_url => "http://yum.puppetlabs.com",
230
+ :dev_builds_url => "http://builds.delivery.puppetlabs.net",
231
+ :epel_url => "http://mirrors.kernel.org/fedora-epel",
232
+ :epel_arch => "i386",
233
+ :epel_6_pkg => "epel-release-6-8.noarch.rpm",
234
+ :epel_5_pkg => "epel-release-5-4.noarch.rpm",
235
+ :consoleport => 443,
236
+ :pe_dir => '/opt/enterprise/dists',
237
+ :pe_version_file => 'LATEST',
238
+ :pe_version_file_win => 'LATEST-win',
239
+ :host_env => {},
240
+ :ssh_env_file => '~/.ssh/environment',
241
+ :profile_d_env_file => '/etc/profile.d/beaker_env.sh',
242
+ :answers => {
243
+ :q_puppet_enterpriseconsole_auth_user_email => 'admin@example.com',
244
+ :q_puppet_enterpriseconsole_auth_password => '~!@#$%^*-/ aZ',
245
+ :q_puppet_enterpriseconsole_smtp_port => 25,
246
+ :q_puppet_enterpriseconsole_smtp_use_tls => 'n',
247
+ :q_verify_packages => 'y',
248
+ :q_puppetdb_password => '~!@#$%^*-/ aZ',
249
+ :q_puppetmaster_enterpriseconsole_port => 443,
250
+ :q_puppet_enterpriseconsole_auth_database_name => 'console_auth',
251
+ :q_puppet_enterpriseconsole_auth_database_user => 'mYu7hu3r',
252
+ :q_puppet_enterpriseconsole_database_name => 'console',
253
+ :q_puppet_enterpriseconsole_database_user => 'mYc0nS03u3r',
254
+ :q_database_root_password => '=ZYdjiP3jCwV5eo9s1MBd',
255
+ :q_database_root_user => 'pe-postgres',
256
+ :q_database_export_dir => '/tmp',
257
+ :q_puppetdb_database_name => 'pe-puppetdb',
258
+ :q_puppetdb_database_user => 'mYpdBu3r',
259
+ :q_database_port => 5432,
260
+ :q_puppetdb_port => 8081,
261
+ :q_classifier_database_user => 'DFGhjlkj',
262
+ :q_database_name => 'pe-classifier',
263
+ :q_classifier_database_password => '~!@#$%^*-/ aZ',
264
+ :q_activity_database_user => 'adsfglkj',
265
+ :q_activity_database_name => 'pe-activity',
266
+ :q_activity_database_password => '~!@#$%^*-/ aZ',
267
+ :q_rbac_database_user => 'RbhNBklm',
268
+ :q_rbac_database_name => 'pe-rbac',
269
+ :q_rbac_database_password => '~!@#$%^*-/ aZ',
270
+ :q_install_update_server => 'y',
271
+ },
272
+ :dot_fog => File.join(ENV['HOME'], '.fog'),
273
+ :ec2_yaml => 'config/image_templates/ec2.yaml',
274
+ :help => false,
275
+ :collect_perf_data => false,
276
+ :ssh => {
277
+ :config => false,
278
+ :paranoid => false,
279
+ :timeout => 300,
280
+ :auth_methods => ["publickey"],
281
+ :port => 22,
282
+ :forward_agent => true,
283
+ :keys => ["#{ENV['HOME']}/.ssh/id_rsa"],
284
+ :user_known_hosts_file => "#{ENV['HOME']}/.ssh/known_hosts",
285
+ }
286
+ }
287
+ ```
288
+
289
+ ## Priority of Settings
290
+ Order of priority is as follows (from highest to lowest):
291
+ 1. Environment variables are given top priority
292
+ 1. Host/Config file options
293
+ 1. `CONFIG` section of the hosts file
294
+ 1. ARGV or Provided Arguments Array
295
+ 1. Options file values
296
+ 1. Default or Preset values are given the lowest priority
297
+
298
+ ### Examples
299
+ 1. If `BEAKER_PE_DIR` environment variable then any and all `pe_dir` settings in the host file, options file and beaker defaults are ignored
300
+ 1. In this case, the `pe_dir` for `pe-ubuntu-lucid` will be `http://ubuntu/path`, while the `pe_dir` for `pe-centos6` will be `https://CONFIG/path`.
301
+ ```
302
+ HOSTS:
303
+ pe-ubuntu-lucid:
304
+ roles:
305
+ - agent
306
+ - dashboard
307
+ - database
308
+ - master
309
+ vmname : pe-ubuntu-lucid
310
+ platform: ubuntu-10.04-i386
311
+ snapshot : clean-w-keys
312
+ hypervisor : fusion
313
+ pe_dir : http://ubuntu/path
314
+ pe-centos6:
315
+ roles:
316
+ - agent
317
+ vmname : pe-centos6
318
+ platform: el-6-i386
319
+ hypervisor : fusion
320
+ snapshot: clean-w-keys
321
+ CONFIG:
322
+ nfs_server: none
323
+ consoleport: 443
324
+ pe_dir: https://CONFIG/path
325
+ ```
@@ -0,0 +1,59 @@
1
+ ## What's Current?
2
+
3
+ * [Latest Gem Release Notes](https://github.com/puppetlabs/beaker/blob/master/HISTORY.md#LATEST)
4
+
5
+ ##Requirements
6
+
7
+ * Ruby 1.9+, 2.1.5 or 2.1.6
8
+ * libxml2, libxslt (needed for the [Nokogiri](http://nokogiri.org/tutorials/installing_nokogiri.html) gem)
9
+ * g++ (needed for the [unf_ext](http://rubydoc.info/gems/unf_ext/) gem)
10
+ * curl (needed for some DSL functions to be able to execute successfully)
11
+
12
+ On a Debian or Ubuntu system you can install these using the command
13
+
14
+ sudo apt-get install ruby-dev libxml2-dev libxslt1-dev g++ zlib1g-dev
15
+
16
+ On an EL or Fedora system use:
17
+
18
+ sudo yum install make gcc gcc-c++ libxml2-devel libxslt-devel ruby-devel
19
+
20
+ ##Installing Beaker
21
+ ###From Gem (Preferred)
22
+
23
+ $ gem install beaker
24
+ $ beaker --help
25
+
26
+ ###From Latest Git
27
+
28
+ If you need the latest and greatest (and mostly likely broken/untested/no warranty) beaker code.
29
+
30
+ * Uses <a href = "http://bundler.io/">bundler</a>
31
+
32
+ <!-- end of list -->
33
+ $ git clone https://github.com/puppetlabs/beaker
34
+ $ cd beaker
35
+ $ bundle install
36
+ $ bundle exec beaker --help
37
+
38
+ ###From Latest Git, As Installed Gem
39
+
40
+ If you need the latest and greatest, but prefer to work from gem instead of through bundler.
41
+
42
+ $ gem uninstall beaker
43
+ $ git clone https://github.com/puppetlabs/beaker
44
+ $ cd beaker
45
+ $ gem build beaker.gemspec
46
+ $ gem install ./beaker-*.gem
47
+
48
+ ###Special Case Installation
49
+
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
+
52
+ source 'https://rubygems.org'
53
+ group :testing do
54
+ gem 'cucumber', '~> 1.3.6'
55
+ gem 'site_prism'
56
+ gem 'selenium-webdriver'
57
+ gem 'chromedriver2-helper'
58
+ gem 'beaker', :github => 'puppetlabs/beaker', :branch => 'master', :ref => 'fffe7'
59
+ end
@@ -0,0 +1,16 @@
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)
@@ -0,0 +1,76 @@
1
+ ## What is This?
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:
4
+
5
+ - Run groups of tests separately from the same testing codebase
6
+ - Declare different actions that should be taken when a test fails
7
+ - Make new tests go through a provisional process before being considered solid tests
8
+
9
+ ## How Tagging Works
10
+
11
+ Add tags to a Beaker test at the beginning, like you would if you were using confine. Things to stay aware of:
12
+
13
+ - A test that is not executed due to a tag will be considered a ‘skipped’ test
14
+ - Tags are free form strings and will not be subjected to any correctness testing
15
+ - Tags are NOT case sensitive
16
+ - Tagging was added after Beaker 2.14.1. If you're using that version or older, this isn't available
17
+
18
+ ## Test Examples
19
+
20
+ Single tag example:
21
+
22
+ tag ‘long_running’
23
+
24
+ Multiple tag example:
25
+
26
+ tag ‘long_running’, 'feature_test’
27
+
28
+ Preferred style block example:
29
+
30
+ test_name “my test” do
31
+ tag “filter1”,”filter2”
32
+
33
+ end
34
+
35
+ Preferred style no-block example:
36
+
37
+ test_name “my test”
38
+ tag “filter1”,”filter2”
39
+
40
+ ## Command Line Interaction
41
+
42
+ `--tag`: Run the set of tests matching ALL of the provided single or comma separated list of tags.
43
+
44
+ `--exclude-tag`: Run the set of tests that do not contain ANY of the provided single or command separated list of tags
45
+
46
+ To do set intersection combine `--tag` and `--exclude-tag`.
47
+
48
+ Beaker will raise an error if `--tag` & `--exclude-tag` contain the same tag, however.
49
+
50
+ ## CLI Examples
51
+
52
+ Execute all ‘long_running’ tests.
53
+
54
+ $ beaker --tests path/to/tests --tag long_running
55
+
56
+ Execute all tests, except those that are ‘feature_test’
57
+
58
+ $ beaker --tests path/to/tests --exclude-tag feature_test
59
+
60
+ Execute all tests that are long_running but not feature_test
61
+
62
+ $ beaker --tests path/to/tests --tag long_running --exclude-tag feature_test
63
+
64
+ Execute all tests marked both 'long_running' and 'feature_test'
65
+
66
+ $ beaker --tests /path/to/tests --tags long_running,feature_test
67
+
68
+ ## Environment Variable Support
69
+
70
+ Equivalent to `--tag`:
71
+
72
+ BEAKER_TAG=long_running,feature_test
73
+
74
+ Equivalent to `--no-tag`:
75
+
76
+ BEAKER_EXCLUDE_TAG=long_running,feature_test