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

Descriptive spec #39

Merged
merged 3 commits into from
Jan 9, 2015
Merged

Descriptive spec #39

merged 3 commits into from
Jan 9, 2015

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Jan 8, 2015

When running the current version of tests for our crypto algos and a spec fails, we get an output similar to this:

2) check sshd_config File "/etc/ssh/sshd_config" content should valid cipher
    Failure/Error: should valid_cipher
     expected "..." to valid cipher

This is not very helpful, since it doesn't tell us what it really expects (e.g. a list of valid ciphers). Best case scenario: you only have to look into the spec file, worst case: your spec has some other error (like OS-detection) and it starts to get really messy.

This implementation fixes this issue. It is not as elegant as the current one, but prints very descriptive errors:

2) check ssh_config File "/etc/ssh/ssh_config" content should match /^Ciphers aes256-ctr,aes192-ctr,aes128-ctr$/

When running the current version of tests and a spec fails, we get an output similar to this:

    2) check sshd_config File "/etc/ssh/sshd_config" content should valid cipher
    Failure/Error: should valid_cipher
     expected "..." to valid cipher

This is not very helpful, since it doesn't tell us what it really expects (e.g. a list of valid ciphers). Best case scenario: you only have to look into the spec file, worst case: your spec has some other error (like OS-detection) and it starts to get really confusing.

This implementation fixes this issue. It is not as elegant as the current one, but prints very descriptive errors:

    2) check ssh_config File "/etc/ssh/ssh_config" content should match /^Ciphers aes256-ctr,aes192-ctr,aes128-ctr$/

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
@ehaselwanter
Copy link
Contributor

from a user point of view an improvement. I value feedback over elegance

@atomic111
Copy link
Member

great, thank you

atomic111 pushed a commit that referenced this pull request Jan 9, 2015
@atomic111 atomic111 merged commit 8bed094 into master Jan 9, 2015
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
@arlimus arlimus deleted the descriptive-spec branch January 14, 2015 16:07
chris-rock pushed a commit that referenced this pull request Oct 15, 2015
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

Successfully merging this pull request may close these issues.

3 participants