Commit 2daa5dad authored by Fabien Combernous's avatar Fabien Combernous
Browse files

Merge branch '121-disable-acceptance-testing-about-tasks' into 'master'

Resolve "disable acceptance testing about tasks"

Closes #121

See merge request !122
parents 87526386 955d2971
Pipeline #11606 canceled with stages
in 2 minutes and 11 seconds
......@@ -128,6 +128,11 @@ Acceptance tests are done :
* 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.
## Development
......
......@@ -2,54 +2,52 @@ require 'spec_helper_acceptance'
require 'beaker-task_helper/inventory'
require 'bolt_spec/run'
describe 'manage_admin task' do
include Beaker::TaskHelper::Inventory
include BoltSpec::Run
def bolt_config
{ 'modulepath' => File.join(File.dirname(File.expand_path(__FILE__)), '../', 'fixtures', 'modules') }
end
def bolt_inventory
hosts_to_inventory
end
context 'with ensure present' do
it 'creates admin account' do
# rubocop:disable Style/BracesAroundHashParameters
result = run_task(
'freeipa::manage_admin',
'master',
{ 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'present', 'login' => 'jaimarre', 'firstname' => 'Jean', 'lastname' => 'Ai marre', 'password' => 'adminsecret' }
)
# rubocop:enable Style/BracesAroundHashParameters
expect(result.first).to include('status' => 'success')
end
end
context 'with ensure absent on existing existing' do
it 'deletes admin account' do
# rubocop:disable Style/BracesAroundHashParameters
result = run_task(
'freeipa::manage_admin',
'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')
end
end
context 'with ensure absent on NOT existing account' do
it 'deletes admin account' do
# rubocop:disable Style/BracesAroundHashParameters
result = run_task(
'freeipa::manage_admin',
'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')
end
end
end
# 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
#
# describe 'manage_admin task' do
# include Beaker::TaskHelper::Inventory
# include BoltSpec::Run
#
# def bolt_config
# { 'modulepath' => File.join(File.dirname(File.expand_path(__FILE__)), '../', 'fixtures', 'modules') }
# end
#
# def bolt_inventory
# hosts_to_inventory
# end
#
# context 'with ensure present' do
# it 'creates admin account' do
# result = run_task(
# 'freeipa::manage_admin',
# 'master',
# { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'present', 'login' => 'jaimarre', 'firstname' => 'Jean', 'lastname' => 'Ai marre', 'password' => 'adminsecret' }
# )
# expect(result.first).to include('status' => 'success')
# end
# end
#
# context 'with ensure absent on existing existing' do
# it 'deletes admin account' do
# result = run_task(
# 'freeipa::manage_admin',
# 'master',
# { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' }
# )
# expect(result.first).to include('status' => 'success')
# end
# end
#
# context 'with ensure absent on NOT existing account' do
# it 'deletes admin account' do
# result = run_task(
# 'freeipa::manage_admin',
# 'master',
# { 'operator_login' => 'admin', 'operator_password' => 's^ecr@et.ea;R/O*=?j!.QsAu+$', 'ensure' => 'absent', 'login' => 'jaimarre' }
# )
# expect(result.first).to include('status' => 'success')
# 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