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

Optional message in assert method should add a space before stderr #15

Closed
guillaumevincent opened this issue Sep 13, 2016 · 3 comments
Closed

Comments

@guillaumevincent
Copy link
Contributor

test_admin_can_execute_sudo_without_password(){
    run_ansible
    assert "grep 'admin ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/admin" "admin is not sudoer"
}

screenshot from 2016-09-13 11-24-26

optional message in assert method should print stderr on a new line.

admin is not sudoer grep: /etc/sudoers.d/admin: No such file or directory
instead of
admin is not sudoergrep: /etc/sudoers.d/admin: No such file or directory

@pgrange
Copy link
Owner

pgrange commented Sep 13, 2016

Fixed by #16

@pgrange
Copy link
Owner

pgrange commented Sep 13, 2016

@guillaumevincent for your eyes only I detailed the path to displaying stdout and stderr in assert, assert_fail and assert_status_code without repeating ourselves.

See commits in branch assert_print_stdout_stderr https://github.com/pgrange/bash_unit/commits/assert_print_stdout_stderr

... easier when done sooner and with less beer

@pgrange pgrange closed this as completed Sep 13, 2016
@guillaumevincent
Copy link
Contributor Author

thanks for the detailed version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants