Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adullact
puppet-freeipa
Commits
955d2971
Unverified
Commit
955d2971
authored
Nov 13, 2020
by
Fabien Combernous
Browse files
disable acceptance tests on tasks
parent
87526386
Pipeline
#11589
passed with stages
in 48 minutes and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
955d2971
...
...
@@ -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
...
...
spec/acceptance/02_manage_admin_spec.rb
View file @
955d2971
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment