Skip to content
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

Issue running Onceover within a Docker container #317

Open
jortencio opened this issue Oct 19, 2021 · 0 comments
Open

Issue running Onceover within a Docker container #317

jortencio opened this issue Oct 19, 2021 · 0 comments

Comments

@jortencio
Copy link

jortencio commented Oct 19, 2021

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:

image

When running in debug mode, it shows that symbolic links are being generated to reference these classes:

image

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"

image

The environment I used for testing this:

  • MacOS (Big Sur 11.6)
  • Docker (20.10.7)
  • Onceover (3.20.0)
  • Ruby (2.6.0)
  • Bundler (2.2.29)

Docker Containers tested:

  • puppet/puppet-dev-tools:4.x
  • ruby:2.6.0

Control-repo tested:
Basic control-repo cloned from the puppet control-repo template (https://github.com/puppetlabs/control-repo) with onceover initialised.

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

No branches or pull requests

1 participant