You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue when running Onceover within a Docker container as it is unable to find the classes that it is testing. I believe this is due to Dockers interaction with symbolic links on a mounted volume.
To reproduce the issue, run onceover (3.20.0) within a puppet-dev-tools:4.x container against a control-repo mounted from a given location on the local filesystem (in this case ~/Projects/control-repo) to /repo: docker run --rm -u puppetdev -v ~/Projects/control-repo:/repo puppet/puppet-dev-tools:4.x /bin/bash -c "gem install bundler:2.2.29 && bundle install && bundle exec onceover run spec"
The output results in classes being not found as per the following output as it is unable to resolve the symbolic links:
When running in debug mode, it shows that symbolic links are being generated to reference these classes:
A workaround that I have found for this issue is to copy the contents of the mounted volume to another location on the containers filesystem:
docker run --rm -u puppetdev -v ~/Projects/control-repo:/repo puppet/puppet-dev-tools:4.x /bin/bash -c "cp -r /repo /home/puppetdev/ && cd /home/puppetdev/repo && gem install bundler:2.2.29 && bundle install && bundle exec onceover run spec"
There seems to be an issue when running Onceover within a Docker container as it is unable to find the classes that it is testing. I believe this is due to Dockers interaction with symbolic links on a mounted volume.
To reproduce the issue, run onceover (3.20.0) within a puppet-dev-tools:4.x container against a control-repo mounted from a given location on the local filesystem (in this case ~/Projects/control-repo) to /repo:
docker run --rm -u puppetdev -v ~/Projects/control-repo:/repo puppet/puppet-dev-tools:4.x /bin/bash -c "gem install bundler:2.2.29 && bundle install && bundle exec onceover run spec"
The output results in classes being not found as per the following output as it is unable to resolve the symbolic links:
When running in debug mode, it shows that symbolic links are being generated to reference these classes:
A workaround that I have found for this issue is to copy the contents of the mounted volume to another location on the containers filesystem:
docker run --rm -u puppetdev -v ~/Projects/control-repo:/repo puppet/puppet-dev-tools:4.x /bin/bash -c "cp -r /repo /home/puppetdev/ && cd /home/puppetdev/repo && gem install bundler:2.2.29 && bundle install && bundle exec onceover run spec"
The environment I used for testing this:
Docker Containers tested:
Control-repo tested:
Basic control-repo cloned from the puppet control-repo template (https://github.com/puppetlabs/control-repo) with onceover initialised.
The text was updated successfully, but these errors were encountered: