Skip to content

CLOUD-1854-Fixing github issue #213 #247

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

Merged

Conversation

MWilsonPuppet
Copy link

This fixes issue #213 where the daemon was being restarted when a new user was added. Spec and acceptance tests have been added also.

context 'with default' do
let(:params) { {'create_user' => true} }
it { should contain_user('testuser') }
it { should contain_exec('docker-system-user-testuser').with_command(/docker testuser/) }
it { should contain_exec('docker-system-user-testuser').with_unless(/grep -qw testuser/) }
end

context 'when adding a system user' do
Copy link
Contributor

Choose a reason for hiding this comment

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

@MWilsonPuppet we don't need this test. The one you've added in the docker spec is sufficient. This one is failing because you're passing in a param that doesn't actually exist in the define type, not does the exec. A better place to test this would be in the service_spec.rb

@@ -422,7 +422,6 @@
it { should compile.with_all_deps }
it { should contain_class('docker::repos').that_comes_before('Class[docker::install]') }
it { should contain_class('docker::install').that_comes_before('Class[docker::config]') }
it { should contain_class('docker::service').that_subscribes_to('Class[docker::config]') }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add in as part of this ensuring that the config class comes before the service class?

@@ -28,7 +28,6 @@
it { should contain_exec('install-docker-package').with_command("& #{service_install_file}") }
it { should contain_class('docker::repos').that_comes_before('Class[docker::install]') }
it { should contain_class('docker::install').that_comes_before('Class[docker::config]') }
it { should contain_class('docker::service').that_subscribes_to('Class[docker::config]') }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add in as part of this ensuring that the config class comes before the service class?

@MWilsonPuppet MWilsonPuppet force-pushed the CLOUD-1854-Fixing-restart-on-useradd branch from d5d545c to 52a7d1a Compare June 18, 2018 21:37
@MWilsonPuppet MWilsonPuppet changed the title WIP-Do not merge-CLOUD-1854-Fixing github issue #213 CLOUD-1854-Fixing github issue #213 Jun 18, 2018
@MWilsonPuppet
Copy link
Author

@davejrt Cheers for feedback. All changes have been made and unit and acceptance tests passing.

@davejrt
Copy link
Contributor

davejrt commented Jun 19, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants