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-3475) Support AlwaysAutoRebootAtScheduledTimeMinutes #48

Merged
merged 1 commit into from
Jul 13, 2016

Conversation

adasko
Copy link

@adasko adasko commented Jun 15, 2016

https://tickets.puppetlabs.com/browse/MODULES-3475

adding support for AlwaysAutoRebootAtScheduledTimeMinutes which allows to restart host immediately after installing the updates

@ferventcoder
Copy link
Contributor

How is this different than #47?

@ferventcoder
Copy link
Contributor

And now I'm seeing it in the JIRA ticket...

@adasko
Copy link
Author

adasko commented Jun 15, 2016

Yap, that's different. ;)
And one thing - my tests have failed cuz I declare a valid range for this key in classes/init_spec.rb. The lowest acceptable value is 15. Value of 14 did not pass the test, since the test expects the value between 0 and 9. I would expect the test to pass with any given value below the range, or maybe I misunderstood something.

let(:reg_key) { "#{au_key}\\AlwaysAutoRebootAtScheduledTimeMinutes" }
let(:param_sym) { :always_auto_reboot_at_scheduled_time_minutes }
let(:below_range) { 14 }
let(:above_range) { 181 }
Copy link
Contributor

Choose a reason for hiding this comment

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

14 is the first error below range, 181 is the first value above range.

It looks like you set the tests up correctly. I'm not sure what would have caused the failure straight away.

@jpogran
Copy link
Contributor

jpogran commented Jun 17, 2016

@adasko I'll look at the test failures and see if I can help. In the mean time could you please adjust your commit messages to conform to the contributing guidelines?

@adasko adasko changed the title MODULES-3475/Support AlwaysAutoRebootAtScheduledTimeMinutes (MODULES-3475) Support AlwaysAutoRebootAtScheduledTimeMinutes Jun 20, 2016
The AlwaysAutoRebootAtScheduledTimeMinutes key allows the user to set
the time after which computer will automaticaly restart after applying
the updates regardless if a user is logged on or not instead of waiting
next one days before restart
@adasko
Copy link
Author

adasko commented Jun 20, 2016

OK, I've changed the commit message a bit. Hope it looks better now.

@glennsarti
Copy link
Contributor

@adasko Looks like Travis CI and Appveyor found some test failures

@adasko
Copy link
Author

adasko commented Jul 13, 2016

@glennsarti yes, that is true. Some of my code failed the test. The output of the failed test looks like this:

  behaves like below range
    should raise Puppet::Error with message matching /Expected 14 to be greater or equal to \d, got 14/ (FAILED - 1)

Seems that test expects the beginning of the range to be one digit value. In this case that's the wrong approach, since the right range for this parameter is:

validate_range => [15,180],

Please check the comments above.

@glennsarti
Copy link
Contributor

@adasko I've raised #55 to fix that shared test group

@glennsarti
Copy link
Contributor

@adasko So that other PR is merged, I've restarted your CI jobs. Hopefully it's all green

@glennsarti glennsarti merged commit 6a1a0a4 into puppetlabs:master Jul 13, 2016
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.

None yet

5 participants