Skip to content

Add md5checksum#97

Merged
mizzy merged 4 commits into
mizzy:masterfrom
netmarkjp:add_md5checksum
May 10, 2013
Merged

Add md5checksum#97
mizzy merged 4 commits into
mizzy:masterfrom
netmarkjp:add_md5checksum

Conversation

@netmarkjp

Copy link
Copy Markdown
Contributor

add have_md5checksum matcher for md5 checksum check.

sample use case: check deployment of latest license file with binary format.

@mizzy

mizzy commented May 9, 2013

Copy link
Copy Markdown
Owner

Which is better do you think?

  • have_md5checksum
  • match_md5checksum

@netmarkjp

Copy link
Copy Markdown
Contributor Author

I think match_md5checksum is better.

Shuld I change name and pull-request again?

@mizzy

mizzy commented May 9, 2013

Copy link
Copy Markdown
Owner

Thanks for your answer.I think so, too.

You don't need to send a pull request-again.

Only you have to do is change your code and push your code to this branch.

Your change will be added to this pull request automatically.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    ret = backend.run_command(backend.commands.check_file_md5checksum(file, pattern))
    ret[:exit_status] == 0

This should be like this:

    backend.check_file_md5checksum(example, file, pattern)

Here, method_missing is called because check_file_md5checksum is not implemented in Backend::Exec.
https://github.com/mizzy/serverspec/blob/master/lib/serverspec/backend/exec.rb#L32

And method_missing runs commands.check_file_md5checksum(file, pattern) and check its exit status.

@mizzy mizzy merged commit b4e20ef into mizzy:master May 10, 2013
@mizzy

mizzy commented May 10, 2013

Copy link
Copy Markdown
Owner

Thanks!

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.

2 participants