├── .gitignore ├── spec ├── spec_helper.rb └── acceptance │ └── example_spec.rb ├── lib ├── beaker-rspec │ ├── version.rb │ ├── rake_task.rb │ ├── beaker_shim.rb │ ├── spec_helper.rb │ └── helpers │ │ └── serverspec.rb └── beaker-rspec.rb ├── .rubocop.yml ├── .github ├── dependabot.yml ├── release.yml └── workflows │ ├── test.yml │ └── release.yml ├── Rakefile ├── Gemfile ├── beaker-rspec.gemspec ├── .rubocop_todo.yml ├── LICENSE ├── README.md ├── HISTORY.md └── CHANGELOG.md /.gitignore: -------------------------------------------------------------------------------- 1 | Gemfile.lock 2 | .bundle 3 | *.swp 4 | log 5 | .vagrant 6 | *.gem 7 | .vendor/ 8 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV['RS_SETFILE'] ||= 'centos9-64' 4 | 5 | require 'beaker-rspec' 6 | -------------------------------------------------------------------------------- /lib/beaker-rspec/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module BeakerRSpec 4 | module Version 5 | STRING = '9.0.0' 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | inherit_from: .rubocop_todo.yml 3 | inherit_gem: 4 | voxpupuli-rubocop: rubocop.yml 5 | 6 | AllCops: 7 | TargetRubyVersion: 3.2 8 | -------------------------------------------------------------------------------- /lib/beaker-rspec/rake_task.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rspec/core/rake_task' 4 | 5 | RSpec::Core::RakeTask.new(:beaker) do |c| 6 | c.pattern = 'spec/acceptance/**/*_spec.rb' 7 | end 8 | -------------------------------------------------------------------------------- /lib/beaker-rspec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module BeakerRSpec 4 | require 'beaker' 5 | 6 | require 'beaker-rspec/beaker_shim' 7 | require 'beaker-rspec/spec_helper' 8 | require 'beaker-rspec/version' 9 | end 10 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # raise PRs for gem updates 4 | - package-ecosystem: bundler 5 | directory: "/" 6 | schedule: 7 | interval: daily 8 | time: "13:00" 9 | open-pull-requests-limit: 10 10 | 11 | # Maintain dependencies for GitHub Actions 12 | - package-ecosystem: github-actions 13 | directory: "/" 14 | schedule: 15 | interval: daily 16 | time: "13:00" 17 | open-pull-requests-limit: 10 18 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'beaker-rspec/rake_task' 4 | 5 | task default: :beaker 6 | 7 | begin 8 | require 'rubygems' 9 | require 'github_changelog_generator/task' 10 | rescue LoadError 11 | # github_changelog_generator isn't available, so we won't define a rake task with it 12 | else 13 | GitHubChangelogGenerator::RakeTask.new :changelog do |config| 14 | config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file." 15 | config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions] 16 | config.user = 'voxpupuli' 17 | config.project = 'beaker-rspec' 18 | config.future_release = Gem::Specification.load("#{config.project}.gemspec").version 19 | end 20 | end 21 | 22 | begin 23 | require 'voxpupuli/rubocop/rake' 24 | rescue LoadError 25 | # the voxpupuli-rubocop gem is optional 26 | end 27 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes 3 | 4 | changelog: 5 | exclude: 6 | labels: 7 | - duplicate 8 | - invalid 9 | - modulesync 10 | - question 11 | - skip-changelog 12 | - wont-fix 13 | - wontfix 14 | - github_actions 15 | 16 | categories: 17 | - title: Breaking Changes 🛠 18 | labels: 19 | - backwards-incompatible 20 | 21 | - title: New Features 🎉 22 | labels: 23 | - enhancement 24 | 25 | - title: Bug Fixes 🐛 26 | labels: 27 | - bug 28 | - bugfix 29 | 30 | - title: Documentation Updates 📚 31 | labels: 32 | - documentation 33 | - docs 34 | 35 | - title: Dependency Updates ⬆️ 36 | labels: 37 | - dependencies 38 | 39 | - title: Other Changes 40 | labels: 41 | - "*" 42 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source ENV['GEM_SOURCE'] || 'https://rubygems.org' 4 | 5 | def location_for(place, fake_version = nil) 6 | if place =~ /^(git:[^#]*)#(.*)/ 7 | [fake_version, { git: Regexp.last_match(1), branch: Regexp.last_match(2), require: false }].compact 8 | elsif place =~ %r{^file://(.*)} 9 | ['>= 0', { path: File.expand_path(Regexp.last_match(1)), require: false }] 10 | else 11 | [place, { require: false }] 12 | end 13 | end 14 | 15 | if (beaker_version = ENV.fetch('BEAKER_VERSION', nil)) 16 | gem 'beaker', *location_for(beaker_version) 17 | end 18 | 19 | case ENV.fetch('BEAKER_HYPERVISOR', nil) 20 | when 'docker' 21 | gem 'beaker-docker' 22 | when 'vagrant', 'vagrant_libvirt' 23 | gem 'beaker-vagrant' 24 | when 'vmpooler' 25 | gem 'beaker-vmpooler', '~> 1.3' 26 | end 27 | 28 | group :release, optional: true do 29 | gem 'faraday-retry', '~> 2.1', require: false 30 | gem 'github_changelog_generator', '~> 1.16.4', require: false 31 | end 32 | 33 | gemspec 34 | -------------------------------------------------------------------------------- /beaker-rspec.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | $:.push File.expand_path('lib', __dir__) 4 | require 'beaker-rspec/version' 5 | 6 | Gem::Specification.new do |s| 7 | s.name = 'beaker-rspec' 8 | s.version = BeakerRSpec::Version::STRING 9 | s.authors = ['Vox Pupuli'] 10 | s.email = ['voxpupuli@groups.io'] 11 | s.homepage = 'https://github.com/voxpupuli/beaker-rspec' 12 | s.summary = 'RSpec bindings for beaker' 13 | s.description = 'RSpec bindings for beaker, see https://github.com/voxpupuli/beaker' 14 | s.license = 'Apache-2.0' 15 | 16 | s.required_ruby_version = '>= 3.2.0', '<4.0.0' 17 | 18 | s.files = `git ls-files`.split("\n") 19 | s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } 20 | s.require_paths = ['lib'] 21 | 22 | # Testing dependencies 23 | s.add_development_dependency 'fakefs', '>= 0.6', '< 4' 24 | s.add_development_dependency 'minitest', '~> 5.4' 25 | s.add_development_dependency 'rake', '~> 13.0' 26 | s.add_development_dependency 'voxpupuli-rubocop', '~> 4.1.0' 27 | 28 | # Run time dependencies 29 | s.add_dependency 'beaker', '>= 4.0', '< 8' 30 | s.add_dependency 'rspec', '~> 3.0' 31 | s.add_dependency 'serverspec', '~> 2' 32 | s.add_dependency 'specinfra', '~> 2' 33 | end 34 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | 4 | on: 5 | pull_request: {} 6 | push: 7 | branches: 8 | - master 9 | 10 | permissions: 11 | contents: read 12 | 13 | env: 14 | BEAKER_HYPERVISOR: docker 15 | 16 | jobs: 17 | rubocop_and_matrix: 18 | runs-on: ubuntu-24.04 19 | outputs: 20 | ruby: ${{ steps.ruby.outputs.versions }} 21 | steps: 22 | - uses: actions/checkout@v6 23 | - name: Install Ruby ${{ matrix.ruby }} 24 | uses: ruby/setup-ruby@v1 25 | with: 26 | ruby-version: "3.4" 27 | bundler-cache: true 28 | - name: Run Rubocop 29 | run: bundle exec rake rubocop 30 | - id: ruby 31 | uses: voxpupuli/ruby-version@v1 32 | 33 | build: 34 | runs-on: ubuntu-24.04 35 | needs: rubocop_and_matrix 36 | strategy: 37 | fail-fast: false 38 | matrix: 39 | ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }} 40 | name: Ruby ${{ matrix.ruby }} 41 | steps: 42 | - uses: actions/checkout@v6 43 | - name: Install Ruby ${{ matrix.ruby }} 44 | uses: ruby/setup-ruby@v1 45 | with: 46 | ruby-version: ${{ matrix.ruby }} 47 | bundler-cache: true 48 | - name: Verify gem builds 49 | run: gem build --strict --verbose *.gemspec 50 | - name: Run acceptance tests 51 | run: bundle exec rake beaker 52 | 53 | tests: 54 | needs: 55 | - rubocop_and_matrix 56 | - build 57 | runs-on: ubuntu-latest 58 | name: Test suite 59 | steps: 60 | - run: echo Test suite completed 61 | -------------------------------------------------------------------------------- /spec/acceptance/example_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'spec_helper' 4 | 5 | describe 'ignore' do 6 | example 'ignore' do 7 | hosts.each do |host| 8 | on host, 'echo hello' 9 | end 10 | end 11 | 12 | example 'use self.host' do 13 | self.hosts = hosts 14 | end 15 | 16 | example 'use DSL method' do 17 | echo_on hosts, 'Hello World!' 18 | end 19 | 20 | example 'access the logger' do 21 | logger.debug("hi, i'm a debug message") 22 | logger.notify("hi, I'm a notify message") 23 | end 24 | 25 | example 'access the options' do 26 | expect(options).to be_a(Hash) 27 | end 28 | 29 | example 'create a beaker dsl::step' do 30 | step('testing that a step can be used') 31 | end 32 | 33 | context 'has serverspec support' do 34 | hosts.each do |node| 35 | sshd = case node['platform'] 36 | when /windows|el-|redhat|centos/ 37 | 'sshd' 38 | else 39 | 'ssh' 40 | end 41 | describe service(sshd), node: node do 42 | it { is_expected.to be_running } 43 | end 44 | 45 | usr = case node['platform'] 46 | when /windows/ 47 | 'Administrator' 48 | else 49 | 'root' 50 | end 51 | describe user(usr), node: node do 52 | it { is_expected.to exist } 53 | end 54 | end 55 | end 56 | 57 | context 'serverspec: can access default node' do 58 | usr = case default['platform'] 59 | when /windows/ 60 | 'Administrator' 61 | else 62 | 'root' 63 | end 64 | describe user(usr) do 65 | it { is_expected.to exist } 66 | end 67 | end 68 | 69 | context 'serverspec: can match multiline file to multiline contents' do 70 | contents = "four = five\n[one]\ntwo = three" 71 | create_remote_file(default, 'file_with_contents.txt', contents) 72 | describe file('file_with_contents.txt') do 73 | it { is_expected.to be_file } 74 | it { is_expected.to contain(contents) } 75 | end 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /lib/beaker-rspec/beaker_shim.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'beaker' 4 | 5 | module BeakerRSpec 6 | # BeakerShim Module 7 | # 8 | # This module provides the connection between rspec and the Beaker DSL. 9 | # Additional wrappers are provided around commonly executed sets of Beaker 10 | # commands. 11 | module BeakerShim 12 | include Beaker::DSL 13 | 14 | # Accessor for logger 15 | # @return Beaker::Logger object 16 | def logger 17 | RSpec.configuration.logger 18 | end 19 | 20 | # Accessor for metadata 21 | # @return Hash metadata 22 | def metadata 23 | RSpec.configuration.metadata 24 | end 25 | 26 | # Accessor for options hash 27 | # @return Hash options 28 | def options 29 | RSpec.configuration.options 30 | end 31 | 32 | # Provision the hosts to run tests on. 33 | # Assumes #setup has already been called. 34 | # 35 | def provision 36 | @network_manager = Beaker::NetworkManager.new(options, @logger) 37 | RSpec.configuration.hosts = @network_manager.provision 38 | @network_manager.proxy_package_manager 39 | end 40 | 41 | # Validate that the SUTs are up and correctly configured. Checks that required 42 | # packages are installed and if they are missing attempt installation. 43 | # Assumes #setup and #provision has already been called. 44 | def validate 45 | @network_manager.validate 46 | end 47 | 48 | # Run configuration steps to have hosts ready to test on (such as ensuring that 49 | # hosts are correctly time synched, adding keys, etc). 50 | # Assumes #setup, #provision and #validate have already been called. 51 | def configure 52 | @network_manager.configure 53 | end 54 | 55 | # Setup the testing environment 56 | # @param [Array] args The argument array of options for configuring Beaker 57 | # See 'beaker --help' for full list of supported command line options 58 | def setup(args = []) 59 | options_parser = Beaker::Options::Parser.new 60 | options = options_parser.parse_args(args) 61 | options[:debug] = true 62 | RSpec.configuration.logger = Beaker::Logger.new(options) 63 | options[:logger] = logger 64 | RSpec.configuration.hosts = [] 65 | RSpec.configuration.options = options 66 | end 67 | 68 | # Accessor for hosts object 69 | # @return [Array] 70 | def hosts 71 | RSpec.configuration.hosts 72 | end 73 | 74 | # Setter for hosts object 75 | def hosts=(v) 76 | RSpec.configuration.hosts = v 77 | end 78 | 79 | # Accessor for default node 80 | # @return [Beaker::Host] 81 | def default_node 82 | RSpec.configuration.default_node ||= find_only_one :default 83 | end 84 | 85 | # Cleanup the testing framework, shut down test boxen and tidy up 86 | def cleanup 87 | @network_manager.cleanup 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /lib/beaker-rspec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'beaker-rspec/beaker_shim' 4 | require 'beaker-rspec/helpers/serverspec' 5 | include BeakerRSpec::BeakerShim 6 | 7 | RSpec.configure do |c| 8 | # Enable color 9 | c.tty = true 10 | 11 | # Define persistant hosts setting 12 | c.add_setting :hosts, default: [] 13 | # Define persistant options setting 14 | c.add_setting :options, default: {} 15 | # Define persistant metadata object 16 | c.add_setting :metadata, default: {} 17 | # Define persistant logger object 18 | c.add_setting :logger, default: nil 19 | # Define persistant default node 20 | c.add_setting :default_node, default: nil 21 | 22 | # default option values 23 | defaults = { 24 | nodeset: 'default', 25 | } 26 | # read env vars 27 | env_vars = { 28 | color: ENV['BEAKER_COLOR'] || ENV['BEAKER_color'] || ENV.fetch('RS_COLOR', nil), 29 | nodeset: ENV['BEAKER_SET'] || ENV['BEAKER_set'] || ENV.fetch('RS_SET', nil), 30 | nodesetdir: ENV['BEAKER_SETDIR'] || ENV['BEAKER_setdir'] || ENV.fetch('RS_SETDIR', nil), 31 | nodesetfile: ENV['BEAKER_SETFILE'] || ENV['BEAKER_setfile'] || ENV.fetch('RS_SETFILE', nil), 32 | provision: ENV['BEAKER_PROVISION'] || ENV['BEAKER_provision'] || ENV.fetch('RS_PROVISION', nil), 33 | keyfile: ENV['BEAKER_KEYFILE'] || ENV['BEAKER_keyfile'] || ENV.fetch('RS_KEYFILE', nil), 34 | debug: ENV['BEAKER_DEBUG'] || ENV['BEAKER_debug'] || ENV.fetch('RS_DEBUG', nil), 35 | destroy: ENV['BEAKER_DESTROY'] || ENV['BEAKER_destroy'] || ENV.fetch('RS_DESTROY', nil), 36 | optionsfile: ENV['BEAKER_OPTIONS_FILE'] || ENV['BEAKER_options_file'] || ENV.fetch('RS_OPTIONS_FILE', nil), 37 | vagrant_memsize: ENV.fetch('BEAKER_VAGRANT_MEMSIZE', nil), 38 | vagrant_cpus: ENV.fetch('BEAKER_VAGRANT_CPUS', nil), 39 | }.compact 40 | # combine defaults and env_vars to determine overall options 41 | options = defaults.merge(env_vars) 42 | 43 | # process options to construct beaker command string 44 | nodesetdir = options[:nodesetdir] || File.join('spec', 'acceptance', 'nodesets') 45 | nodesetfile = options[:nodesetfile] || File.join(nodesetdir, "#{options[:nodeset]}.yml") 46 | fresh_nodes = (options[:provision] == 'no') ? '--no-provision' : nil 47 | keyfile = options[:keyfile] ? ['--keyfile', options[:keyfile]] : nil 48 | debug = (options[:debug] && options[:debug] != 'no') ? ['--log-level', 'debug'] : nil 49 | color = (options[:color] == 'no') ? ['--no-color'] : nil 50 | options_file = options[:optionsfile] ? ['--options-file', options[:optionsfile]] : nil 51 | 52 | # Configure all nodes in nodeset 53 | c.setup([fresh_nodes, '--hosts', nodesetfile, keyfile, debug, color, options_file].flatten.compact) 54 | 55 | trap 'SIGINT' do 56 | c.cleanup 57 | exit!(1) 58 | end 59 | 60 | begin 61 | c.provision 62 | rescue StandardError => e 63 | logger.error(e) 64 | logger.info(e.backtrace) 65 | c.cleanup 66 | exit!(1) 67 | end 68 | 69 | c.validate 70 | c.configure 71 | 72 | # Destroy nodes if no preserve hosts 73 | c.after :suite do 74 | case options[:destroy] 75 | when 'no' 76 | # Don't cleanup 77 | when 'onpass' 78 | c.cleanup if RSpec.world.filtered_examples.values.flatten.none?(&:exception) 79 | else 80 | c.cleanup 81 | end 82 | end 83 | end 84 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Gem Release 3 | 4 | on: 5 | push: 6 | tags: 7 | - '*' 8 | 9 | permissions: {} 10 | 11 | jobs: 12 | build-release: 13 | # Prevent releases from forked repositories 14 | if: github.repository_owner == 'voxpupuli' 15 | name: Build the gem 16 | runs-on: ubuntu-24.04 17 | steps: 18 | - uses: actions/checkout@v6 19 | - name: Install Ruby 20 | uses: ruby/setup-ruby@v1 21 | with: 22 | ruby-version: 'ruby' 23 | - name: Build gem 24 | shell: bash 25 | run: gem build --verbose *.gemspec 26 | - name: Upload gem to GitHub cache 27 | uses: actions/upload-artifact@v6 28 | with: 29 | name: gem-artifact 30 | path: '*.gem' 31 | retention-days: 1 32 | compression-level: 0 33 | 34 | create-github-release: 35 | needs: build-release 36 | name: Create GitHub release 37 | runs-on: ubuntu-24.04 38 | permissions: 39 | contents: write # clone repo and create release 40 | steps: 41 | - name: Download gem from GitHub cache 42 | uses: actions/download-artifact@v7 43 | with: 44 | name: gem-artifact 45 | - name: Create Release 46 | shell: bash 47 | env: 48 | GH_TOKEN: ${{ github.token }} 49 | run: gh release create --repo ${{ github.repository }} ${{ github.ref_name }} --generate-notes *.gem 50 | 51 | release-to-github: 52 | needs: build-release 53 | name: Release to GitHub 54 | runs-on: ubuntu-24.04 55 | permissions: 56 | packages: write # publish to rubygems.pkg.github.com 57 | steps: 58 | - name: Download gem from GitHub cache 59 | uses: actions/download-artifact@v7 60 | with: 61 | name: gem-artifact 62 | - name: Publish gem to GitHub packages 63 | run: gem push --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem 64 | env: 65 | GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }} 66 | 67 | release-to-rubygems: 68 | needs: build-release 69 | name: Release gem to rubygems.org 70 | runs-on: ubuntu-24.04 71 | environment: release # recommended by rubygems.org 72 | permissions: 73 | id-token: write # rubygems.org authentication 74 | steps: 75 | - name: Download gem from GitHub cache 76 | uses: actions/download-artifact@v7 77 | with: 78 | name: gem-artifact 79 | - uses: rubygems/configure-rubygems-credentials@v1.0.0 80 | - name: Publish gem to rubygems.org 81 | shell: bash 82 | run: gem push *.gem 83 | 84 | release-verification: 85 | name: Check that all releases are done 86 | runs-on: ubuntu-24.04 87 | permissions: 88 | contents: read # minimal permissions that we have to grant 89 | needs: 90 | - create-github-release 91 | - release-to-github 92 | - release-to-rubygems 93 | steps: 94 | - name: Download gem from GitHub cache 95 | uses: actions/download-artifact@v7 96 | with: 97 | name: gem-artifact 98 | - name: Install Ruby 99 | uses: ruby/setup-ruby@v1 100 | with: 101 | ruby-version: 'ruby' 102 | - name: Wait for release to propagate 103 | shell: bash 104 | run: | 105 | gem install rubygems-await 106 | gem await *.gem 107 | -------------------------------------------------------------------------------- /.rubocop_todo.yml: -------------------------------------------------------------------------------- 1 | # This configuration was generated by 2 | # `rubocop --auto-gen-config --no-auto-gen-timestamp` 3 | # using RuboCop version 1.75.8. 4 | # The point is for the user to remove these configuration records 5 | # one by one as the offenses are removed from the code base. 6 | # Note that changes in the inspected code, or installation of new 7 | # versions of RuboCop, may require this file to be generated again. 8 | 9 | # Offense count: 1 10 | Naming/AccessorMethodName: 11 | Exclude: 12 | - 'lib/beaker-rspec/helpers/serverspec.rb' 13 | 14 | # Offense count: 1 15 | # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms. 16 | # CheckDefinitionPathHierarchyRoots: lib, spec, test, src 17 | # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS 18 | Naming/FileName: 19 | Exclude: 20 | - 'Rakefile.rb' 21 | - 'lib/beaker-rspec.rb' 22 | 23 | # Offense count: 1 24 | # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. 25 | # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to 26 | Naming/MethodParameterName: 27 | Exclude: 28 | - 'lib/beaker-rspec/beaker_shim.rb' 29 | 30 | # Offense count: 3 31 | # Configuration parameters: Prefixes, AllowedPatterns. 32 | # Prefixes: when, with, without 33 | RSpec/ContextWording: 34 | Exclude: 35 | - 'spec/acceptance/example_spec.rb' 36 | 37 | # Offense count: 1 38 | # Configuration parameters: IgnoredMetadata. 39 | RSpec/DescribeClass: 40 | Exclude: 41 | - '**/spec/features/**/*' 42 | - '**/spec/requests/**/*' 43 | - '**/spec/routing/**/*' 44 | - '**/spec/system/**/*' 45 | - '**/spec/views/**/*' 46 | - 'spec/acceptance/example_spec.rb' 47 | 48 | # Offense count: 5 49 | # Configuration parameters: AllowedPatterns. 50 | # AllowedPatterns: ^expect_, ^assert_ 51 | RSpec/NoExpectationExample: 52 | Exclude: 53 | - 'spec/acceptance/example_spec.rb' 54 | 55 | # Offense count: 1 56 | # This cop supports unsafe autocorrection (--autocorrect-all). 57 | # Configuration parameters: EnforcedStyle. 58 | # SupportedStyles: always, conditionals 59 | Style/AndOr: 60 | Exclude: 61 | - 'lib/beaker-rspec/helpers/serverspec.rb' 62 | 63 | # Offense count: 6 64 | # This cop supports unsafe autocorrection (--autocorrect-all). 65 | # Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules. 66 | # SupportedStyles: nested, compact 67 | # SupportedStylesForClasses: ~, nested, compact 68 | # SupportedStylesForModules: ~, nested, compact 69 | Style/ClassAndModuleChildren: 70 | Exclude: 71 | - 'lib/beaker-rspec/helpers/serverspec.rb' 72 | 73 | # Offense count: 1 74 | Style/ClassVars: 75 | Exclude: 76 | - 'lib/beaker-rspec/helpers/serverspec.rb' 77 | 78 | # Offense count: 9 79 | # Configuration parameters: AllowedConstants. 80 | Style/Documentation: 81 | Exclude: 82 | - 'spec/**/*' 83 | - 'test/**/*' 84 | - 'lib/beaker-rspec.rb' 85 | - 'lib/beaker-rspec/helpers/serverspec.rb' 86 | 87 | # Offense count: 1 88 | Style/MissingRespondToMissing: 89 | Exclude: 90 | - 'lib/beaker-rspec/helpers/serverspec.rb' 91 | 92 | # Offense count: 1 93 | Style/MixinUsage: 94 | Exclude: 95 | - 'lib/beaker-rspec/spec_helper.rb' 96 | 97 | # Offense count: 1 98 | # This cop supports unsafe autocorrection (--autocorrect-all). 99 | # Configuration parameters: RequireEnglish. 100 | # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names 101 | Style/SpecialGlobalVars: 102 | EnforcedStyle: use_perl_names 103 | -------------------------------------------------------------------------------- /lib/beaker-rspec/helpers/serverspec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'serverspec' 4 | require 'specinfra' 5 | require 'specinfra/backend/powershell/script_helper' 6 | 7 | # Set specinfra backend to use our custom backend 8 | set :backend, 'BeakerDispatch' 9 | 10 | module Specinfra 11 | # Accessor for current example 12 | def cur_example 13 | Specinfra.backend.example 14 | end 15 | 16 | def get_working_node 17 | example = cur_example 18 | if example and example.metadata[:node] 19 | example.metadata[:node] 20 | else 21 | default_node 22 | end 23 | end 24 | 25 | # The cygwin backend 26 | def cygwin_backend 27 | @cygwin_backend ||= Specinfra::Backend::BeakerCygwin.instance 28 | end 29 | 30 | # Backend for everything non-cygwin 31 | def exec_backend 32 | @exec_backend ||= Specinfra::Backend::BeakerExec.instance 33 | end 34 | end 35 | 36 | # Override existing specinfra configuration to avoid conflicts 37 | # with beaker's shell, stdout, stderr defines 38 | module Specinfra 39 | module Configuration 40 | class << self 41 | VALID_OPTIONS_KEYS = %i[ 42 | backend 43 | env 44 | path 45 | pre_command 46 | sudo_path 47 | disable_sudo 48 | sudo_options 49 | docker_image 50 | docker_url 51 | lxc 52 | request_pty 53 | ssh_options 54 | dockerfile_finalizer 55 | ].freeze 56 | end 57 | end 58 | end 59 | 60 | module Specinfra::Helper::Os 61 | @@known_nodes = {} 62 | 63 | def os 64 | working_node_name = get_working_node.to_s 65 | # haven't seen this yet, better detect the os 66 | @@known_nodes[working_node_name] = property[:os] = detect_os unless @@known_nodes[working_node_name] 67 | @@known_nodes[working_node_name] 68 | end 69 | 70 | private 71 | 72 | # Override detect_os to look at the node platform, short circuit discoverability 73 | # when we know that we have a windows node 74 | def detect_os 75 | return Specinfra.configuration.os if Specinfra.configuration.os 76 | 77 | backend = Specinfra.backend 78 | node = get_working_node 79 | return { family: 'windows' } if node['platform'].include?('windows') 80 | 81 | Specinfra::Helper::DetectOs.subclasses.each do |c| 82 | res = c.detect 83 | if res 84 | res[:arch] ||= backend.run_command('uname -m').stdout.strip 85 | return res 86 | end 87 | end 88 | end 89 | end 90 | 91 | module Specinfra 92 | # Rewrite the runner to use the appropriate backend based upon platform information 93 | class Runner 94 | def self.method_missing(meth, *) 95 | backend = Specinfra.backend 96 | node = get_working_node 97 | if !node['platform'].include?('windows') 98 | processor = Specinfra::Processor 99 | if processor.respond_to?(meth) 100 | processor.send(meth, *) 101 | elsif backend.respond_to?(meth) 102 | backend.send(meth, *) 103 | else 104 | run(meth, *) 105 | end 106 | elsif backend.respond_to?(meth) 107 | backend.send(meth, *) 108 | else 109 | run(meth, *) 110 | end 111 | end 112 | end 113 | end 114 | 115 | module Specinfra::Backend::PowerShell 116 | class Command 117 | # Do a better job at escaping regexes, handle both LF and CRLF (YAY!) 118 | def convert_regexp(target) 119 | case target 120 | when Regexp 121 | target.source 122 | else 123 | Regexp.escape(target.to_s.gsub('/', '\/')).gsub('\n', '(\r\n|\n)') 124 | end 125 | end 126 | end 127 | end 128 | 129 | module Specinfra::Backend 130 | class BeakerBase < Specinfra::Backend::Base 131 | # Example accessor 132 | attr_reader :example 133 | 134 | # Execute the provided ssh command 135 | # @param [String] command The command to be executed 136 | # @return [Hash] Returns a hash containing :exit_status, :stdout and :stderr 137 | def ssh_exec!(node, command) 138 | r = on node, command, { acceptable_exit_codes: (0..127) } 139 | { 140 | exit_status: r.exit_code, 141 | stdout: r.stdout, 142 | stderr: r.stderr, 143 | } 144 | end 145 | end 146 | end 147 | 148 | # Used as a container for the two backends, dispatches as windows/nix depending on node platform 149 | module Specinfra::Backend 150 | class BeakerDispatch < BeakerBase 151 | def dispatch_method(meth, *) 152 | if get_working_node['platform'].include?('windows') 153 | cygwin_backend.send(meth, *) 154 | else 155 | exec_backend.send(meth, *) 156 | end 157 | end 158 | 159 | def run_command(cmd, opts = {}) 160 | dispatch_method('run_command', cmd, opts) 161 | end 162 | 163 | def build_command(cmd) 164 | dispatch_method('build_command', cmd) 165 | end 166 | 167 | def add_pre_command(cmd) 168 | dispatch_method('add_pre_command', cmd) 169 | end 170 | end 171 | end 172 | 173 | # Backend for running serverspec commands on windows test nodes 174 | module Specinfra::Backend 175 | class BeakerCygwin < BeakerBase 176 | include Specinfra::Backend::PowerShell::ScriptHelper 177 | 178 | # Run a windows style command using serverspec. Defaults to running on the 'default_node' 179 | # test node, otherwise uses the node specified in @example.metadata[:node] 180 | # @param [String] cmd The serverspec command to executed 181 | # @param [Hash] opt No currently supported options 182 | # @return [Hash] Returns a hash containing :exit_status, :stdout and :stderr 183 | def run_command(cmd, _opt = {}) 184 | node = get_working_node 185 | script = create_script(cmd) 186 | # when node is not cygwin rm -rf will fail so lets use native del instead 187 | # There should be a better way to do this, but for now , this works 188 | if node.is_cygwin? 189 | delete_command = 'rm -rf' 190 | redirection = '< /dev/null' 191 | else 192 | delete_command = 'del' 193 | redirection = '< NUL' 194 | end 195 | on node, "#{delete_command} script.ps1" 196 | create_remote_file(node, 'script.ps1', script) 197 | # When using cmd on a pswindows node redirection should be set to < NUl 198 | # when using a cygwing one, /dev/null should be fine 199 | ret = ssh_exec!(node, "powershell.exe -File script.ps1 #{redirection}") 200 | 201 | if @example 202 | @example.metadata[:command] = script 203 | @example.metadata[:stdout] = ret[:stdout] 204 | end 205 | 206 | CommandResult.new ret 207 | end 208 | end 209 | end 210 | 211 | # Backend for running serverspec commands on non-windows test nodes 212 | module Specinfra::Backend 213 | class BeakerExec < BeakerBase 214 | # Run a unix style command using serverspec. Defaults to running on the 'default_node' 215 | # test node, otherwise uses the node specified in @example.metadata[:node] 216 | # @param [String] cmd The serverspec command to executed 217 | # @param [Hash] opt No currently supported options 218 | # @return [Hash] Returns a hash containing :exit_status, :stdout and :stderr 219 | def run_command(cmd, _opt = {}) 220 | node = get_working_node 221 | cmd = build_command(cmd) 222 | cmd = add_pre_command(cmd) 223 | ret = ssh_exec!(node, cmd) 224 | 225 | if @example 226 | @example.metadata[:command] = cmd 227 | @example.metadata[:stdout] = ret[:stdout] 228 | end 229 | 230 | CommandResult.new ret 231 | end 232 | 233 | def build_command(cmd) 234 | useshell = '/bin/sh' 235 | cmd = cmd.shelljoin if cmd.is_a?(Array) 236 | cmd = "#{String(useshell).shellescape} -c #{String(cmd).shellescape}" 237 | 238 | path = Specinfra.configuration.path 239 | cmd = %(env PATH="#{path}" #{cmd}) if path 240 | 241 | cmd 242 | end 243 | 244 | def add_pre_command(cmd) 245 | if Specinfra.configuration.pre_command 246 | pre_cmd = build_command(Specinfra.configuration.pre_command) 247 | "#{pre_cmd} && #{cmd}" 248 | else 249 | cmd 250 | end 251 | end 252 | end 253 | end 254 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # beaker-rspec 2 | 3 | [![License](https://img.shields.io/github/license/voxpupuli/beaker-rspec.svg)](https://github.com/voxpupuli/beaker-rspec/blob/master/LICENSE) 4 | [![Test](https://github.com/voxpupuli/beaker-rspec/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/beaker-rspec/actions/workflows/test.yml) 5 | [![Release](https://github.com/voxpupuli/beaker-rspec/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker-rspec/actions/workflows/release.yml) 6 | [![RubyGem Version](https://img.shields.io/gem/v/beaker-rspec.svg)](https://rubygems.org/gems/beaker-rspec) 7 | [![RubyGem Downloads](https://img.shields.io/gem/dt/beaker-rspec.svg)](https://rubygems.org/gems/beaker-rspec) 8 | [![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice) 9 | 10 | beaker-rspec is a bridge between the puppet acceptance test harness ([beaker](https://github.com/voxpupuli/beaker)) and [rspec](https://github.com/rspec/rspec). It also integrates [serverspec](http://serverspec.org/). 11 | 12 | ## Upgrading from beaker-rspec 5 to 6 13 | 14 | In beaker-rspec 6, we've picked up the newest beaker, 3.y. In this release, we've 15 | given up support for EoL Ruby and moved to 2.4 as our lowest tested version, 16 | as well as a number of other changes underneath. 17 | 18 | To learn more about those changes, please checkout our 19 | [how-to upgrade](https://github.com/voxpupuli/beaker/blob/master/docs/how_to/upgrade_from_2_to_3.md) 20 | doc. Note that besides the Ruby version & beaker dependency change, nothing else 21 | was changed in beaker-rspec itself. 22 | 23 | To figure out our current lowest supported Ruby version, check for the 24 | `required_ruby_version` key in `beaker-rspec.gemspec`. To see all Ruby versions 25 | we test on, check the list in `.github/workflows/test.yml`. 26 | 27 | ## Typical Workflow 28 | 29 | Beaker does setup and provision all nodes from your nodeset on each test run, and cleans up the VMs after use. During development on a module it can be very handy to keep the VMs available for inspection or reuse. Set `BEAKER_destroy=no` do skip the cleanup and `BEAKER_provision=no` once the VMs are created. 30 | 31 | * Run tests with `BEAKER_destroy=no`, no setting for `BEAKER_provision` 32 | * beaker-rspec will use spec/acceptance/nodesets/default.yml node file 33 | * boxes will be newly provisioned 34 | * boxes will be preserved post-testing 35 | 36 | * Run tests with `BEAKER_destroy=no` and `BEAKER_provision=no` 37 | * beaker-rspec will use spec/acceptance/nodesets/default.yml node file 38 | * boxes will be re-used from previous run 39 | * boxes will be preserved post-testing 40 | * Nodes become corrupted with too many test runs/bad data and need to be refreshed then set `BEAKER_provision=yes` 41 | * Testing is complete and you want to clean up, run once more with `BEAKER_destroy` unset 42 | * you can also: 43 | 44 | ``` 45 | cd .vagrant/beaker_vagrant_files/default.yml ; vagrant destroy --force 46 | ``` 47 | 48 | ### Supported ENV variables 49 | 50 | * `BEAKER_color`: set to `no` to disable color output 51 | * `BEAKER_debug`: set to any value other than `no` to enable beaker debug logging 52 | * `BEAKER_destroy`: set to `no` to keep the VMs after the test run. Set to `onpass` to keep the VMs around only after a test failure. 53 | * `BEAKER_keyfile`: specify alternate SSH key to access the test VMs 54 | * `BEAKER_options_file`: set to the file path of the options file to be used as the default options for beaker. Equivalent to the `--options-file` parameter. 55 | * `BEAKER_provision`: set to `no` to skip provisioning boxes before testing, beaker will then assume that boxes are already provisioned and reachable 56 | * `BEAKER_setdir`: change the directory with nodesets. Defaults to the module's `spec/acceptance/nodesets` directory. 57 | * `BEAKER_set`: set to the name of the node file to be used during testing (exclude .yml file extension, it will be added by beaker-rspec). The file is assumed to be in the `setdir` (see `BEAKER_setdir`). 58 | * `BEAKER_setfile` - set to the full path to a node file be used during testing (be sure to include full path and file extensions, beaker-rspec will use this path without editing/altering it in any way) 59 | 60 | For details on the specific mappings, the [setup code](https://github.com/voxpupuli/beaker-rspec/blob/2771b4b1864692690254a969680a57ff22ac0516/lib/beaker-rspec/spec_helper.rb#L26-L32) and the [beaker docs](https://github.com/voxpupuli/beaker/blob/master/docs/tutorials/the_command_line.md). 61 | 62 | ## Building your Module Testing Environment 63 | 64 | Using puppetlabs-mysql as an example module. 65 | 66 | ### Clone the module repository of the module where you want to add tests 67 | 68 | git clone https://github.com/puppetlabs/puppetlabs-mysql 69 | cd puppetlabs-mysql 70 | 71 | ### Install beaker-rspec 72 | 73 | In module's top level directory edit the Gemfile. You should see a `:system_tests` 74 | or `:acceptance` group there, but if not, add beaker-rspec there: 75 | 76 | ```ruby 77 | group :acceptance do 78 | gem 'beaker-rspec' 79 | end 80 | ``` 81 | 82 | Then run 83 | 84 | bundle install 85 | 86 | ### Create node files 87 | 88 | These files indicate the nodes (or hosts) that the tests will be run on. By default, any node file called `default.yml` will be used. You can override this using the `BEAKER_set` environment variable to indicate an alternate file. Do not provide full path or the '.yml' file extension to `BEAKER_set`, beaker-rspec expands the filename to '${DIR}/${NAME}.yml'. The directory defaults to `spec/acceptance/nodesets` but can be overridden with the `BEAKER_setdir` variable. `BEAKER_setdir` gives full control over the path (including file extension). 89 | 90 | Nodes are pulled from [Puppet Labs Vagrant Boxes](https://vagrantcloud.com/puppetlabs). 91 | 92 | Example node files can be found here: 93 | 94 | * [Puppet Labs example Vagrant node files](https://github.com/voxpupuli/beaker-vagrant/blob/master/docs/vagrant_hosts_file_examples.md) 95 | 96 | Create the nodesets directory. From module's top level directory: 97 | 98 | mkdir -p spec/acceptance/nodesets 99 | 100 | Copy any nodesets that you wish to use into the nodesets directory. 101 | 102 | ### Create the spec_helper_acceptance.rb 103 | 104 | In the `spec` folder, you should see the project's `spec_helper_acceptance.rb`. 105 | This file contains all of the setup logic needed to get your Systems Under Test 106 | (SUTs) ready for testing. Note that puppetlabs-mysql's `spec_helper_acceptance.rb` 107 | file can be a little intimidating, so we're going to leave getting familiar with 108 | that to a later exercise. For now, create your own helper in the same directory. 109 | For example, `my_spec_helper_acceptance.rb` (creative, no?): 110 | 111 | ```ruby 112 | require 'beaker-rspec' 113 | 114 | logger.error("LOADED MYYYYYYYYYY Spec Acceptance Helper") 115 | 116 | # Install Puppet on all hosts 117 | install_puppet_on(hosts, options) 118 | 119 | RSpec.configure do |c| 120 | module_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) 121 | 122 | c.formatter = :documentation 123 | 124 | c.before :suite do 125 | # Install module to all hosts 126 | hosts.each do |host| 127 | install_dev_puppet_module_on(host, :source => module_root, :module_name => 'mysql', 128 | :target_module_path => '/etc/puppet/modules') 129 | # Install dependencies 130 | on(host, puppet('module', 'install', 'puppetlabs-stdlib')) 131 | 132 | # Add more setup code as needed 133 | end 134 | end 135 | end 136 | ``` 137 | 138 | **NOTE** that the `install_puppet_on` method used above will install the latest 139 | Puppet 3.x version. If you'd like to install a more modern version, you can 140 | replace that line with this one: 141 | 142 | ```ruby 143 | install_puppet_agent_on(hosts, options) 144 | ``` 145 | 146 | This method will install the latest puppet-agent from the specified 147 | [puppet collection](https://docs.puppet.com/puppet/latest/reference/puppet_collections.html) 148 | (defaults to `pc1`). 149 | 150 | Update spec_helper_acceptance.rb to reflect the module under test. You will need to set the correct module name and add any module dependencies. Place the file in the `spec` directory (in this case `puppetlabs-mysql/spec`) 151 | 152 | ### Create spec tests for your module 153 | 154 | Spec tests are written in [RSpec](http://rspec.info). You can also use [serverspec](http://serverspec.org/) matchers to test [resources](http://serverspec.org/resource_types.html). 155 | 156 | Example spec file `spec/acceptance/mysql_account_delete_spec.rb`: 157 | 158 | ```ruby 159 | # NOTE: the require must match the name of the helper file created above. 160 | # If you changed the name there, you'll have to change it here. 161 | # You can verify this is correct when you see the log statement from the helper. 162 | require 'my_spec_helper_acceptance' 163 | 164 | describe 'mysql::server::account_security class' do 165 | let(:manifest) { 166 | <<-EOS 167 | class { 'mysql::server': remove_default_accounts => true } 168 | EOS 169 | } 170 | 171 | it 'should run without errors' do 172 | result = apply_manifest(manifest, :catch_failures => true) 173 | expect(result.exit_code).to eq 2 174 | end 175 | 176 | it 'should delete accounts' do 177 | grants_results = shell("mysql -e 'show grants for root@127.0.0.1;'") 178 | expect(grants_results.exit_code).to eq 1 179 | end 180 | 181 | it 'should delete databases' do 182 | show_result = shell("mysql -e 'show databases;'") 183 | expect(show_result.stdout).not_to match /test/ 184 | end 185 | 186 | it 'should run a second time without changes' do 187 | result = apply_manifest(manifest, :catch_failures => true) 188 | expect(result.exit_code).to eq 0 189 | end 190 | 191 | describe package('mysql-server') do 192 | it { is_expected.to be_installed } 193 | end 194 | end 195 | ``` 196 | 197 | ### Run your spec tests 198 | 199 | From module's top level directory 200 | 201 | ``` 202 | bundle exec rspec spec/acceptance 203 | ``` 204 | 205 | ## Transfer Notice 206 | 207 | This plugin was originally authored by [Puppet Inc](http://puppet.com). 208 | The maintainer preferred that [Vox Pupuli](https://voxpupuli.org) take ownership of the module for future improvement and maintenance. 209 | Existing pull requests and issues were transferred over, please fork and continue to contribute here. 210 | 211 | Previously: https://github.com/puppetlabs/beaker 212 | 213 | ## License 214 | 215 | This gem is licensed under the Apache-2 license. 216 | 217 | ## Release information 218 | 219 | To make a new release, please do: 220 | * update the version in lib/beaker-rspec/version.rb 221 | * Install gems with `bundle install --with release --path .vendor` 222 | * generate the changelog with `bundle exec rake changelog` 223 | * Check if the new version matches the closed issues/PRs in the changelog 224 | * Create a PR with it 225 | * After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages 226 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | ## [6.1.0](https://github.com/voxpupuli/beaker-rspec/tree/6.1.0) (2017-03-29) 2 | ## Details 3 | ### LATEST - 29 Mar, 2017 (0197f39f) 4 | 5 | * (GEM) update beaker-rspec version to 6.1.0 (0197f39f) 6 | 7 | * (BKR-1049) Updating require to align with oldest supported PE version. This also matches the merged beaker PR. (eb794f0f) 8 | 9 | 10 | ``` 11 | (BKR-1049) Updating require to align with oldest supported PE version. This also matches the merged beaker PR. 12 | 13 | Syntax Updates 14 | 15 | * Pinned the upper bound on Ruby 16 | * Pinned the rake and rspec dependencies to match Beaker core 17 | * Fixed the license to meet SPDX 18 | * Added a .travis.yml that builds the gem 19 | * Updated the .gitignore file to ignore test garbage 20 | * Pin rack version to < 2.2.2 21 | ``` 22 | * Merge pull request #88 from kevpl/doc_readme_improvements (ef75a9e6) 23 | 24 | 25 | ``` 26 | Merge pull request #88 from kevpl/doc_readme_improvements 27 | 28 | (BKR-968) README improvements 29 | ``` 30 | * (BKR-968) Add puppet v4 install instructions (de809925) 31 | 32 | 33 | ``` 34 | (BKR-968) Add puppet v4 install instructions 35 | 36 | Before, we only described the method, which 37 | defaults to installing Puppet's latest 3.8.z version. Now, 38 | we've described that situation, and introduced 39 | to introduce installing newer 40 | versions of Puppet. 41 | 42 | [skip ci] 43 | ``` 44 | * (BKR-968) fix doc install errors (78c9370f) 45 | 46 | 47 | ``` 48 | (BKR-968) fix doc install errors 49 | 50 | Before this change, the install instructions were incorrectly 51 | iterating through all hosts and calling on 52 | each. That method is designed as a convenience one that 53 | iterates over all hosts, installing on each of them, so you 54 | can see how this compounds negatively for us. These changes 55 | update the doc so that it's correct. They also provide a 56 | little more readability, and work around the fact that the 57 | chosen module (puppetlabs-mysql) has now been flushed out 58 | with its own version of all the files we create in the 59 | tutorial. 60 | 61 | [skip ci] 62 | ``` 63 | ### 6.0.0 - 24 Oct, 2016 (77470480) 64 | 65 | * (HISTORY) update beaker-rspec history for gem release 6.0.0 (77470480) 66 | 67 | * (GEM) update beaker-rspec version to 6.0.0 (b02c1c50) 68 | 69 | * Merge pull request #87 from kevpl/bkr946_beaker3 (6dc15bb5) 70 | 71 | 72 | ``` 73 | Merge pull request #87 from kevpl/bkr946_beaker3 74 | 75 | (BKR-946) update beaker dependency & docs 76 | ``` 77 | * (BKR-946) update beaker dependency & docs (401a62ac) 78 | 79 | * (MAINT) Fix broken links to Beaker docs in README (#84) (1ffe6cff) 80 | 81 | 82 | ``` 83 | (MAINT) Fix broken links to Beaker docs in README (#84) 84 | 85 | * Fix broken link to Vagrant node examples in README 86 | 87 | Beaker recently reorganized the directory structure of their docs, which broke this link. 88 | 89 | See: https://github.com/puppetlabs/beaker/commit/f3e01b0c3ef1ab02776b0f0a5f76d3a848e5d279 90 | 91 | * Fix broken link to beaker command line docs 92 | 93 | The old link goes to an empty wiki page, this fixes the link to point to the new page. 94 | ``` 95 | ### 5.6.0 - 24 Jun, 2016 (bc70fe5a) 96 | 97 | * (HISTORY) update beaker-rspec history for gem release 5.6.0 (bc70fe5a) 98 | 99 | * (GEM) update beaker-rspec version to 5.6.0 (b11dfe76) 100 | 101 | * Merge pull request #83 from puppetlabs/revert-82-maint_specinfra_gem_issue (b7404799) 102 | 103 | 104 | ``` 105 | Merge pull request #83 from puppetlabs/revert-82-maint_specinfra_gem_issue 106 | 107 | Revert "(MAINT) pinning specinfra to pass testing" 108 | ``` 109 | * Revert "(MAINT) pinning specinfra to pass testing" (5ecdc52c) 110 | 111 | ### 5.5.0 - 23 Jun, 2016 (a289ce27) 112 | 113 | * (HISTORY) update beaker-rspec history for gem release 5.5.0 (a289ce27) 114 | 115 | * (GEM) update beaker-rspec version to 5.5.0 (2d2f126e) 116 | 117 | * Merge pull request #82 from kevpl/maint_specinfra_gem_issue (ab82b011) 118 | 119 | 120 | ``` 121 | Merge pull request #82 from kevpl/maint_specinfra_gem_issue 122 | 123 | (MAINT) pinning specinfra to pass testing 124 | ``` 125 | * Merge pull request #80 from Ajedi32/patch-1 (9ab0b19f) 126 | 127 | 128 | ``` 129 | Merge pull request #80 from Ajedi32/patch-1 130 | 131 | Fix broken link to Vagrant node examples in README 132 | ``` 133 | * Merge pull request #81 from Ajedi32/patch-2 (04a9ae52) 134 | 135 | 136 | ``` 137 | Merge pull request #81 from Ajedi32/patch-2 138 | 139 | Fix example spec file in README 140 | ``` 141 | * (MAINT) pinning specinfra to pass testing (d1f49991) 142 | 143 | 144 | ``` 145 | (MAINT) pinning specinfra to pass testing 146 | 147 | Specinfra's newer versions (>=2.59.1) inspect classes and use 148 | their name method. Hocon shadows the class.name method, and 149 | breaks as such. There's a separate issue to fix the hocon 150 | problem (https://github.com/puppetlabs/ruby-hocon/issues/75). 151 | specinfra has decided to not use the name method either 152 | (https://github.com/mizzy/specinfra/pull/561). 153 | Once that's merged & released, this should be reverted. 154 | ``` 155 | * Fix example spec file in README (3af2c1a0) 156 | 157 | 158 | ``` 159 | Fix example spec file in README 160 | 161 | While following this example, I needed this change to get the tests to pass. 162 | 163 | [The documentation for beaker](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker%2FDSL%2FHelpers%2FPuppetHelpers%3Aapply_manifest_on) explains why: 164 | 165 | > `:catch_failures` (Boolean) — default: `false` — By default `puppet -apply` will exit with 0, which does not count as a test failure, even if there were errors or changes when applying the manifest. This option enables detailed exit codes and causes a test failure if `puppet -apply` indicates there was a failure during its execution. 166 | ``` 167 | * Fix broken link to Vagrant node examples in README (d53be837) 168 | 169 | ### 5.4.0 - 9 Jun, 2016 (f030a8b5) 170 | 171 | * (HISTORY) update beaker-rspec history for gem release 5.4.0 (f030a8b5) 172 | 173 | * (GEM) update beaker-rspec version to 5.4.0 (a25f1e77) 174 | 175 | * Merge pull request #79 from richburroughs/master (4db37886) 176 | 177 | 178 | ``` 179 | Merge pull request #79 from richburroughs/master 180 | 181 | fixed an incomplete sentence in README.md 182 | ``` 183 | * fixed an incomplete sentence in README.md (cfd9cbd6) 184 | 185 | * Merge pull request #77 from oskar-flores/fix-serverspec-on-non-cygwin-node (a617f7bb) 186 | 187 | 188 | ``` 189 | Merge pull request #77 from oskar-flores/fix-serverspec-on-non-cygwin-node 190 | 191 | Add a check on windows part, to exec commands on a non cygwin environment 192 | ``` 193 | * Merge pull request #78 from DavidS/bkr-577-update-readme (563ba7e7) 194 | 195 | 196 | ``` 197 | Merge pull request #78 from DavidS/bkr-577-update-readme 198 | 199 | (BKR-577) Update README to describe usage in detail 200 | ``` 201 | * (BKR-577) Update README to describe usage in detail (18b307a7) 202 | 203 | * Cleaning code as per @DavidS sugestion (c0142b57) 204 | 205 | * Add a check on windows part, to exec commads on a non cywing environment (f483b063) 206 | 207 | * fixed up recent README changes (2771b4b1) 208 | 209 | * Merge pull request #71 from electrical/cleanup_ctrl_c (756de678) 210 | 211 | 212 | ``` 213 | Merge pull request #71 from electrical/cleanup_ctrl_c 214 | 215 | (BKR-345) Cleanup and quit on ctrl-c 216 | ``` 217 | * Merge pull request #76 from DavidS/document-env (b3d4f839) 218 | 219 | 220 | ``` 221 | Merge pull request #76 from DavidS/document-env 222 | 223 | Document environment variables 224 | ``` 225 | * Document environment variables (5ab74188) 226 | 227 | * (BKR-345) Cleanup and quit on ctrl-c (90a74317) 228 | 229 | ### 5.3.0 - 13 Oct, 2015 (2efeb932) 230 | 231 | * (HISTORY) update beaker-rspec history for gem release 5.3.0 (2efeb932) 232 | 233 | * (GEM) update beaker-rspec version to 5.3.0 (2ea88c14) 234 | 235 | * Merge pull request #73 from rooprob/feature/enable-beaker-proxy-support (aec28793) 236 | 237 | 238 | ``` 239 | Merge pull request #73 from rooprob/feature/enable-beaker-proxy-support 240 | 241 | Enable the proxy feature available in beaker cli. 242 | ``` 243 | * Enable the proxy feature available in beaker cli. (1eeda73f) 244 | 245 | 246 | ``` 247 | Enable the proxy feature available in beaker cli. 248 | 249 | Improves acceptance testing performance and lowers network traffic to package 250 | respositories with beaker-rspec. 251 | 252 | Running a suitably configured proxy cache to act as a package cache, add the 253 | following nodeset configuration. 254 | 255 | 256 | 257 | --- 258 | CONFIG: 259 | package_proxy: http://: 260 | 261 | 262 | 263 | Beaker supports Debian (APT) and RHEL/Centos (RPM) based package proxies out of the box. See beaker --help (package-proxy) for further details. 264 | 265 | Example, Squid is a suitable local package cache, 266 | 267 | squid.conf 268 | 269 | 270 | mum_object_size 100 MB 271 | cache_replacement_policy heap LFUDA 272 | refresh_pattern ^ftp: 1440 20% 10080 273 | refresh_pattern ^gopher: 1440 0% 1440 274 | refresh_pattern Packages\.bz2$ 0 20% 4320 refresh-ims 275 | refresh_pattern Sources\.bz2$ 0 20% 4320 refresh-ims 276 | refresh_pattern Release\.gpg$ 0 20% 4320 refresh-ims 277 | refresh_pattern Release$ 0 20% 4320 refresh-ims 278 | refresh_pattern . 0 20% 4320 279 | 280 | 281 | ``` 282 | ### 5.2.2 - 3 Sep, 2015 (69980e14) 283 | 284 | * (HISTORY) update beaker-rspec history for gem release 5.2.2 (69980e14) 285 | 286 | * (GEM) update beaker-rspec version to 5.2.2 (462d5843) 287 | 288 | * Merge pull request #75 from anodelman/fix-win (1b3ae6fe) 289 | 290 | 291 | ``` 292 | Merge pull request #75 from anodelman/fix-win 293 | 294 | (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 295 | ``` 296 | * (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 (0229c97a) 297 | 298 | 299 | ``` 300 | (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 301 | 302 | - put the shellescape back in 303 | - tested green locally on osx/windows/ubuntu/centos/debian 304 | ``` 305 | ### 5.2.1 - 27 Aug, 2015 (49c45f61) 306 | 307 | * (HISTORY) update beaker-rspec history for gem release 5.2.1 (49c45f61) 308 | 309 | * (GEM) update beaker-rspec version to 5.2.1 (2cc63fcb) 310 | 311 | * Merge pull request #72 from anodelman/ruby2 (86157a9d) 312 | 313 | 314 | ``` 315 | Merge pull request #72 from anodelman/ruby2 316 | 317 | (BKR-467) beaker-rspec does not correctly update os when cycling through hosts 318 | ``` 319 | * (BKR-467) beaker-rspec does not correctly update os when cycling... (a6b3e503) 320 | 321 | 322 | ``` 323 | (BKR-467) beaker-rspec does not correctly update os when cycling... 324 | 325 | ...through hosts 326 | 327 | - found that beaker was unable to complete its acceptance tests when 328 | provided with multiple SUTs of multiple os types in the same hosts 329 | file 330 | - need to correctly detectos when we switch to a new os, otherwise we 331 | assume that we are executing on the same os and generate the wrong 332 | command strings 333 | - keeps a hash of known hosts associated with their os type so that we 334 | don't have to run detect_os (which can be somewhat time expensive) 335 | more than once per-SUT 336 | ``` 337 | ### 5.2.0 - 15 Jul, 2015 (261dacdb) 338 | 339 | * (HISTORY) update beaker-rspec history for gem release 5.2.0 (261dacdb) 340 | 341 | * (GEM) update beaker-rspec version to 5.2.0 (25f27502) 342 | 343 | * Merge pull request #70 from cmurphy/colors (80f60a7c) 344 | 345 | 346 | ``` 347 | Merge pull request #70 from cmurphy/colors 348 | 349 | Add environment variable to expose --no-color 350 | ``` 351 | * Add environment variable to expose --no-color (d2f8ad39) 352 | 353 | 354 | ``` 355 | Add environment variable to expose --no-color 356 | 357 | When running CI on puppet modules with beaker-rspec, colors tend to get 358 | mistranslated into hard-to-read ascii strings that make reading logs 359 | painful. This patch adds the option to turn colors off. 360 | ``` 361 | ### 5.1.0 - 5 Jun, 2015 (3a72d131) 362 | 363 | * (HISTORY) update beaker-rspec history for gem release 5.1.0 (3a72d131) 364 | 365 | * (GEM) update beaker-rspec version to 5.1.0 (6ca92bf3) 366 | 367 | * Merge pull request #69 from anodelman/host-control (44ea85b5) 368 | 369 | 370 | ``` 371 | Merge pull request #69 from anodelman/host-control 372 | 373 | (BKR-280) ability to install pe/foss on subset of hosts 374 | ``` 375 | * (BKR-280) ability to install pe/foss on subset of hosts (612dd1ff) 376 | 377 | 378 | ``` 379 | (BKR-280) ability to install pe/foss on subset of hosts 380 | 381 | - provide a hosts setter so that we can alter the hosts during runtime 382 | ``` 383 | * Merge pull request #68 from anodelman/standardize (4f564531) 384 | 385 | 386 | ``` 387 | Merge pull request #68 from anodelman/standardize 388 | 389 | (BKR-286) set up beaker-rspec to use standard gem structure practices 390 | ``` 391 | * Merge pull request #67 from anodelman/add-beaker-globals (fe32bc1b) 392 | 393 | 394 | ``` 395 | Merge pull request #67 from anodelman/add-beaker-globals 396 | 397 | (BKR-283) beaker-rspec needs access to @metadata, broken with beaker 2.12.0 398 | ``` 399 | * (BKR-286) set up beaker-rspec to use standard gem structure practices (c62996be) 400 | 401 | 402 | ``` 403 | (BKR-286) set up beaker-rspec to use standard gem structure practices 404 | 405 | - this will allow us to use our standard release pipelines 406 | ``` 407 | * (BKR-283) beaker-rspec needs access to @metadata, broken with... (826455be) 408 | 409 | 410 | ``` 411 | (BKR-283) beaker-rspec needs access to @metadata, broken with... 412 | 413 | ...beaker 2.12.0 414 | 415 | - add accessor for metadata 416 | ``` 417 | * (MAINT) be able to set used beaker using BEAKER_VERSION (a1b64039) 418 | 419 | ### beaker-rspec5.0.2 - 30 Mar, 2015 (b9831088) 420 | 421 | * Merge pull request #62 from anodelman/master (b9831088) 422 | 423 | 424 | ``` 425 | Merge pull request #62 from anodelman/master 426 | 427 | create 5.0.2 gem 428 | ``` 429 | * (HISTORY) update beaker-rspec history for gem release 5.0.2 (6f6cfcbf) 430 | 431 | * (GEM) update beaker-rspec version to 5.0.2 (7de55221) 432 | 433 | * Merge pull request #61 from cyberious/master (26eb29d6) 434 | 435 | 436 | ``` 437 | Merge pull request #61 from cyberious/master 438 | 439 | BKR-160 Remove check for OS before issuing command, get_windows_command... 440 | ``` 441 | * BKR-160 Remove check for OS before issuing command, get_windows_command is not declared in scope (addd9b32) 442 | 443 | * Merge pull request #60 from anodelman/maint (c4c43fd7) 444 | 445 | 446 | ``` 447 | Merge pull request #60 from anodelman/maint 448 | 449 | (BKR-60) failures caused by rubygems timeouts 450 | ``` 451 | * (BKR-60) failures caused by rubygems timeouts (fe36b2d8) 452 | 453 | 454 | ``` 455 | (BKR-60) failures caused by rubygems timeouts 456 | 457 | - add ability to set GEM_SOURCE to internal rubygems mirror 458 | ``` 459 | ### beaker-rspec5.0.1 - 27 Jan, 2015 (7a64f285) 460 | 461 | * Merge pull request #56 from anodelman/master (7a64f285) 462 | 463 | 464 | ``` 465 | Merge pull request #56 from anodelman/master 466 | 467 | (GEM) version bump for beaker-rspec 5.0.1 468 | ``` 469 | * (GEM) version bump for beaker-rspec 5.0.1 (510f3be1) 470 | 471 | * Merge pull request #55 from anodelman/fix-win (28ae2a27) 472 | 473 | 474 | ``` 475 | Merge pull request #55 from anodelman/fix-win 476 | 477 | (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set 478 | ``` 479 | * Merge pull request #22 from petems/add_raketask (5e08f02e) 480 | 481 | 482 | ``` 483 | Merge pull request #22 from petems/add_raketask 484 | 485 | Initial idea for a rake task 486 | ``` 487 | * (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set (56e81ce0) 488 | 489 | 490 | ``` 491 | (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set 492 | 493 | - makes it possible to run against windows nodes with cygwin 494 | - will need updates later to correctly handle windows nodes through 495 | winrm 496 | ``` 497 | * Initial idea for a rake task (8f361731) 498 | 499 | ### beaker-rspec5.0.0 - 8 Jan, 2015 (bbf806a4) 500 | 501 | * Merge pull request #52 from anodelman/master (bbf806a4) 502 | 503 | 504 | ``` 505 | Merge pull request #52 from anodelman/master 506 | 507 | (GEM) version bump for 5.0.0 508 | ``` 509 | * (GEM) version bump for 5.0.0 (ff1f30d2) 510 | 511 | * Merge pull request #51 from electrical/rspec3_support (f133c28e) 512 | 513 | 514 | ``` 515 | Merge pull request #51 from electrical/rspec3_support 516 | 517 | Rspec3 support 518 | ``` 519 | * (gh-51) Update to support serverspec/specinfra V2 and rspec3 (fa120293) 520 | 521 | 522 | ``` 523 | (gh-51) Update to support serverspec/specinfra V2 and rspec3 524 | 525 | Due to some changes in specinfra Ive had to change some code and override some specinfra code 526 | ``` 527 | ### beaker-rspec4.0.0 - 5 Dec, 2014 (a4fe104a) 528 | 529 | * Merge pull request #49 from anodelman/master (a4fe104a) 530 | 531 | 532 | ``` 533 | Merge pull request #49 from anodelman/master 534 | 535 | (QENG-1591) update beaker-rspec to use beaker 2.0 536 | ``` 537 | * (QENG-1591) update beaker-rspec to use beaker 2.0 (e0e86439) 538 | 539 | 540 | ``` 541 | (QENG-1591) update beaker-rspec to use beaker 2.0 542 | 543 | - includes update to minitest 544 | ``` 545 | * Merge pull request #46 from justinstoller/maint/master/make-gem (889eb4c5) 546 | 547 | 548 | ``` 549 | Merge pull request #46 from justinstoller/maint/master/make-gem 550 | 551 | bump beaker-rspec to 3.0 552 | ``` 553 | * bump beaker-rspec to 3.0 (e8a2a616) 554 | 555 | * Merge pull request #39 from hunner/remove_pm_install (9450a014) 556 | 557 | 558 | ``` 559 | Merge pull request #39 from hunner/remove_pm_install 560 | 561 | Move puppet_module_install to beaker dsl helpers 562 | ``` 563 | * Move puppet_module_install to beaker dsl helpers (128556e1) 564 | 565 | ### beaker-rspec2.2.6 - 23 Jun, 2014 (c899b70b) 566 | 567 | * Merge pull request #45 from anodelman/make-gem (c899b70b) 568 | 569 | 570 | ``` 571 | Merge pull request #45 from anodelman/make-gem 572 | 573 | (GEM) create beaker 2.2.6 gem 574 | ``` 575 | * (GEM) create beaker 2.2.6 gem (4c1bfe3b) 576 | 577 | * Merge pull request #44 from anodelman/maint (16e227cf) 578 | 579 | 580 | ``` 581 | Merge pull request #44 from anodelman/maint 582 | 583 | (QENG-833) beaker-rspec broken when using beaker 1.13 584 | ``` 585 | * (QENG-833) beaker-rspec broken when using beaker 1.13 (00e20566) 586 | 587 | 588 | ``` 589 | (QENG-833) beaker-rspec broken when using beaker 1.13 590 | 591 | - ensure that the logger object is available 592 | ``` 593 | ### beaker-rspec2.2.5 - 19 Jun, 2014 (4b9253e3) 594 | 595 | * Merge pull request #43 from hunner/update_specs (4b9253e3) 596 | 597 | 598 | ``` 599 | Merge pull request #43 from hunner/update_specs 600 | 601 | Remove development dependency 602 | ``` 603 | * Remove development dependency (13b4e72e) 604 | 605 | 606 | ``` 607 | Remove development dependency 608 | 609 | Beaker-rspec's tests are already compatible with rspec 3, so no need to 610 | update the specs for the latest rspec 611 | ``` 612 | * Merge pull request #42 from hunner/release_2.2.5 (e1e6f50a) 613 | 614 | 615 | ``` 616 | Merge pull request #42 from hunner/release_2.2.5 617 | 618 | Release 2.2.5 619 | ``` 620 | * Release 2.2.5 (76210e33) 621 | 622 | 623 | ``` 624 | Release 2.2.5 625 | 626 | Only change is to unpin rspec 2 as a runtime dependency. 627 | ``` 628 | * Merge pull request #41 from hunner/unpin_rspec (2db68b61) 629 | 630 | 631 | ``` 632 | Merge pull request #41 from hunner/unpin_rspec 633 | 634 | Unpin rspec 635 | ``` 636 | * Unpin rspec (6837d3a1) 637 | 638 | 639 | ``` 640 | Unpin rspec 641 | 642 | rspec 2.x is a development dependency, but the runtime dependency 643 | shouldn't pin to any specific version as the beaker-rspec library 644 | doesn't care. 645 | ``` 646 | ### beaker-rspec2.2.4 - 8 May, 2014 (8fdb93a9) 647 | 648 | * Merge pull request #38 from anodelman/make-gem (8fdb93a9) 649 | 650 | 651 | ``` 652 | Merge pull request #38 from anodelman/make-gem 653 | 654 | create beaker-rspec 2.2.4 gem 655 | ``` 656 | * create beaker-rspec 2.2.4 gem (caf3e39a) 657 | 658 | * Merge pull request #36 from hunner/fix_specinfra_deps (8a3a9192) 659 | 660 | 661 | ``` 662 | Merge pull request #36 from hunner/fix_specinfra_deps 663 | 664 | (QENG-657) Update specinfra and serverspec deps to be ~>1.0 665 | ``` 666 | * (QENG-657) Update specinfra and serverspec deps to be ~>1.0 (912c21ad) 667 | 668 | ### beaker-rspec2.2.3 - 23 Apr, 2014 (81241746) 669 | 670 | * Merge pull request #34 from anodelman/make-gem (81241746) 671 | 672 | 673 | ``` 674 | Merge pull request #34 from anodelman/make-gem 675 | 676 | create beaker-rspec 2.2.3 gem 677 | ``` 678 | * Merge pull request #33 from anodelman/pin-beaker-minitest (cb112dc8) 679 | 680 | 681 | ``` 682 | Merge pull request #33 from anodelman/pin-beaker-minitest 683 | 684 | (QENG-596) beaker-rspec dying on minitest dependency 685 | ``` 686 | * create beaker-rspec 2.2.3 gem (7e6c93cd) 687 | 688 | * (QENG-596) beaker-rspec dying on minitest dependency (f5f894f6) 689 | 690 | 691 | ``` 692 | (QENG-596) beaker-rspec dying on minitest dependency 693 | 694 | - pin minitest to 4.0 695 | - update beaker pin to newest release of 1.10.0 696 | ``` 697 | ### beaker-rspec2.2.2 - 27 Mar, 2014 (bd5717e6) 698 | 699 | * Merge pull request #31 from anodelman/update-beaker-version (bd5717e6) 700 | 701 | 702 | ``` 703 | Merge pull request #31 from anodelman/update-beaker-version 704 | 705 | update beaker-rspec to use beaker 1.9.1 706 | ``` 707 | * update beaker-rspec to use beaker 1.9.1 (5e6eb3ff) 708 | 709 | ### beaker-rspec2.2.1 - 24 Mar, 2014 (5ec50c57) 710 | 711 | * Merge pull request #28 from anodelman/make-gem (5ec50c57) 712 | 713 | 714 | ``` 715 | Merge pull request #28 from anodelman/make-gem 716 | 717 | create beaker-rspec 2.2.1 gem 718 | ``` 719 | * create beaker-rspec 2.2.1 gem (a0adc7ae) 720 | 721 | * Merge pull request #27 from anodelman/update-configuration-steps (7dfdb5af) 722 | 723 | 724 | ``` 725 | Merge pull request #27 from anodelman/update-configuration-steps 726 | 727 | update configuration/validation steps for beaker 1.8.1+ gem 728 | ``` 729 | * update configuration/validation steps for beaker 1.8.1+ gem (bafcee63) 730 | 731 | 732 | ``` 733 | update configuration/validation steps for beaker 1.8.1+ gem 734 | 735 | - beaker has changed its configuration/validation steps and beaker-rspec 736 | will need to be updated as well 737 | - these changes will need to be run with beaker 1.8.1+ 738 | ``` 739 | ### beaker-rspec2.2.0 - 13 Mar, 2014 (3f2cd006) 740 | 741 | * Merge pull request #25 from anodelman/make-gem (3f2cd006) 742 | 743 | 744 | ``` 745 | Merge pull request #25 from anodelman/make-gem 746 | 747 | create beaker-rspec 2.2.0 gem 748 | ``` 749 | * create beaker-rspec 2.2.0 gem (35b44546) 750 | 751 | 752 | ``` 753 | create beaker-rspec 2.2.0 gem 754 | 755 | - add support for BEAKER_*name* env var format 756 | ``` 757 | * Merge pull request #24 from anodelman/beaker-env (3ac1f383) 758 | 759 | 760 | ``` 761 | Merge pull request #24 from anodelman/beaker-env 762 | 763 | normalize env var handling 764 | ``` 765 | * normalize env var handling (00c70ed4) 766 | 767 | 768 | ``` 769 | normalize env var handling 770 | 771 | - have all env vars start with BEAKER_ 772 | - process all env vars in one hash 773 | - set all default values in one hash 774 | ``` 775 | ### beaker-rspec2.1.1 - 30 Jan, 2014 (94e2423a) 776 | 777 | * Merge pull request #20 from anodelman/make-gem (94e2423a) 778 | 779 | 780 | ``` 781 | Merge pull request #20 from anodelman/make-gem 782 | 783 | create beaker-rspec 2.1.1 gem 784 | ``` 785 | * create beaker-rspec 2.1.1 gem (a19acf47) 786 | 787 | * Merge pull request #18 from hunner/fix_destroy (26a52d79) 788 | 789 | 790 | ``` 791 | Merge pull request #18 from hunner/fix_destroy 792 | 793 | Patch RS_DESTROY behavior 794 | ``` 795 | * Patch RS_DESTROY behavior (5161054d) 796 | 797 | 798 | ``` 799 | Patch RS_DESTROY behavior 800 | 801 | QA-723's implementation moved the logic for `@options[:preserve_hosts]` 802 | out of the `Beaker::NetworkManager#cleanup` method to 803 | `Beaker::CLI#execute!` and beaker-rspec doesn't use the CLI, so the 804 | logic would have to be duplicated here, or beaker would need a patch to 805 | move it back. 806 | 807 | It doesn't really make sense for the cleanup method to conditionally 808 | cleanup, and it doesn't make sense for beaker to be inspecting the 809 | success state of RSpec, so beaker-rspec can be changed to work. 810 | ``` 811 | ### beaker-rspec2.1.0 - 29 Jan, 2014 (3ffb18f1) 812 | 813 | * Merge pull request #17 from anodelman/make-gem (3ffb18f1) 814 | 815 | 816 | ``` 817 | Merge pull request #17 from anodelman/make-gem 818 | 819 | create beaker-rspec 2.1.0 gem 820 | ``` 821 | * create beaker-rspec 2.1.0 gem (b28fd561) 822 | 823 | * Merge pull request #16 from hunner/preserve_hosts (6418ba11) 824 | 825 | 826 | ``` 827 | Merge pull request #16 from hunner/preserve_hosts 828 | 829 | Update argument passing for RS_DESTROY 830 | ``` 831 | * Merge pull request #15 from apenney/fix-serverspec (c1fe9385) 832 | 833 | 834 | ``` 835 | Merge pull request #15 from apenney/fix-serverspec 836 | 837 | specinfra 0.5.0 has made some changes that break run_command for us, 838 | ``` 839 | * Update argument passing for RS_DESTROY (80ab123b) 840 | 841 | * specinfra 0.5.0 has made some changes that break run_command for us, (860658b8) 842 | 843 | 844 | ``` 845 | specinfra 0.5.0 has made some changes that break run_command for us, 846 | get the ret from CommandResult.new now. 847 | ``` 848 | ### beaker-rspec2.0.1 - 22 Jan, 2014 (0ece0e8d) 849 | 850 | * Merge pull request #13 from anodelman/repair-gemspec (0ece0e8d) 851 | 852 | 853 | ``` 854 | Merge pull request #13 from anodelman/repair-gemspec 855 | 856 | repair beaker-rspec.gemspec 857 | ``` 858 | * Merge pull request #14 from anodelman/setfile (395fb9fc) 859 | 860 | 861 | ``` 862 | Merge pull request #14 from anodelman/setfile 863 | 864 | env var fixes to allow for jenkins integration 865 | ``` 866 | * env var fixes to allow for jenkins integration (9b35685e) 867 | 868 | 869 | ``` 870 | env var fixes to allow for jenkins integration 871 | 872 | - allow for setting RS_SETFILE when running spec tests 873 | - addition of RS_KEYFILE and RS_DEBUG 874 | ``` 875 | * repair beaker-rspec.gemspec (7e88246b) 876 | 877 | 878 | ``` 879 | repair beaker-rspec.gemspec 880 | 881 | - raises warnings on open-ended dependencies 882 | - duplicate dependency on rspec 883 | ``` 884 | * Merge pull request #11 from anodelman/make-gem (13453bf4) 885 | 886 | 887 | ``` 888 | Merge pull request #11 from anodelman/make-gem 889 | 890 | beaker-rspec 2.0.1 gem 891 | ``` 892 | * Merge pull request #12 from anodelman/default-options (e183651a) 893 | 894 | 895 | ``` 896 | Merge pull request #12 from anodelman/default-options 897 | 898 | remove "--type git" from spec_helper.cfg 899 | ``` 900 | * remove "--type git" from spec_helper.cfg (fd3626b8) 901 | 902 | 903 | ``` 904 | remove "--type git" from spec_helper.cfg 905 | 906 | - set the type from within the given node configuration file 907 | ``` 908 | * beaker-rspec 2.0.1 gem (4c22e3d9) 909 | 910 | 911 | ``` 912 | beaker-rspec 2.0.1 gem 913 | 914 | - fixes support for options hash 915 | - install_pe now works 916 | ``` 917 | * Merge pull request #10 from anodelman/access-options-hash (7bfeb5b9) 918 | 919 | 920 | ``` 921 | Merge pull request #10 from anodelman/access-options-hash 922 | 923 | (QE-628) install_pe needs to work with beaker-rspec 924 | ``` 925 | * (QE-628) install_pe needs to work with beaker-rspec (3fc9776e) 926 | 927 | 928 | ``` 929 | (QE-628) install_pe needs to work with beaker-rspec 930 | 931 | - add access to the options hash from beaker-rspec 932 | ``` 933 | ### beaker-rspec2.0.0 - 6 Dec, 2013 (d836ebac) 934 | 935 | * Merge pull request #9 from anodelman/make-gem (d836ebac) 936 | 937 | 938 | ``` 939 | Merge pull request #9 from anodelman/make-gem 940 | 941 | create 2.0.0 beaker-rspec gem 942 | ``` 943 | * create 2.0.0 beaker-rspec gem (09180d72) 944 | 945 | 946 | ``` 947 | create 2.0.0 beaker-rspec gem 948 | 949 | - upping to 2.0.0 because of change in ENV var support 950 | ``` 951 | * Merge pull request #8 from anodelman/fix-env-vars (422bb9c6) 952 | 953 | 954 | ``` 955 | Merge pull request #8 from anodelman/fix-env-vars 956 | 957 | (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified 958 | ``` 959 | * (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified (54ff767c) 960 | 961 | 962 | ``` 963 | (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified 964 | 965 | - using RS_DESTROY=no for not destroying boxes post-test 966 | - using RS_PROVISION=no for not provisioning boxes before tests 967 | ``` 968 | ### beaker-rspec1.0.0 - 3 Dec, 2013 (65e89ec9) 969 | 970 | * Initial release. 971 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | ## [9.0.0](https://github.com/voxpupuli/beaker-rspec/tree/9.0.0) (2025-08-07) 6 | 7 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.3.0...9.0.0) 8 | 9 | **Breaking changes:** 10 | 11 | - Require Ruby 3.2 or newer [\#150](https://github.com/voxpupuli/beaker-rspec/pull/150) ([bastelfreak](https://github.com/bastelfreak)) 12 | 13 | **Implemented enhancements:** 14 | 15 | - beaker: Allow 7.x [\#149](https://github.com/voxpupuli/beaker-rspec/pull/149) ([bastelfreak](https://github.com/bastelfreak)) 16 | 17 | ## [8.3.0](https://github.com/voxpupuli/beaker-rspec/tree/8.3.0) (2025-05-27) 18 | 19 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.2.0...8.3.0) 20 | 21 | **Implemented enhancements:** 22 | 23 | - Use the backend variable inside the loop [\#145](https://github.com/voxpupuli/beaker-rspec/pull/145) ([ekohl](https://github.com/ekohl)) 24 | - Remove redundant Specinfra::Runner.run definition [\#144](https://github.com/voxpupuli/beaker-rspec/pull/144) ([ekohl](https://github.com/ekohl)) 25 | - Remove unused get\_windows\_cmd method [\#143](https://github.com/voxpupuli/beaker-rspec/pull/143) ([ekohl](https://github.com/ekohl)) 26 | - Add Ruby 3.4 to CI / generate matrix automatically [\#142](https://github.com/voxpupuli/beaker-rspec/pull/142) ([bastelfreak](https://github.com/bastelfreak)) 27 | - Vagrant: Add options to configure memsize/cpu cores [\#139](https://github.com/voxpupuli/beaker-rspec/pull/139) ([bastelfreak](https://github.com/bastelfreak)) 28 | 29 | **Merged pull requests:** 30 | 31 | - fakefs: Allow 3.x [\#146](https://github.com/voxpupuli/beaker-rspec/pull/146) ([bastelfreak](https://github.com/bastelfreak)) 32 | 33 | ## [8.2.0](https://github.com/voxpupuli/beaker-rspec/tree/8.2.0) (2024-05-28) 34 | 35 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.1.0...8.2.0) 36 | 37 | **Implemented enhancements:** 38 | 39 | - beaker: Allow 6.x [\#137](https://github.com/voxpupuli/beaker-rspec/pull/137) ([bastelfreak](https://github.com/bastelfreak)) 40 | - Add Ruby 3.3 to CI [\#135](https://github.com/voxpupuli/beaker-rspec/pull/135) ([bastelfreak](https://github.com/bastelfreak)) 41 | 42 | **Fixed bugs:** 43 | 44 | - Correct BEAKER\_debug text that it respects no [\#134](https://github.com/voxpupuli/beaker-rspec/pull/134) ([ekohl](https://github.com/ekohl)) 45 | 46 | **Merged pull requests:** 47 | 48 | - voxpupuli-rubocop: Require 2.7.0 [\#136](https://github.com/voxpupuli/beaker-rspec/pull/136) ([bastelfreak](https://github.com/bastelfreak)) 49 | 50 | ## [8.1.0](https://github.com/voxpupuli/beaker-rspec/tree/8.1.0) (2023-07-11) 51 | 52 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.0.1...8.1.0) 53 | 54 | **Implemented enhancements:** 55 | 56 | - fakefs: Allow 2.x [\#131](https://github.com/voxpupuli/beaker-rspec/pull/131) ([bastelfreak](https://github.com/bastelfreak)) 57 | 58 | **Merged pull requests:** 59 | 60 | - Drop docs dev dependencies & CI: Build gems with strictness and verbosity [\#130](https://github.com/voxpupuli/beaker-rspec/pull/130) ([bastelfreak](https://github.com/bastelfreak)) 61 | 62 | ## [8.0.1](https://github.com/voxpupuli/beaker-rspec/tree/8.0.1) (2023-05-05) 63 | 64 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/8.0.0...8.0.1) 65 | 66 | **Merged pull requests:** 67 | 68 | - switch to voxpupuli-rubocop [\#128](https://github.com/voxpupuli/beaker-rspec/pull/128) ([bastelfreak](https://github.com/bastelfreak)) 69 | - fix wrong example [\#127](https://github.com/voxpupuli/beaker-rspec/pull/127) ([rwaffen](https://github.com/rwaffen)) 70 | 71 | ## [8.0.0](https://github.com/voxpupuli/beaker-rspec/tree/8.0.0) (2023-03-27) 72 | 73 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/7.1.0...8.0.0) 74 | 75 | **Breaking changes:** 76 | 77 | - Drop Ruby 2.4/2.5/2.6 [\#121](https://github.com/voxpupuli/beaker-rspec/pull/121) ([bastelfreak](https://github.com/bastelfreak)) 78 | 79 | **Implemented enhancements:** 80 | 81 | - Add Ruby 3.2 support [\#120](https://github.com/voxpupuli/beaker-rspec/pull/120) ([bastelfreak](https://github.com/bastelfreak)) 82 | - Introduce rubocop [\#118](https://github.com/voxpupuli/beaker-rspec/pull/118) ([bastelfreak](https://github.com/bastelfreak)) 83 | - Support uppercase configuration environment variables [\#117](https://github.com/voxpupuli/beaker-rspec/pull/117) ([ekohl](https://github.com/ekohl)) 84 | - Allow to disable debug output [\#116](https://github.com/voxpupuli/beaker-rspec/pull/116) ([jay7x](https://github.com/jay7x)) 85 | 86 | **Merged pull requests:** 87 | 88 | - Use rubocop config from beaker [\#125](https://github.com/voxpupuli/beaker-rspec/pull/125) ([bastelfreak](https://github.com/bastelfreak)) 89 | - Require beaker 4.x [\#124](https://github.com/voxpupuli/beaker-rspec/pull/124) ([bastelfreak](https://github.com/bastelfreak)) 90 | - Rubocop: Fix Layout cops [\#123](https://github.com/voxpupuli/beaker-rspec/pull/123) ([bastelfreak](https://github.com/bastelfreak)) 91 | - Rubocop: Fix Style cops [\#122](https://github.com/voxpupuli/beaker-rspec/pull/122) ([bastelfreak](https://github.com/bastelfreak)) 92 | - Fix multiple rubocop violations [\#119](https://github.com/voxpupuli/beaker-rspec/pull/119) ([bastelfreak](https://github.com/bastelfreak)) 93 | - Add Ruby 3.1 to CI matrix [\#113](https://github.com/voxpupuli/beaker-rspec/pull/113) ([bastelfreak](https://github.com/bastelfreak)) 94 | 95 | ## [7.1.0](https://github.com/voxpupuli/beaker-rspec/tree/7.1.0) (2022-01-14) 96 | 97 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/7.0.0...7.1.0) 98 | 99 | **Implemented enhancements:** 100 | 101 | - Reduce beaker-pe to a development dependendency [\#109](https://github.com/voxpupuli/beaker-rspec/pull/109) ([ekohl](https://github.com/ekohl)) 102 | 103 | **Merged pull requests:** 104 | 105 | - Add acceptance tests to CI; drop beaker-pe development dependency [\#110](https://github.com/voxpupuli/beaker-rspec/pull/110) ([ekohl](https://github.com/ekohl)) 106 | 107 | ## [7.0.0](https://github.com/voxpupuli/beaker-rspec/tree/7.0.0) (2021-11-03) 108 | 109 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.3.0...7.0.0) 110 | 111 | **Breaking changes:** 112 | 113 | - allow newer deps, require Ruby 2.4, cleanup gemspec [\#106](https://github.com/voxpupuli/beaker-rspec/pull/106) ([bastelfreak](https://github.com/bastelfreak)) 114 | 115 | **Merged pull requests:** 116 | 117 | - Fix release GHA; update README.md [\#107](https://github.com/voxpupuli/beaker-rspec/pull/107) ([bastelfreak](https://github.com/bastelfreak)) 118 | - Update rake requirement from ~\> 10.1 to ~\> 12.3 [\#105](https://github.com/voxpupuli/beaker-rspec/pull/105) ([dependabot[bot]](https://github.com/apps/dependabot)) 119 | - Migrate testing to GH Actions [\#103](https://github.com/voxpupuli/beaker-rspec/pull/103) ([genebean](https://github.com/genebean)) 120 | 121 | ## [6.3.0](https://github.com/voxpupuli/beaker-rspec/tree/6.3.0) (2021-02-26) 122 | 123 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.2.4...6.3.0) 124 | 125 | **Merged pull requests:** 126 | 127 | - Migrate testing to GH Actions [\#102](https://github.com/voxpupuli/beaker-rspec/pull/102) ([genebean](https://github.com/genebean)) 128 | - Rearrange the cleanup handling [\#101](https://github.com/voxpupuli/beaker-rspec/pull/101) ([trevor-vaughan](https://github.com/trevor-vaughan)) 129 | - Add Ruby 3 support [\#100](https://github.com/voxpupuli/beaker-rspec/pull/100) ([trevor-vaughan](https://github.com/trevor-vaughan)) 130 | - Add Dependabot to keep thins up to date [\#99](https://github.com/voxpupuli/beaker-rspec/pull/99) ([genebean](https://github.com/genebean)) 131 | - Correct link to Vagrant nodes examples [\#98](https://github.com/voxpupuli/beaker-rspec/pull/98) ([MikaelSmith](https://github.com/MikaelSmith)) 132 | - \(MAINT\) Add beaker-vmpooler for CI pipeline [\#97](https://github.com/voxpupuli/beaker-rspec/pull/97) ([Dakta](https://github.com/Dakta)) 133 | 134 | ## [6.2.4](https://github.com/voxpupuli/beaker-rspec/tree/6.2.4) (2018-08-10) 135 | 136 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.2.3...6.2.4) 137 | 138 | **Merged pull requests:** 139 | 140 | - \(MAINT\) Update Dependencies [\#95](https://github.com/voxpupuli/beaker-rspec/pull/95) ([Dakta](https://github.com/Dakta)) 141 | 142 | ## [6.2.3](https://github.com/voxpupuli/beaker-rspec/tree/6.2.3) (2017-11-28) 143 | 144 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.2.2...6.2.3) 145 | 146 | **Merged pull requests:** 147 | 148 | - Fix regression in nodesetdir [\#94](https://github.com/voxpupuli/beaker-rspec/pull/94) ([ekohl](https://github.com/ekohl)) 149 | 150 | ## [6.2.2](https://github.com/voxpupuli/beaker-rspec/tree/6.2.2) (2017-11-28) 151 | 152 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.2.1...6.2.2) 153 | 154 | **Merged pull requests:** 155 | 156 | - Allow setting the nodeset directory through settings [\#93](https://github.com/voxpupuli/beaker-rspec/pull/93) ([ekohl](https://github.com/ekohl)) 157 | 158 | ## [6.2.1](https://github.com/voxpupuli/beaker-rspec/tree/6.2.1) (2017-10-03) 159 | 160 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.2.0...6.2.1) 161 | 162 | **Merged pull requests:** 163 | 164 | - \(BKR-1213\) fix syntax issues [\#92](https://github.com/voxpupuli/beaker-rspec/pull/92) ([kevpl](https://github.com/kevpl)) 165 | 166 | ## [6.2.0](https://github.com/voxpupuli/beaker-rspec/tree/6.2.0) (2017-10-02) 167 | 168 | [Full Changelog](https://github.com/voxpupuli/beaker-rspec/compare/6.1.0...6.2.0) 169 | 170 | **Merged pull requests:** 171 | 172 | - fix markdown [\#91](https://github.com/voxpupuli/beaker-rspec/pull/91) ([bastelfreak](https://github.com/bastelfreak)) 173 | - Bkr 1115 Allow options-file to be configured via ENV [\#90](https://github.com/voxpupuli/beaker-rspec/pull/90) ([barrymw](https://github.com/barrymw)) 174 | 175 | ## [6.1.0](https://github.com/voxpupuli/beaker-rspec/tree/6.1.0) (2017-03-29) 176 | ## Details 177 | ### LATEST - 29 Mar, 2017 (0197f39f) 178 | 179 | * (GEM) update beaker-rspec version to 6.1.0 (0197f39f) 180 | 181 | * (BKR-1049) Updating require to align with oldest supported PE version. This also matches the merged beaker PR. (eb794f0f) 182 | 183 | 184 | ``` 185 | (BKR-1049) Updating require to align with oldest supported PE version. This also matches the merged beaker PR. 186 | 187 | Syntax Updates 188 | 189 | * Pinned the upper bound on Ruby 190 | * Pinned the rake and rspec dependencies to match Beaker core 191 | * Fixed the license to meet SPDX 192 | * Added a .travis.yml that builds the gem 193 | * Updated the .gitignore file to ignore test garbage 194 | * Pin rack version to < 2.2.2 195 | ``` 196 | * Merge pull request #88 from kevpl/doc_readme_improvements (ef75a9e6) 197 | 198 | 199 | ``` 200 | Merge pull request #88 from kevpl/doc_readme_improvements 201 | 202 | (BKR-968) README improvements 203 | ``` 204 | * (BKR-968) Add puppet v4 install instructions (de809925) 205 | 206 | 207 | ``` 208 | (BKR-968) Add puppet v4 install instructions 209 | 210 | Before, we only described the method, which 211 | defaults to installing Puppet's latest 3.8.z version. Now, 212 | we've described that situation, and introduced 213 | to introduce installing newer 214 | versions of Puppet. 215 | 216 | [skip ci] 217 | ``` 218 | * (BKR-968) fix doc install errors (78c9370f) 219 | 220 | 221 | ``` 222 | (BKR-968) fix doc install errors 223 | 224 | Before this change, the install instructions were incorrectly 225 | iterating through all hosts and calling on 226 | each. That method is designed as a convenience one that 227 | iterates over all hosts, installing on each of them, so you 228 | can see how this compounds negatively for us. These changes 229 | update the doc so that it's correct. They also provide a 230 | little more readability, and work around the fact that the 231 | chosen module (puppetlabs-mysql) has now been flushed out 232 | with its own version of all the files we create in the 233 | tutorial. 234 | 235 | [skip ci] 236 | ``` 237 | ### 6.0.0 - 24 Oct, 2016 (77470480) 238 | 239 | * (HISTORY) update beaker-rspec history for gem release 6.0.0 (77470480) 240 | 241 | * (GEM) update beaker-rspec version to 6.0.0 (b02c1c50) 242 | 243 | * Merge pull request #87 from kevpl/bkr946_beaker3 (6dc15bb5) 244 | 245 | 246 | ``` 247 | Merge pull request #87 from kevpl/bkr946_beaker3 248 | 249 | (BKR-946) update beaker dependency & docs 250 | ``` 251 | * (BKR-946) update beaker dependency & docs (401a62ac) 252 | 253 | * (MAINT) Fix broken links to Beaker docs in README (#84) (1ffe6cff) 254 | 255 | 256 | ``` 257 | (MAINT) Fix broken links to Beaker docs in README (#84) 258 | 259 | * Fix broken link to Vagrant node examples in README 260 | 261 | Beaker recently reorganized the directory structure of their docs, which broke this link. 262 | 263 | See: https://github.com/puppetlabs/beaker/commit/f3e01b0c3ef1ab02776b0f0a5f76d3a848e5d279 264 | 265 | * Fix broken link to beaker command line docs 266 | 267 | The old link goes to an empty wiki page, this fixes the link to point to the new page. 268 | ``` 269 | ### 5.6.0 - 24 Jun, 2016 (bc70fe5a) 270 | 271 | * (HISTORY) update beaker-rspec history for gem release 5.6.0 (bc70fe5a) 272 | 273 | * (GEM) update beaker-rspec version to 5.6.0 (b11dfe76) 274 | 275 | * Merge pull request #83 from puppetlabs/revert-82-maint_specinfra_gem_issue (b7404799) 276 | 277 | 278 | ``` 279 | Merge pull request #83 from puppetlabs/revert-82-maint_specinfra_gem_issue 280 | 281 | Revert "(MAINT) pinning specinfra to pass testing" 282 | ``` 283 | * Revert "(MAINT) pinning specinfra to pass testing" (5ecdc52c) 284 | 285 | ### 5.5.0 - 23 Jun, 2016 (a289ce27) 286 | 287 | * (HISTORY) update beaker-rspec history for gem release 5.5.0 (a289ce27) 288 | 289 | * (GEM) update beaker-rspec version to 5.5.0 (2d2f126e) 290 | 291 | * Merge pull request #82 from kevpl/maint_specinfra_gem_issue (ab82b011) 292 | 293 | 294 | ``` 295 | Merge pull request #82 from kevpl/maint_specinfra_gem_issue 296 | 297 | (MAINT) pinning specinfra to pass testing 298 | ``` 299 | * Merge pull request #80 from Ajedi32/patch-1 (9ab0b19f) 300 | 301 | 302 | ``` 303 | Merge pull request #80 from Ajedi32/patch-1 304 | 305 | Fix broken link to Vagrant node examples in README 306 | ``` 307 | * Merge pull request #81 from Ajedi32/patch-2 (04a9ae52) 308 | 309 | 310 | ``` 311 | Merge pull request #81 from Ajedi32/patch-2 312 | 313 | Fix example spec file in README 314 | ``` 315 | * (MAINT) pinning specinfra to pass testing (d1f49991) 316 | 317 | 318 | ``` 319 | (MAINT) pinning specinfra to pass testing 320 | 321 | Specinfra's newer versions (>=2.59.1) inspect classes and use 322 | their name method. Hocon shadows the class.name method, and 323 | breaks as such. There's a separate issue to fix the hocon 324 | problem (https://github.com/puppetlabs/ruby-hocon/issues/75). 325 | specinfra has decided to not use the name method either 326 | (https://github.com/mizzy/specinfra/pull/561). 327 | Once that's merged & released, this should be reverted. 328 | ``` 329 | * Fix example spec file in README (3af2c1a0) 330 | 331 | 332 | ``` 333 | Fix example spec file in README 334 | 335 | While following this example, I needed this change to get the tests to pass. 336 | 337 | [The documentation for beaker](http://www.rubydoc.info/github/puppetlabs/beaker/Beaker%2FDSL%2FHelpers%2FPuppetHelpers%3Aapply_manifest_on) explains why: 338 | 339 | > `:catch_failures` (Boolean) — default: `false` — By default `puppet -apply` will exit with 0, which does not count as a test failure, even if there were errors or changes when applying the manifest. This option enables detailed exit codes and causes a test failure if `puppet -apply` indicates there was a failure during its execution. 340 | ``` 341 | * Fix broken link to Vagrant node examples in README (d53be837) 342 | 343 | ### 5.4.0 - 9 Jun, 2016 (f030a8b5) 344 | 345 | * (HISTORY) update beaker-rspec history for gem release 5.4.0 (f030a8b5) 346 | 347 | * (GEM) update beaker-rspec version to 5.4.0 (a25f1e77) 348 | 349 | * Merge pull request #79 from richburroughs/master (4db37886) 350 | 351 | 352 | ``` 353 | Merge pull request #79 from richburroughs/master 354 | 355 | fixed an incomplete sentence in README.md 356 | ``` 357 | * fixed an incomplete sentence in README.md (cfd9cbd6) 358 | 359 | * Merge pull request #77 from oskar-flores/fix-serverspec-on-non-cygwin-node (a617f7bb) 360 | 361 | 362 | ``` 363 | Merge pull request #77 from oskar-flores/fix-serverspec-on-non-cygwin-node 364 | 365 | Add a check on windows part, to exec commands on a non cygwin environment 366 | ``` 367 | * Merge pull request #78 from DavidS/bkr-577-update-readme (563ba7e7) 368 | 369 | 370 | ``` 371 | Merge pull request #78 from DavidS/bkr-577-update-readme 372 | 373 | (BKR-577) Update README to describe usage in detail 374 | ``` 375 | * (BKR-577) Update README to describe usage in detail (18b307a7) 376 | 377 | * Cleaning code as per @DavidS sugestion (c0142b57) 378 | 379 | * Add a check on windows part, to exec commads on a non cywing environment (f483b063) 380 | 381 | * fixed up recent README changes (2771b4b1) 382 | 383 | * Merge pull request #71 from electrical/cleanup_ctrl_c (756de678) 384 | 385 | 386 | ``` 387 | Merge pull request #71 from electrical/cleanup_ctrl_c 388 | 389 | (BKR-345) Cleanup and quit on ctrl-c 390 | ``` 391 | * Merge pull request #76 from DavidS/document-env (b3d4f839) 392 | 393 | 394 | ``` 395 | Merge pull request #76 from DavidS/document-env 396 | 397 | Document environment variables 398 | ``` 399 | * Document environment variables (5ab74188) 400 | 401 | * (BKR-345) Cleanup and quit on ctrl-c (90a74317) 402 | 403 | ### 5.3.0 - 13 Oct, 2015 (2efeb932) 404 | 405 | * (HISTORY) update beaker-rspec history for gem release 5.3.0 (2efeb932) 406 | 407 | * (GEM) update beaker-rspec version to 5.3.0 (2ea88c14) 408 | 409 | * Merge pull request #73 from rooprob/feature/enable-beaker-proxy-support (aec28793) 410 | 411 | 412 | ``` 413 | Merge pull request #73 from rooprob/feature/enable-beaker-proxy-support 414 | 415 | Enable the proxy feature available in beaker cli. 416 | ``` 417 | * Enable the proxy feature available in beaker cli. (1eeda73f) 418 | 419 | 420 | ``` 421 | Enable the proxy feature available in beaker cli. 422 | 423 | Improves acceptance testing performance and lowers network traffic to package 424 | respositories with beaker-rspec. 425 | 426 | Running a suitably configured proxy cache to act as a package cache, add the 427 | following nodeset configuration. 428 | 429 | 430 | 431 | --- 432 | CONFIG: 433 | package_proxy: http://: 434 | 435 | 436 | 437 | Beaker supports Debian (APT) and RHEL/Centos (RPM) based package proxies out of the box. See beaker --help (package-proxy) for further details. 438 | 439 | Example, Squid is a suitable local package cache, 440 | 441 | squid.conf 442 | 443 | 444 | mum_object_size 100 MB 445 | cache_replacement_policy heap LFUDA 446 | refresh_pattern ^ftp: 1440 20% 10080 447 | refresh_pattern ^gopher: 1440 0% 1440 448 | refresh_pattern Packages\.bz2$ 0 20% 4320 refresh-ims 449 | refresh_pattern Sources\.bz2$ 0 20% 4320 refresh-ims 450 | refresh_pattern Release\.gpg$ 0 20% 4320 refresh-ims 451 | refresh_pattern Release$ 0 20% 4320 refresh-ims 452 | refresh_pattern . 0 20% 4320 453 | 454 | 455 | ``` 456 | ### 5.2.2 - 3 Sep, 2015 (69980e14) 457 | 458 | * (HISTORY) update beaker-rspec history for gem release 5.2.2 (69980e14) 459 | 460 | * (GEM) update beaker-rspec version to 5.2.2 (462d5843) 461 | 462 | * Merge pull request #75 from anodelman/fix-win (1b3ae6fe) 463 | 464 | 465 | ``` 466 | Merge pull request #75 from anodelman/fix-win 467 | 468 | (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 469 | ``` 470 | * (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 (0229c97a) 471 | 472 | 473 | ``` 474 | (BKR-474) Missing shellescape in /helpers/serverspec.rb since a6b3e503 475 | 476 | - put the shellescape back in 477 | - tested green locally on osx/windows/ubuntu/centos/debian 478 | ``` 479 | ### 5.2.1 - 27 Aug, 2015 (49c45f61) 480 | 481 | * (HISTORY) update beaker-rspec history for gem release 5.2.1 (49c45f61) 482 | 483 | * (GEM) update beaker-rspec version to 5.2.1 (2cc63fcb) 484 | 485 | * Merge pull request #72 from anodelman/ruby2 (86157a9d) 486 | 487 | 488 | ``` 489 | Merge pull request #72 from anodelman/ruby2 490 | 491 | (BKR-467) beaker-rspec does not correctly update os when cycling through hosts 492 | ``` 493 | * (BKR-467) beaker-rspec does not correctly update os when cycling... (a6b3e503) 494 | 495 | 496 | ``` 497 | (BKR-467) beaker-rspec does not correctly update os when cycling... 498 | 499 | ...through hosts 500 | 501 | - found that beaker was unable to complete its acceptance tests when 502 | provided with multiple SUTs of multiple os types in the same hosts 503 | file 504 | - need to correctly detectos when we switch to a new os, otherwise we 505 | assume that we are executing on the same os and generate the wrong 506 | command strings 507 | - keeps a hash of known hosts associated with their os type so that we 508 | don't have to run detect_os (which can be somewhat time expensive) 509 | more than once per-SUT 510 | ``` 511 | ### 5.2.0 - 15 Jul, 2015 (261dacdb) 512 | 513 | * (HISTORY) update beaker-rspec history for gem release 5.2.0 (261dacdb) 514 | 515 | * (GEM) update beaker-rspec version to 5.2.0 (25f27502) 516 | 517 | * Merge pull request #70 from cmurphy/colors (80f60a7c) 518 | 519 | 520 | ``` 521 | Merge pull request #70 from cmurphy/colors 522 | 523 | Add environment variable to expose --no-color 524 | ``` 525 | * Add environment variable to expose --no-color (d2f8ad39) 526 | 527 | 528 | ``` 529 | Add environment variable to expose --no-color 530 | 531 | When running CI on puppet modules with beaker-rspec, colors tend to get 532 | mistranslated into hard-to-read ascii strings that make reading logs 533 | painful. This patch adds the option to turn colors off. 534 | ``` 535 | ### 5.1.0 - 5 Jun, 2015 (3a72d131) 536 | 537 | * (HISTORY) update beaker-rspec history for gem release 5.1.0 (3a72d131) 538 | 539 | * (GEM) update beaker-rspec version to 5.1.0 (6ca92bf3) 540 | 541 | * Merge pull request #69 from anodelman/host-control (44ea85b5) 542 | 543 | 544 | ``` 545 | Merge pull request #69 from anodelman/host-control 546 | 547 | (BKR-280) ability to install pe/foss on subset of hosts 548 | ``` 549 | * (BKR-280) ability to install pe/foss on subset of hosts (612dd1ff) 550 | 551 | 552 | ``` 553 | (BKR-280) ability to install pe/foss on subset of hosts 554 | 555 | - provide a hosts setter so that we can alter the hosts during runtime 556 | ``` 557 | * Merge pull request #68 from anodelman/standardize (4f564531) 558 | 559 | 560 | ``` 561 | Merge pull request #68 from anodelman/standardize 562 | 563 | (BKR-286) set up beaker-rspec to use standard gem structure practices 564 | ``` 565 | * Merge pull request #67 from anodelman/add-beaker-globals (fe32bc1b) 566 | 567 | 568 | ``` 569 | Merge pull request #67 from anodelman/add-beaker-globals 570 | 571 | (BKR-283) beaker-rspec needs access to @metadata, broken with beaker 2.12.0 572 | ``` 573 | * (BKR-286) set up beaker-rspec to use standard gem structure practices (c62996be) 574 | 575 | 576 | ``` 577 | (BKR-286) set up beaker-rspec to use standard gem structure practices 578 | 579 | - this will allow us to use our standard release pipelines 580 | ``` 581 | * (BKR-283) beaker-rspec needs access to @metadata, broken with... (826455be) 582 | 583 | 584 | ``` 585 | (BKR-283) beaker-rspec needs access to @metadata, broken with... 586 | 587 | ...beaker 2.12.0 588 | 589 | - add accessor for metadata 590 | ``` 591 | * (MAINT) be able to set used beaker using BEAKER_VERSION (a1b64039) 592 | 593 | ### beaker-rspec5.0.2 - 30 Mar, 2015 (b9831088) 594 | 595 | * Merge pull request #62 from anodelman/master (b9831088) 596 | 597 | 598 | ``` 599 | Merge pull request #62 from anodelman/master 600 | 601 | create 5.0.2 gem 602 | ``` 603 | * (HISTORY) update beaker-rspec history for gem release 5.0.2 (6f6cfcbf) 604 | 605 | * (GEM) update beaker-rspec version to 5.0.2 (7de55221) 606 | 607 | * Merge pull request #61 from cyberious/master (26eb29d6) 608 | 609 | 610 | ``` 611 | Merge pull request #61 from cyberious/master 612 | 613 | BKR-160 Remove check for OS before issuing command, get_windows_command... 614 | ``` 615 | * BKR-160 Remove check for OS before issuing command, get_windows_command is not declared in scope (addd9b32) 616 | 617 | * Merge pull request #60 from anodelman/maint (c4c43fd7) 618 | 619 | 620 | ``` 621 | Merge pull request #60 from anodelman/maint 622 | 623 | (BKR-60) failures caused by rubygems timeouts 624 | ``` 625 | * (BKR-60) failures caused by rubygems timeouts (fe36b2d8) 626 | 627 | 628 | ``` 629 | (BKR-60) failures caused by rubygems timeouts 630 | 631 | - add ability to set GEM_SOURCE to internal rubygems mirror 632 | ``` 633 | ### beaker-rspec5.0.1 - 27 Jan, 2015 (7a64f285) 634 | 635 | * Merge pull request #56 from anodelman/master (7a64f285) 636 | 637 | 638 | ``` 639 | Merge pull request #56 from anodelman/master 640 | 641 | (GEM) version bump for beaker-rspec 5.0.1 642 | ``` 643 | * (GEM) version bump for beaker-rspec 5.0.1 (510f3be1) 644 | 645 | * Merge pull request #55 from anodelman/fix-win (28ae2a27) 646 | 647 | 648 | ``` 649 | Merge pull request #55 from anodelman/fix-win 650 | 651 | (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set 652 | ``` 653 | * Merge pull request #22 from petems/add_raketask (5e08f02e) 654 | 655 | 656 | ``` 657 | Merge pull request #22 from petems/add_raketask 658 | 659 | Initial idea for a rake task 660 | ``` 661 | * (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set (56e81ce0) 662 | 663 | 664 | ``` 665 | (QENG-1657) Beaker-Rspec Specinfra does not detect Windows OS set 666 | 667 | - makes it possible to run against windows nodes with cygwin 668 | - will need updates later to correctly handle windows nodes through 669 | winrm 670 | ``` 671 | * Initial idea for a rake task (8f361731) 672 | 673 | ### beaker-rspec5.0.0 - 8 Jan, 2015 (bbf806a4) 674 | 675 | * Merge pull request #52 from anodelman/master (bbf806a4) 676 | 677 | 678 | ``` 679 | Merge pull request #52 from anodelman/master 680 | 681 | (GEM) version bump for 5.0.0 682 | ``` 683 | * (GEM) version bump for 5.0.0 (ff1f30d2) 684 | 685 | * Merge pull request #51 from electrical/rspec3_support (f133c28e) 686 | 687 | 688 | ``` 689 | Merge pull request #51 from electrical/rspec3_support 690 | 691 | Rspec3 support 692 | ``` 693 | * (gh-51) Update to support serverspec/specinfra V2 and rspec3 (fa120293) 694 | 695 | 696 | ``` 697 | (gh-51) Update to support serverspec/specinfra V2 and rspec3 698 | 699 | Due to some changes in specinfra Ive had to change some code and override some specinfra code 700 | ``` 701 | ### beaker-rspec4.0.0 - 5 Dec, 2014 (a4fe104a) 702 | 703 | * Merge pull request #49 from anodelman/master (a4fe104a) 704 | 705 | 706 | ``` 707 | Merge pull request #49 from anodelman/master 708 | 709 | (QENG-1591) update beaker-rspec to use beaker 2.0 710 | ``` 711 | * (QENG-1591) update beaker-rspec to use beaker 2.0 (e0e86439) 712 | 713 | 714 | ``` 715 | (QENG-1591) update beaker-rspec to use beaker 2.0 716 | 717 | - includes update to minitest 718 | ``` 719 | * Merge pull request #46 from justinstoller/maint/master/make-gem (889eb4c5) 720 | 721 | 722 | ``` 723 | Merge pull request #46 from justinstoller/maint/master/make-gem 724 | 725 | bump beaker-rspec to 3.0 726 | ``` 727 | * bump beaker-rspec to 3.0 (e8a2a616) 728 | 729 | * Merge pull request #39 from hunner/remove_pm_install (9450a014) 730 | 731 | 732 | ``` 733 | Merge pull request #39 from hunner/remove_pm_install 734 | 735 | Move puppet_module_install to beaker dsl helpers 736 | ``` 737 | * Move puppet_module_install to beaker dsl helpers (128556e1) 738 | 739 | ### beaker-rspec2.2.6 - 23 Jun, 2014 (c899b70b) 740 | 741 | * Merge pull request #45 from anodelman/make-gem (c899b70b) 742 | 743 | 744 | ``` 745 | Merge pull request #45 from anodelman/make-gem 746 | 747 | (GEM) create beaker 2.2.6 gem 748 | ``` 749 | * (GEM) create beaker 2.2.6 gem (4c1bfe3b) 750 | 751 | * Merge pull request #44 from anodelman/maint (16e227cf) 752 | 753 | 754 | ``` 755 | Merge pull request #44 from anodelman/maint 756 | 757 | (QENG-833) beaker-rspec broken when using beaker 1.13 758 | ``` 759 | * (QENG-833) beaker-rspec broken when using beaker 1.13 (00e20566) 760 | 761 | 762 | ``` 763 | (QENG-833) beaker-rspec broken when using beaker 1.13 764 | 765 | - ensure that the logger object is available 766 | ``` 767 | ### beaker-rspec2.2.5 - 19 Jun, 2014 (4b9253e3) 768 | 769 | * Merge pull request #43 from hunner/update_specs (4b9253e3) 770 | 771 | 772 | ``` 773 | Merge pull request #43 from hunner/update_specs 774 | 775 | Remove development dependency 776 | ``` 777 | * Remove development dependency (13b4e72e) 778 | 779 | 780 | ``` 781 | Remove development dependency 782 | 783 | Beaker-rspec's tests are already compatible with rspec 3, so no need to 784 | update the specs for the latest rspec 785 | ``` 786 | * Merge pull request #42 from hunner/release_2.2.5 (e1e6f50a) 787 | 788 | 789 | ``` 790 | Merge pull request #42 from hunner/release_2.2.5 791 | 792 | Release 2.2.5 793 | ``` 794 | * Release 2.2.5 (76210e33) 795 | 796 | 797 | ``` 798 | Release 2.2.5 799 | 800 | Only change is to unpin rspec 2 as a runtime dependency. 801 | ``` 802 | * Merge pull request #41 from hunner/unpin_rspec (2db68b61) 803 | 804 | 805 | ``` 806 | Merge pull request #41 from hunner/unpin_rspec 807 | 808 | Unpin rspec 809 | ``` 810 | * Unpin rspec (6837d3a1) 811 | 812 | 813 | ``` 814 | Unpin rspec 815 | 816 | rspec 2.x is a development dependency, but the runtime dependency 817 | shouldn't pin to any specific version as the beaker-rspec library 818 | doesn't care. 819 | ``` 820 | ### beaker-rspec2.2.4 - 8 May, 2014 (8fdb93a9) 821 | 822 | * Merge pull request #38 from anodelman/make-gem (8fdb93a9) 823 | 824 | 825 | ``` 826 | Merge pull request #38 from anodelman/make-gem 827 | 828 | create beaker-rspec 2.2.4 gem 829 | ``` 830 | * create beaker-rspec 2.2.4 gem (caf3e39a) 831 | 832 | * Merge pull request #36 from hunner/fix_specinfra_deps (8a3a9192) 833 | 834 | 835 | ``` 836 | Merge pull request #36 from hunner/fix_specinfra_deps 837 | 838 | (QENG-657) Update specinfra and serverspec deps to be ~>1.0 839 | ``` 840 | * (QENG-657) Update specinfra and serverspec deps to be ~>1.0 (912c21ad) 841 | 842 | ### beaker-rspec2.2.3 - 23 Apr, 2014 (81241746) 843 | 844 | * Merge pull request #34 from anodelman/make-gem (81241746) 845 | 846 | 847 | ``` 848 | Merge pull request #34 from anodelman/make-gem 849 | 850 | create beaker-rspec 2.2.3 gem 851 | ``` 852 | * Merge pull request #33 from anodelman/pin-beaker-minitest (cb112dc8) 853 | 854 | 855 | ``` 856 | Merge pull request #33 from anodelman/pin-beaker-minitest 857 | 858 | (QENG-596) beaker-rspec dying on minitest dependency 859 | ``` 860 | * create beaker-rspec 2.2.3 gem (7e6c93cd) 861 | 862 | * (QENG-596) beaker-rspec dying on minitest dependency (f5f894f6) 863 | 864 | 865 | ``` 866 | (QENG-596) beaker-rspec dying on minitest dependency 867 | 868 | - pin minitest to 4.0 869 | - update beaker pin to newest release of 1.10.0 870 | ``` 871 | ### beaker-rspec2.2.2 - 27 Mar, 2014 (bd5717e6) 872 | 873 | * Merge pull request #31 from anodelman/update-beaker-version (bd5717e6) 874 | 875 | 876 | ``` 877 | Merge pull request #31 from anodelman/update-beaker-version 878 | 879 | update beaker-rspec to use beaker 1.9.1 880 | ``` 881 | * update beaker-rspec to use beaker 1.9.1 (5e6eb3ff) 882 | 883 | ### beaker-rspec2.2.1 - 24 Mar, 2014 (5ec50c57) 884 | 885 | * Merge pull request #28 from anodelman/make-gem (5ec50c57) 886 | 887 | 888 | ``` 889 | Merge pull request #28 from anodelman/make-gem 890 | 891 | create beaker-rspec 2.2.1 gem 892 | ``` 893 | * create beaker-rspec 2.2.1 gem (a0adc7ae) 894 | 895 | * Merge pull request #27 from anodelman/update-configuration-steps (7dfdb5af) 896 | 897 | 898 | ``` 899 | Merge pull request #27 from anodelman/update-configuration-steps 900 | 901 | update configuration/validation steps for beaker 1.8.1+ gem 902 | ``` 903 | * update configuration/validation steps for beaker 1.8.1+ gem (bafcee63) 904 | 905 | 906 | ``` 907 | update configuration/validation steps for beaker 1.8.1+ gem 908 | 909 | - beaker has changed its configuration/validation steps and beaker-rspec 910 | will need to be updated as well 911 | - these changes will need to be run with beaker 1.8.1+ 912 | ``` 913 | ### beaker-rspec2.2.0 - 13 Mar, 2014 (3f2cd006) 914 | 915 | * Merge pull request #25 from anodelman/make-gem (3f2cd006) 916 | 917 | 918 | ``` 919 | Merge pull request #25 from anodelman/make-gem 920 | 921 | create beaker-rspec 2.2.0 gem 922 | ``` 923 | * create beaker-rspec 2.2.0 gem (35b44546) 924 | 925 | 926 | ``` 927 | create beaker-rspec 2.2.0 gem 928 | 929 | - add support for BEAKER_*name* env var format 930 | ``` 931 | * Merge pull request #24 from anodelman/beaker-env (3ac1f383) 932 | 933 | 934 | ``` 935 | Merge pull request #24 from anodelman/beaker-env 936 | 937 | normalize env var handling 938 | ``` 939 | * normalize env var handling (00c70ed4) 940 | 941 | 942 | ``` 943 | normalize env var handling 944 | 945 | - have all env vars start with BEAKER_ 946 | - process all env vars in one hash 947 | - set all default values in one hash 948 | ``` 949 | ### beaker-rspec2.1.1 - 30 Jan, 2014 (94e2423a) 950 | 951 | * Merge pull request #20 from anodelman/make-gem (94e2423a) 952 | 953 | 954 | ``` 955 | Merge pull request #20 from anodelman/make-gem 956 | 957 | create beaker-rspec 2.1.1 gem 958 | ``` 959 | * create beaker-rspec 2.1.1 gem (a19acf47) 960 | 961 | * Merge pull request #18 from hunner/fix_destroy (26a52d79) 962 | 963 | 964 | ``` 965 | Merge pull request #18 from hunner/fix_destroy 966 | 967 | Patch RS_DESTROY behavior 968 | ``` 969 | * Patch RS_DESTROY behavior (5161054d) 970 | 971 | 972 | ``` 973 | Patch RS_DESTROY behavior 974 | 975 | QA-723's implementation moved the logic for `@options[:preserve_hosts]` 976 | out of the `Beaker::NetworkManager#cleanup` method to 977 | `Beaker::CLI#execute!` and beaker-rspec doesn't use the CLI, so the 978 | logic would have to be duplicated here, or beaker would need a patch to 979 | move it back. 980 | 981 | It doesn't really make sense for the cleanup method to conditionally 982 | cleanup, and it doesn't make sense for beaker to be inspecting the 983 | success state of RSpec, so beaker-rspec can be changed to work. 984 | ``` 985 | ### beaker-rspec2.1.0 - 29 Jan, 2014 (3ffb18f1) 986 | 987 | * Merge pull request #17 from anodelman/make-gem (3ffb18f1) 988 | 989 | 990 | ``` 991 | Merge pull request #17 from anodelman/make-gem 992 | 993 | create beaker-rspec 2.1.0 gem 994 | ``` 995 | * create beaker-rspec 2.1.0 gem (b28fd561) 996 | 997 | * Merge pull request #16 from hunner/preserve_hosts (6418ba11) 998 | 999 | 1000 | ``` 1001 | Merge pull request #16 from hunner/preserve_hosts 1002 | 1003 | Update argument passing for RS_DESTROY 1004 | ``` 1005 | * Merge pull request #15 from apenney/fix-serverspec (c1fe9385) 1006 | 1007 | 1008 | ``` 1009 | Merge pull request #15 from apenney/fix-serverspec 1010 | 1011 | specinfra 0.5.0 has made some changes that break run_command for us, 1012 | ``` 1013 | * Update argument passing for RS_DESTROY (80ab123b) 1014 | 1015 | * specinfra 0.5.0 has made some changes that break run_command for us, (860658b8) 1016 | 1017 | 1018 | ``` 1019 | specinfra 0.5.0 has made some changes that break run_command for us, 1020 | get the ret from CommandResult.new now. 1021 | ``` 1022 | ### beaker-rspec2.0.1 - 22 Jan, 2014 (0ece0e8d) 1023 | 1024 | * Merge pull request #13 from anodelman/repair-gemspec (0ece0e8d) 1025 | 1026 | 1027 | ``` 1028 | Merge pull request #13 from anodelman/repair-gemspec 1029 | 1030 | repair beaker-rspec.gemspec 1031 | ``` 1032 | * Merge pull request #14 from anodelman/setfile (395fb9fc) 1033 | 1034 | 1035 | ``` 1036 | Merge pull request #14 from anodelman/setfile 1037 | 1038 | env var fixes to allow for jenkins integration 1039 | ``` 1040 | * env var fixes to allow for jenkins integration (9b35685e) 1041 | 1042 | 1043 | ``` 1044 | env var fixes to allow for jenkins integration 1045 | 1046 | - allow for setting RS_SETFILE when running spec tests 1047 | - addition of RS_KEYFILE and RS_DEBUG 1048 | ``` 1049 | * repair beaker-rspec.gemspec (7e88246b) 1050 | 1051 | 1052 | ``` 1053 | repair beaker-rspec.gemspec 1054 | 1055 | - raises warnings on open-ended dependencies 1056 | - duplicate dependency on rspec 1057 | ``` 1058 | * Merge pull request #11 from anodelman/make-gem (13453bf4) 1059 | 1060 | 1061 | ``` 1062 | Merge pull request #11 from anodelman/make-gem 1063 | 1064 | beaker-rspec 2.0.1 gem 1065 | ``` 1066 | * Merge pull request #12 from anodelman/default-options (e183651a) 1067 | 1068 | 1069 | ``` 1070 | Merge pull request #12 from anodelman/default-options 1071 | 1072 | remove "--type git" from spec_helper.cfg 1073 | ``` 1074 | * remove "--type git" from spec_helper.cfg (fd3626b8) 1075 | 1076 | 1077 | ``` 1078 | remove "--type git" from spec_helper.cfg 1079 | 1080 | - set the type from within the given node configuration file 1081 | ``` 1082 | * beaker-rspec 2.0.1 gem (4c22e3d9) 1083 | 1084 | 1085 | ``` 1086 | beaker-rspec 2.0.1 gem 1087 | 1088 | - fixes support for options hash 1089 | - install_pe now works 1090 | ``` 1091 | * Merge pull request #10 from anodelman/access-options-hash (7bfeb5b9) 1092 | 1093 | 1094 | ``` 1095 | Merge pull request #10 from anodelman/access-options-hash 1096 | 1097 | (QE-628) install_pe needs to work with beaker-rspec 1098 | ``` 1099 | * (QE-628) install_pe needs to work with beaker-rspec (3fc9776e) 1100 | 1101 | 1102 | ``` 1103 | (QE-628) install_pe needs to work with beaker-rspec 1104 | 1105 | - add access to the options hash from beaker-rspec 1106 | ``` 1107 | ### beaker-rspec2.0.0 - 6 Dec, 2013 (d836ebac) 1108 | 1109 | * Merge pull request #9 from anodelman/make-gem (d836ebac) 1110 | 1111 | 1112 | ``` 1113 | Merge pull request #9 from anodelman/make-gem 1114 | 1115 | create 2.0.0 beaker-rspec gem 1116 | ``` 1117 | * create 2.0.0 beaker-rspec gem (09180d72) 1118 | 1119 | 1120 | ``` 1121 | create 2.0.0 beaker-rspec gem 1122 | 1123 | - upping to 2.0.0 because of change in ENV var support 1124 | ``` 1125 | * Merge pull request #8 from anodelman/fix-env-vars (422bb9c6) 1126 | 1127 | 1128 | ``` 1129 | Merge pull request #8 from anodelman/fix-env-vars 1130 | 1131 | (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified 1132 | ``` 1133 | * (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified (54ff767c) 1134 | 1135 | 1136 | ``` 1137 | (QE-603) RSPEC_DESTROY and RSPEC_NO_PROVISION need to be clarified 1138 | 1139 | - using RS_DESTROY=no for not destroying boxes post-test 1140 | - using RS_PROVISION=no for not provisioning boxes before tests 1141 | ``` 1142 | ### beaker-rspec1.0.0 - 3 Dec, 2013 (65e89ec9) 1143 | 1144 | * Initial release. 1145 | 1146 | 1147 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* 1148 | --------------------------------------------------------------------------------