Jira (PUP-8488) Convert usage of Puppet.features.microsoft_windows? to Puppet::Util::Platform.windows? where appropriate

2 views
Skip to first unread message

Eric Delaney (JIRA)

unread,
Feb 23, 2018, 2:46:02 PM2/23/18
to puppe...@googlegroups.com
Eric Delaney created an issue
 
Puppet / Task PUP-8488
Convert usage of Puppet.features.microsoft_windows? to Puppet::Util::Platform.windows? where appropriate
Issue Type: Task Task
Assignee: Eric Delaney
Created: 2018/02/23 11:45 AM
Priority: Normal Normal
Reporter: Eric Delaney

Convert usage of Puppet.features.microsoft_windows? to Puppet::Util::Platform.windows? where appropriate.

We need to be careful when reviewing the usages, its ok to mock the usage of Puppet.features.microsoft_windows? however we should NOT be mocking out the Puppet::Util::Platform.windows?, so care must be taken to ensure the things we convert make sense and that we continue to have the proper testing coverage.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Eric Delaney (JIRA)

unread,
Feb 26, 2018, 4:59:02 PM2/26/18
to puppe...@googlegroups.com

Eric Putnam (JIRA)

unread,
Feb 27, 2018, 1:41:03 PM2/27/18
to puppe...@googlegroups.com

Eric Putnam (JIRA)

unread,
Feb 27, 2018, 1:48:03 PM2/27/18
to puppe...@googlegroups.com
Eric Putnam updated an issue
 
Change By: Eric Putnam
Convert usage of [ Puppet.features.microsoft_windows? |https://github.com/puppetlabs/puppet/blob/master/lib/puppet/feature/base.rb#L17] to [ Puppet::Util::Platform.windows? |https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/windows.rb] where appropriate.


We need to be careful when reviewing the usages, its ok to mock the usage of Puppet.features.microsoft_windows? however we should NOT be mocking out the Puppet::Util::Platform.windows?, so care must be taken to ensure the things we convert make sense and that we continue to have the proper testing coverage.

Eric Putnam (JIRA)

unread,
Feb 27, 2018, 2:05:04 PM2/27/18
to puppe...@googlegroups.com
Eric Putnam updated an issue
Convert usage of [Puppet.features.microsoft_windows?|https://github.com/puppetlabs/puppet/blob/master/lib/puppet/feature/base.rb#L17] to [Puppet::Util::Platform.windows?|https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/ windows platform .rb #L7 ] where appropriate.


We need to be careful when reviewing the usages, its ok to mock the usage of Puppet.features.microsoft_windows? however we should NOT be mocking out the Puppet::Util::Platform.windows?, so care must be taken to ensure the things we convert make sense and that we continue to have the proper testing coverage.

Eric Delaney (JIRA)

unread,
Feb 27, 2018, 5:52:03 PM2/27/18
to puppe...@googlegroups.com
Eric Delaney commented on Task PUP-8488
 
Re: Convert usage of Puppet.features.microsoft_windows? to Puppet::Util::Platform.windows? where appropriate

Looking through the modules, it appears that the only place that we stub out microsoft_windows? we're also stubbing windows?

./puppetlabs-inifile/spec/unit/puppet/type/ini_setting_spec.rb:        Puppet.features.stub(:microsoft_windows?) { false }
./puppetlabs-inifile/spec/unit/puppet/type/ini_setting_spec.rb:        Puppet::Util::Platform.stub(:windows?) { false }
./puppetlabs-inifile/spec/unit/puppet/type/ini_setting_spec.rb:        Puppet.features.stub(:microsoft_windows?) { true }
./puppetlabs-inifile/spec/unit/puppet/type/ini_setting_spec.rb:        Puppet::Util::Platform.stub(:windows?) { true }

John Duarte (JIRA)

unread,
Oct 21, 2019, 10:55:05 AM10/21/19
to puppe...@googlegroups.com
John Duarte updated an issue
 
Change By: John Duarte
QA Risk Assessment: Needs Assessment No Action
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages