-
Notifications
You must be signed in to change notification settings - Fork 443
build: add travis test for mounted test files #93
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
Conversation
This is to cover the use case of developing against bats in a container with a watch command
Odd...the failure is due to a violation of unofficial Bash strict mode. Will look a little later. |
Ah, now I see it, plain as day (from https://travis-ci.org/bats-core/bats-core/jobs/389756078):
This because the test case runs Bats thus: run bash -u "${BATS_TEST_DIRNAME%/*}/libexec/bats" \
"$FIXTURE_ROOT/unofficial_bash_strict_mode.bats" So So I'd suggest the command should be some variation of the following: docker run -it -v $(pwd):/opt/bats-dev bats:latest /opt/bats-dev/test Yep, that runs very nicely! |
I should add, to be clear: the failure was due to the |
And actually, I'm beginning to wonder if the extra build step is of any value to our build, given the documented technique in #94. What do you think? |
As per conversation in bats-core#93 (comment)
I'd prefer to have the tests runnable in isolation as they're testing the application in the container, but I understand that adding code to do so may be un-intuitive for maintainers. I've updated the PR to reflect requested changes in #93 (comment) |
Just added a comment to your latest update in #93. I think I understand what you're saying now, and suggested more explicit wording. |
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.
Just noticed this is still open...and the second command is still failing because bats-core/test
is still getting mounted in isolation from bats-core
.
Did you still want to fix this up and get it in, @sublimino?
I re-tested it earlier today and your assertion is correct @mbland. Will get it fixed |
I am closing this since we don't use travis anymore. The usecase might still be valid. If so, we should put up an issue for that. |
This is to cover the use case of developing against bats in a container
with a watch command.
It currently fails due to issues resolving bats' own path as per the issues under discussion in #91