puppet-python icon indicating copy to clipboard operation
puppet-python copied to clipboard

Fix facts for python rc version

Open krissik opened this issue 6 years ago • 5 comments
trafficstars

Change regex in python_version and python_release facts so it matches python release candidate version (e.g. Python 2.7.16rc1, Python 3.7.3rc1).

krissik avatar Mar 25 '19 13:03 krissik

@krissik can you please rebase and maybe add a test for this?

bastelfreak avatar Apr 26 '20 19:04 bastelfreak

Dear @krissik, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? If you need any help, you can reach out to us on our IRC channel voxpupuli on Freenode or our Slack channel voxpupuli at slack.puppet.com. You can find my sourcecode at voxpupuli/vox-pupuli-tasks

vox-pupuli-tasks[bot] avatar Jul 29 '20 18:07 vox-pupuli-tasks[bot]

Can someone point me to an example of how to test a fact?

krissik avatar Jul 31 '20 12:07 krissik

I will add tests but I do not know how. An example would be helpfull or some documentation.

krissik avatar Jul 31 '20 12:07 krissik

14:29 <meena> how do we rspec test facts? 
14:39 <ewoud> with pain
14:40 <ewoud> there's some boiler plate to clear facts before/after
14:42 <ewoud> https://github.com/voxpupuli/puppet-yum/blob/master/spec/unit/facter/yum_package_updates_spec.rb is probably a decent example
14:43 <ewoud> it is also one of the few examples that uses subject {}, most of them call Facter.fact() every time
14:43 <ewoud> maybe it should clear facts before rather than after though
14:44 <ewoud> it would be great if rspec-puppet provided some nice integration like it does with classes, defines, etc
14:48 <meena> yeah, that seems oddly asymmetric 

so, yeah, https://github.com/voxpupuli/puppet-yum/blob/master/spec/unit/facter/yum_package_updates_spec.rb

igalic avatar Jul 31 '20 12:07 igalic