-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add smoke tests #89
Add smoke tests #89
Conversation
This helps prevent Docker layers from being invalidated needlessly.
The representer expects the source files to be in a `lib` directory. Without this change, the Docker-based smoke test don't run.
@angelikatyborska Would you mind taking a look? |
I'm pretty busy in the next 7 days, maybe @jiegillet can review? |
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.
Looks good, thank you for doing this, and sorry about the lib
thing, I bet it took a while to figure out!
I left some minor requests.
echo "${test_dir_name}: comparing ${file} to ${expected_file}" | ||
|
||
if ! diff "${test_dir_path}/${file}" "${test_dir_path}/${expected_file}"; then | ||
exit_code=1 |
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.
Can we echo a something about the file being different here? Easier to make sense out of a failure. Same for the other check below.
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.
Well, the line above has:
echo "${test_dir_name}: comparing ${file} to ${expected_file}"
Wouldn't that be enough?
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.
No, because it won't exit here right? It only sets exit_code=1
, so if something fails we won't know where that happened
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.
This is an example of what the output looks like when there is a mismatch:
user_defined_structs: comparing representation.txt to expected_representation.ex
2c2
< defstruct [:wheels, :doors, :color]
---
> struct [:wheels, :doors, :color]
That's not enough you think?
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.
Oh, sorry I didn't realize we would get the output from the diff
. Yes, thank you that's plenty.
Thanks all! |
input.ex
files tolib
directory for test dataI've tried to keep the existing structure as much the same as possible.