disable acceptance tests on tasks

parent 87526386
Pipeline #11589 passed with stages
in 48 minutes and 38 seconds
...@@ -128,6 +128,11 @@ Acceptance tests are done : ...@@ -128,6 +128,11 @@ Acceptance tests are done :
* with Ubuntu 18.06 for FreeIPA clients . * with Ubuntu 18.06 for FreeIPA clients .
With follwoing issue not fixed the acceptance tests about tasks are disabled :
https://github.com/puppetlabs/beaker-task_helper/issues/47
PR : https://github.com/puppetlabs/beaker-task_helper/pull/48
Puppet4 is EOL since 2019-01-01. Even if puppet 4.10 should work, it is not tested. Puppet4 is EOL since 2019-01-01. Even if puppet 4.10 should work, it is not tested.
## Development ## Development
......
...@@ -2,54 +2,52 @@ require 'spec_helper_acceptance' ...@@ -2,54 +2,52 @@ require 'spec_helper_acceptance'
require 'beaker-task_helper/inventory' require 'beaker-task_helper/inventory'
require 'bolt_spec/run' require 'bolt_spec/run'
describe 'manage_admin task' do # With follwoing issue not fixed the acceptance tests about tasks are disabled :
include Beaker::TaskHelper::Inventory # https://github.com/puppetlabs/beaker-task_helper/issues/47
include BoltSpec::Run # PR : https://github.com/puppetlabs/beaker-task_helper/pull/48
#
def bolt_config # describe 'manage_admin task' do
{ 'modulepath' => File.join(File.dirname(File.expand_path(__FILE__)), '../', 'fixtures', 'modules') } # include Beaker::TaskHelper::Inventory
end # include BoltSpec::Run
#
def bolt_inventory # def bolt_config
hosts_to_inventory # { 'modulepath' => File.join(File.dirname(File.expand_path(__FILE__)), '../', 'fixtures', 'modules') }
end # end
#
context 'with ensure present' do # def bolt_inventory
it 'creates admin account' do # hosts_to_inventory
# rubocop:disable Style/BracesAroundHashParameters # end
result = run_task( #
'freeipa::manage_admin', # context 'with ensure present' do
'master', # it 'creates admin account' do
{ 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'present', 'login' => 'jaimarre', 'firstname' => 'Jean', 'lastname' => 'Ai marre', 'password' => 'adminsecret' } # result = run_task(
) # 'freeipa::manage_admin',
# rubocop:enable Style/BracesAroundHashParameters # 'master',
expect(result.first).to include('status' => 'success') # { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'present', 'login' => 'jaimarre', 'firstname' => 'Jean', 'lastname' => 'Ai marre', 'password' => 'adminsecret' }
end # )
end # expect(result.first).to include('status' => 'success')
# end
context 'with ensure absent on existing existing' do # end
it 'deletes admin account' do #
# rubocop:disable Style/BracesAroundHashParameters # context 'with ensure absent on existing existing' do
result = run_task( # it 'deletes admin account' do
'freeipa::manage_admin', # result = run_task(
'master', # 'freeipa::manage_admin',
{ 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' } # 'master',
) # { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' }
# rubocop:enable Style/BracesAroundHashParameters # )
expect(result.first).to include('status' => 'success') # expect(result.first).to include('status' => 'success')
end # end
end # end
#
context 'with ensure absent on NOT existing account' do # context 'with ensure absent on NOT existing account' do
it 'deletes admin account' do # it 'deletes admin account' do
# rubocop:disable Style/BracesAroundHashParameters # result = run_task(
result = run_task( # 'freeipa::manage_admin',
'freeipa::manage_admin', # 'master',
'master', # { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' }
{ 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' } # )
) # expect(result.first).to include('status' => 'success')
# rubocop:enable Style/BracesAroundHashParameters # end
expect(result.first).to include('status' => 'success') # end
end # end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment