-
-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable acceptance tests #469
Conversation
@Dan33l should we merge this as is or do you want to work more on it? |
We could merge as this. |
describe 'System Ruby with No SSL, Not protected, No mcollective' do | ||
context 'default parameters' do | ||
let(:pp) do | ||
" | ||
pp = %( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this not be a let block anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it is clearer in this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference in evaluation and https://stackoverflow.com/questions/5359558/when-to-use-rspec-let/5359979#5359979 outlines why let blocks are preferred.
ensure => present, | ||
} | ||
) | ||
apply_manifest(ensure_puppet_user_exists, catch_failures: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A shorter way to write this is on host, puppet('resource', 'user', 'ensure=present')
. Otherwise you should apply_manifest_on(host, ensure_puppet_user_exists, catch_failures: true)
for it to work correctly on multiple nodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this shorter way i got this log :
centos7-64-1 23:05:44$ puppet resource user ensure=present
user { 'ensure=present':
ensure => 'absent',
}
And even with puppet resource user puppet
, it is yet produced ensure=>absent
. hu!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it should have been on host, puppet('resource', 'user', 'puppet', 'ensure=present')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And you should have at least looked at my other comment. This current version is applying the same manifest only on the default node for every host. In a single node env that doesn't matter, but it's a bad example and people copy paste.
5e050d1
to
a140987
Compare
Since the keyword |
|
||
# rubocop:disable RSpec/MultipleExpectations | ||
it 'successfully locks when hammered with multiple requests' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do wonder about the concurrency here. describe blocks are run separate so you might be changing the test to run 4 commands sequentially while the test is actually run 4 commands in parallel.
describe 'System Ruby with No SSL, Not protected, No mcollective' do | ||
context 'default parameters' do | ||
let(:pp) do | ||
" | ||
pp = %( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference in evaluation and https://stackoverflow.com/questions/5359558/when-to-use-rspec-let/5359979#5359979 outlines why let blocks are preferred.
Pull Request (PR) description
First work to enable beaker acceptance tests in the module.
Code to make tests was already present. It expected some output. And now i get no output at all.
This Pull Request (PR) fixes the following issues