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

(MODULES-10691) - Add root_dir in daemon.json #632

Merged
merged 5 commits into from
Jul 15, 2020
Merged

Conversation

daianamezdrea
Copy link
Contributor

No description provided.

@daianamezdrea daianamezdrea requested a review from a team as a code owner July 8, 2020 16:22
@daianamezdrea
Copy link
Contributor Author

This solves 10691


it 'is good' do
apply_manifest(pp, catch_failures: true)
run_shell('cat C:/ProgramData/docker/config/daemon.json') do |r|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's helpers that can verify the content of the file in puppet-rspec - see here

...although this is fine 👍

One thing I might suggest is verifying the value of data-root too?

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2020

Codecov Report

Merging #632 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #632   +/-   ##
=======================================
  Coverage   27.94%   27.94%           
=======================================
  Files          19       19           
  Lines         680      680           
=======================================
  Hits          190      190           
  Misses        490      490           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e6666cf...2c48f10. Read the comment docs.

@adrianiurca adrianiurca changed the title Add root_dir in daemon.json (MODULES-10691) - Add root_dir in daemon.json Jul 14, 2020
@@ -9,12 +9,12 @@
raise 'Could not retrieve ip address for Windows box' if result.exit_code != 0
ip = result.stdout.split("\n")[0].split(':')[1].strip
@windows_ip = ip
docker_arg = "docker_ee => true, extra_parameters => '\"insecure-registries\": [ \"#{@windows_ip}:5000\" ]'"
docker_args = "docker_ee => true, extra_parameters => '\"insecure-registries\": [ \"#{@windows_ip}:5000\" ]'"
root_dir = 'C:/Users/Administrator/AppData/Local/Temp'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably just make this more generic, seeing it's going to be used on both Windows and Unix:

root_dir = '/foo/bar'

We may need to unset this in an :after block too, depending on the impact. However, we're currently setting root-dir with Windows path on Unix systems, so we may be getting away with it if docker_args is being set in every test (something to look in to)?

Copy link
Contributor

@adrianiurca adrianiurca Jul 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sanfrancrisko
The root_dir is set with 'C:/Users/Administrator/AppData/Local/Temp' on windows oses and with '/root' for Linux systems. But I think we can make the new test to be more generic such as:
class { 'docker': #{docker_args}, root_dir => \"#{root_dir}/foo/bar\"}
Are you agree?

Kind regards,
Adrian IURCA

@carabasdaniel carabasdaniel merged commit 51e2886 into master Jul 15, 2020
@daianamezdrea daianamezdrea deleted the root_dir branch July 15, 2020 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants