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

(SDK-317) Ensure parent of 'pdk new module' is writable before generation #175

Merged
merged 1 commit into from
Jul 25, 2017

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Jul 19, 2017

Does an initial check before starting the interview, so that we don't waste the user's time. Also rescues Errno::EACCES from FileUtils.mv in the event that the permissions change between the pre-run check and the module generation.

let(:target_parent_writeable) { false }

it 'raises a FatalError' do
expect {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you also need to expect that it doesn't start the interview here first?

Copy link
Contributor

Choose a reason for hiding this comment

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

The ways I tried doing this as a unit test were all pretty clunky a likely to just silently continue passing if the underlying code was refactored. I'm inclined to just merge as-is.

@DavidS DavidS added the feature label Jul 20, 2017
@scotje scotje merged commit ea71bad into puppetlabs:master Jul 25, 2017
@rodjek rodjek deleted the sdk-317 branch July 27, 2017 01:52
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.

3 participants