Commit graph

318 commits

Author SHA1 Message Date
Travis Fields
f19aea5a75 MODULES-1413 Ability to for future parser to use member with FixNum types 2014-11-04 14:33:34 -08:00
Travis Fields
51f1d574d9 Fix testcases for Future Parser and resolve issue with values_at in assuming that it was dealing with a string 2014-10-28 15:27:24 -07:00
Hunter Haugen
cf8d144caf Remove simplecov
simplecov 0.9 dropped ruby 1.8 support, and stdlib is one of the oddball
modules that uses it. So we could probably just remove it and be okay.

(cherry picked from commit a7c129b22d)
2014-09-16 12:01:24 -07:00
Hunter Haugen
07462f2c36 AIX has no facter network support
These functions take advantage of IP fact information and AIX does not
appear to support dynamic interface detection in facter.
2014-07-08 13:45:36 -07:00
Hunter Haugen
ec607827ad Gotta single quote yer typewriter buttons 2014-06-26 13:55:57 -07:00
Hunter Haugen
1b893ff653 Need quotes for spaces in path 2014-06-26 13:17:07 -07:00
Hunter Haugen
b93f71f0ce has_ip_network doesn't work on windows either 2014-06-26 13:12:39 -07:00
Hunter Haugen
05b79dcabb Disable windows network stuff and quote path 2014-06-25 10:16:06 -07:00
Hunter Haugen
0cac9fd048 Not enough escape velocity 2014-06-24 15:03:58 -07:00
Hunter Haugen
ca35be6480 Fix pe facts and slashes 2014-06-24 11:37:34 -07:00
Travis Fields
eb507c9a54 Fixed fqdn,getparam and has_interface_with spec tests 2014-06-23 23:27:59 -07:00
Hunter Haugen
0427248cf0 Merge pull request #283 from cyberious/4.3.x
Add windows support and work around issue with SCP_TO on windows systems
2014-06-23 18:58:37 -07:00
Travis Fields
78f5141290 Removed platform check for facts.d mkdir 2014-06-23 18:30:42 -07:00
Travis Fields
0199e2396a Add windows support and work around issue with SCP_TO on windows systems 2014-06-23 16:59:46 -07:00
Hunter Haugen
f7b7c4a6ec Windows needs a tmpdir path 2014-06-23 15:13:29 -07:00
Travis Fields
d38ccfc9d2 Merge pull request #280 from hunner/win_aug
Augeas isn't present on windows
2014-06-23 13:51:33 -07:00
Hunter Haugen
280d808eb4 Augeas isn't present on windows 2014-06-23 13:50:24 -07:00
Hunter Haugen
4b7162896a OS X also has lo0 and can't manage user homedirs 2014-06-23 13:45:06 -07:00
Travis Fields
24a6fecc78 Add windows Nodesets and remove Beaker from Gemfile 2014-06-20 16:39:15 -07:00
Hunter Haugen
7eda161be8 Patch ensure_* tests 2014-06-20 10:41:43 -07:00
Hunter Haugen
4523bc50ca Merge branch 'master' into 4.3.x 2014-06-19 16:25:16 -07:00
Hunter Haugen
197e2d7e70 (FM-1587) Fix test issues on solaris 10
- ensure_packages fails because Error: Sun packages must specify a package source
- ensure_resource fails for the same reason
- get_module_path fails because the modulepath is different
- has_interface_with fails because the interface is lo0 not lo
2014-06-19 15:38:23 -07:00
Ashley Penney
6287a200af Convert specs to RSpec 2.99.0 syntax with Transpec
This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/functions

* 345 conversions
    from: obj.should
      to: expect(obj).to

* 122 conversions
    from: == expected
      to: eq(expected)

* 85 conversions
    from: lambda { }.should
      to: expect { }.to

* 22 conversions
    from: be_true
      to: be_truthy

* 16 conversions
    from: be_false
      to: be_falsey

* 11 conversions
    from: pending
      to: skip

* 9 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 5 conversions
    from: =~ [1, 2]
      to: match_array([1, 2])

* 2 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 2 conversions
    from: obj.should_not
      to: expect(obj).not_to

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-06-04 14:38:37 -04:00
Ashley Penney
d65d2354a7 Convert specs to RSpec 2.99.0 syntax with Transpec
This conversion is done by Transpec 2.2.1 with the following command:
    transpec spec/unit

* 53 conversions
    from: obj.should
      to: expect(obj).to

* 19 conversions
    from: == expected
      to: eq(expected)

* 5 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: be_true
      to: be_truthy

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-06-04 14:37:45 -04:00
Morgan Haskel
af71faa247 Merge pull request #265 from apenney/fix-tests
Further fixes to tests for 14.04.
2014-06-03 15:01:12 -04:00
Ashley Penney
6010e9bd93 Further fixes to tests for 14.04. 2014-06-03 14:52:10 -04:00
Morgan Haskel
a364605f3b Merge pull request #264 from apenney/fixes-for-tests
Fixes for PE3.3.
2014-06-03 11:15:20 -04:00
Ashley Penney
08f7553fb6 Fixes for PE3.3. 2014-06-03 11:11:08 -04:00
Ashley Penney
0cda858744 Merge pull request #258 from mckern/enhancement/master/camelcasedembools
(MODULES-905) Narrow the confinement in bool2str
2014-05-15 21:48:40 -04:00
Ryan McKern
557d38bdc6 (MODULES-905) Extend spec tests for bool2str
The extended spec tests validate that the common types of values
that could be passed to bool2str() are rejected.
2014-05-15 16:45:02 -07:00
Ashley Penney
c5b06f9bbc Revert "Merge pull request #256 from stbenjam/2571-before"
This reverts commit 8499ebdb7f, reversing
changes made to 08b00d9229.
2014-05-15 17:28:59 -04:00
Ashley Penney
430d821ad3 Merge pull request #255 from mckern/enhancement/master/camelcasedembools
(MODULES-905) Add bool2str() and camelcase() for string manipulation
2014-05-15 17:03:18 -04:00
Stephen Benjamin
6eaa592cd8 (PUP-2571) add 'before' functionality to file_line
file_line supports adding lines after a match, but there are use cases when
having "before" would be useful. For example, in Debian-based OS's, the last
line of /etc/rc.local is "exit 0" it's an incredible pain to deal with
that scenario today.

This commit adds a 'before' parameter to the file_line type, and implements
it for the ruby provider.
2014-05-14 20:33:57 +02:00
Ryan McKern
0761fcf043 (maint) Add bool2str & camelcase spec tests 2014-05-13 15:46:50 -07:00
Ashley Penney
14c9155745 Prepare a 4.2.1 release. 2014-05-09 16:57:32 +02:00
Hunter Haugen
0804121719 Fix the stdlib functions that fail tests 2014-05-08 14:55:23 -07:00
Hunter Haugen
96e43e69d8 Move unit tests to spec/functions
rspec-puppet matchers are defined for tests which exist in
spec/functions, but the function unit tests lived in
spec/unit/puppet/parser/functions. This moves them to the correct place
for using rspec-puppet
2014-05-08 10:47:24 -07:00
Hunter Haugen
c66a2e4f49 Add mode +x to spec .rb files 2014-05-07 15:00:30 -07:00
Hunter Haugen
78982c9238 Move the 4 misplaced tests 2014-05-07 15:00:30 -07:00
Hunter Haugen
890ef5c471 Adding more spec coverage 2014-05-07 15:00:30 -07:00
Andrea Veri
09f892023c Add the missing shebangs and fix the wrong ones for rpmlint to stop complaining loudly 2014-05-07 11:49:25 +02:00
Hunter Haugen
226cc7653c Update build_csv to understand contexts 2014-05-02 13:44:20 -07:00
Hunter Haugen
af49ef4ca2 Fix the validate_augeas beaker tests 2014-05-02 12:56:22 -07:00
Hunter Haugen
80590a9bfe Add more specs 2014-05-01 14:07:54 -07:00
Ashley Penney
f8bfe46bbf Merge pull request #243 from hunner/add_beaker
Add beaker tests for functions.
2014-04-28 14:55:29 -04:00
Ashley Penney
0b59dfe642 Merge pull request #222 from mfoo/fix/master/concat-primitives
Allow concat to take non-array second parameters
2014-04-24 13:41:42 -04:00
Ashley Penney
f42fc4bfd8 Merge pull request #238 from Spredzy/add_default_ensure_packages
(MODULES-603) Add defaults arguments to ensure_packages()
2014-04-24 13:38:07 -04:00
Ashley Penney
68acb59bf7 Adjust the regular expression for facts.
Previously this was incorrectly handling facts that were of the form
foo=1+1=2 due to the ='s in the actual fact contents.  Fix this and
add tests to try and prevent regressions.
2014-04-22 23:15:16 +02:00
Kylo Ginsberg
b691be7ea9 (maint) Remove facter versions test
This test attempts to emulate various versions of facter, but is
still dependent on the version of facter it is running against. The
immediate symptom was that the test breaks with facter 2.0.1 because
it adds another external facts search directory.

I tried a couple ways to stub this but allowing it to pretend
to run against one set of facters, while actually running against
one real facter (which might itself be one of several versions)
eluded me.

So this patch just removes the test.
2014-04-16 12:30:24 -07:00
Hunter Haugen
90222959b1 Adding more tests 2014-04-09 14:35:34 -07:00