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
Improve documentation how to use the docker image to run tests with bats #707
Comments
I just found the documentation on https://github.com/bats-core/bats-core/wiki/Docker-Usage-Examples. Following the instructions lead to an error
|
Please provide a link to the documentation you used and if possible to the offending section.
The tutorial assumes you work with submodules. If you depart from that, the subsequent steps might not work as intended.
The code in the tutorial assumes the helper libraries are installed in specific subdirectories which the With this in mind, the tutorial might be rewritten to use
This example needs a rewrite, it only works with bats itself. Please try |
https://bats-core.readthedocs.io/en/stable/tutorial.html#dealing-with-output
I agree. My current solution was to use Setting So the tutorial code would look like
|
This works for me with
|
Focus on how to use bats in another project. Document how one loads libraries, solves bats-core#707.
Focus on how to use bats in another project. Document how one loads libraries, solves bats-core#707.
I think arve0's comment and PR already says everything that needs to be said here. The only thing remaining is changing the tutorial. |
The current documentation does not provide enough information so that users could just start working with
bats-core
using a container runtime instead of a location installation.This issue is related to #150 (which is quite old and this I created a new ticket since the image has probably changes since 2018).
My goal was to create a test suite for my bash program and execute it with the docker image provided by
bats-core
.Since I have no experience with
bats
I started the tutorial but instead of having a local installation withgit submodule
I run the test/tutorial withI could follow the tutorial until the first helper module was loaded via
load 'test_helper/bats-support/load
where I got the following error.Solution
The solution to my problem was simple, but it toke me a quite a while to figure it out.
The reason for this error was the location in which the helper libraries are installed in the container image.
bats
itself is installed in/opt/bats
, the helper libraries in/usr/lib/bats
.I had to create a symbolic link in the test directory, which would provide me tha access
It would be nice to improve the tutorial so other users have a better time to get started with
bats
.The text was updated successfully, but these errors were encountered: