-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Refactor acceptance test #325
Conversation
Use shared example for idempotency test setup host with minimal working configuration
d6d408e
to
9dd9290
Compare
group => 'root', | ||
mode => '0644', | ||
content => "vrrp_instance VI_50 { interface ${facts['networking']['primary']} | ||
virtual_router_id 50 }", |
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.
the newline in the string looks a bit odd. Is that on purpose?
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 don't know what separator keepalive use for different configuration, I've tried comma and semicolon but not work, with newline it pass the check during service start
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.
"...\n..." should be able to do the trick w/o wrapping the line then (I guess)
expect(ip_result.stdout).to match %r{.*inet 10\.0\.0\.1/16 .*} | ||
describe 'when service running' do | ||
it 'has acquired the ip' do | ||
ip_result = shell('sleep 10; ip addr') |
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.
maybe it should be like (just guessing from the file
case above, never tried to execute):
describe shell('sleep 10; ip addr') do
its(:stdout) { is_expected.to match %r{.*inet 10\.0\.0\.1/16 .*}
end
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.
thanks for suggestion but I'm try now and in this way it fails, don't know why
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.
nevermind then, it doesn't really matter :)
Pull Request (PR) description
Use shared example for idempotency test
setup host with minimal working configuration
This Pull Request (PR) fixes the following issues
Fixes #324