-
Notifications
You must be signed in to change notification settings - Fork 315
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
Conversation
This solves 10691 |
spec/acceptance/docker_spec.rb
Outdated
|
||
it 'is good' do | ||
apply_manifest(pp, catch_failures: true) | ||
run_shell('cat C:/ProgramData/docker/config/daemon.json') do |r| |
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.
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 Report
@@ 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.
|
@@ -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' |
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.
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)?
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.
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
No description provided.