diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 376b413..2ae3f4e 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -1,34 +1,36 @@ # frozen_string_literal: true require 'singleton' class LitmusHelper include Singleton include PuppetLitmus end def pre_run LitmusHelper.instance.apply_manifest("class { 'mysql::server': root_password => 'password' }", catch_failures: true) end def mysql_version shell_output = LitmusHelper.instance.run_shell('mysql --version', expect_failures: true) if shell_output.stdout.match(%r{\d+\.\d+\.\d+}).nil? pre_run shell_output = LitmusHelper.instance.run_shell('mysql --version') raise _('unable to get mysql version') if shell_output.stdout.match(%r{\d+\.\d+\.\d+}).nil? end mysql_version = shell_output.stdout.match(%r{\d+\.\d+\.\d+})[0] mysql_version end RSpec.configure do |c| c.before :suite do if os[:family] == 'debian' || os[:family] == 'ubuntu' # needed for the puppet fact LitmusHelper.instance.apply_manifest("package { 'lsb-release': ensure => installed, }", expect_failures: false) + # needed for percona xtra backup + LitmusHelper.instance.apply_manifest("package { 'curl': ensure => installed, }", expect_failures: false) end # needed for the grant tests, not installed on el7 docker images LitmusHelper.instance.apply_manifest("package { 'which': ensure => installed, }", expect_failures: false) end end