Skip to content
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

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

Valantin
Copy link
Contributor

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

Use shared example for idempotency test
setup host with minimal working configuration
group => 'root',
mode => '0644',
content => "vrrp_instance VI_50 { interface ${facts['networking']['primary']}
virtual_router_id 50 }",
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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)

@Valantin Valantin requested a review from bastelfreak March 29, 2024 14:02
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')
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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 :)

@bastelfreak bastelfreak merged commit a47a6f4 into voxpupuli:master Mar 29, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Acceptance test not reflect correct behavior
3 participants