cdenneen / puppet-testmod

Test module created with pdk to show adding filter to on_supported_os removes windows from tests even though facterdb provides facts
0 stars 0 forks source link

facterversion filter doesn't work for windows #1

Open cdenneen opened 6 years ago

cdenneen commented 6 years ago

https://github.com/cdenneen/puppet-testmod/blob/master/spec/spec_helper.rb#L10-L14

https://github.com/cdenneen/puppet-testmod/blob/master/spec/classes/init_spec.rb#L4

work/testmod » be rake spec
Could not find semantic_puppet gem, falling back to internal functionality. Version checks may be less robust.
I, [2017-11-14T11:16:32.274757 #34261]  INFO -- : Creating symlink from spec/fixtures/modules/testmod to /Users/cdenneen/work/testmod
/Users/cdenneen/.rbenv/versions/2.1.9/bin/ruby -I/Users/cdenneen/work/testmod/.bundle/gems/rspec-core-3.7.0/lib:/Users/cdenneen/work/testmod/.bundle/gems/rspec-support-3.7.0/lib /Users/cdenneen/work/testmod/.bundle/gems/rspec-core-3.7.0/exe/rspec --pattern spec/\{aliases,classes,defines,unit,functions,hosts,integration,type_aliases,types\}/\*\*/\*_spec.rb --color

testmod
  supported operating systems
    on centos-7-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles
    on debian-8-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles
    on oraclelinux-7-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles
    on redhat-7-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles
    on scientific-7-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles
    on ubuntu-16.04-x86_64
      testmod with default params
        should compile into a catalogue without dependency cycles

Finished in 0.34989 seconds (files took 2.38 seconds to load)
6 examples, 0 failures

Not sure if this is a rspec, rspec-puppet or where the issue actually is.

DavidS commented 6 years ago

It seems to work, what is the issue even?

DavidS commented 6 years ago

ah, this was what we've been talking about re windows missing from the test list?

cdenneen commented 6 years ago

@DavidS If you remove the on_supported_os(requested_facterversion).each and just use on_supported_os.each windows now appears. If you look at the facterdb facts there are facts for these versions of windows so it doesn't make any sense why the filter is removing windows.