Commit graph

1308 commits

Author SHA1 Message Date
Clinton Wolfe
a1af115e26 Add eval to unit tests; break up codegen test into individual elements
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-30 14:29:18 -05:00
James Stocks
5868eb52e7 Fix Inspec::Attribute.to_ruby and add unit test
Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-30 17:15:22 +00:00
Clinton Wolfe
4d7cbc624c Test and fix case in which both :default and :value are provided
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-28 00:42:27 -05:00
Clinton Wolfe
6b5a951ccf Update value/default usage in test files
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-28 00:42:27 -05:00
Clinton Wolfe
ee76c5bb54
Merge pull request #3740 from inspec/ja/adopt-3419
iis_app_pool:  Fixes error with 'should not exist'
2019-01-25 11:56:10 -05:00
Jerry Aldrich
71eca8c4ed Add \n to @TheLonelyGhost's mocked command
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 15:08:25 -08:00
David Alexander
d5dbae2efd Updates stub for IIS App Pool unit test
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
David Alexander
53e3533b8c Fixes unit test for to_s of iis_app_pool
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
Jerry Aldrich
e80e7d872e Mock files used for virtualization resource tests
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
f7e8a0c80c Add deprecation check for processes.list
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
3b8da7957d Mock missing_file in NGINX resource tests
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
62cfcf0ebe Add mock command for oracledb_session
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
4c0a582539 Mock mysql related command
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
3fe7091254 Wrap deprecated ServerSpec matchers in procs
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
5ea640a2cd Remove nil check in chocolatey_package test
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
c1547ee898 Remove deprecated methods from shadow test
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
a0b76defb0 Evaluate runner.run in a proc
This removes the following line from the test output:

```
Test Summary: 0 successful, 0 failures, 0 skipped
```

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
2f20370426 Change .must_equal nil to .must_be_nil
`.must_equal nil` is deprecated

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
bc56b2275a Use mocked file instead of an empty file call
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
b440e3f132 Change DLS to DSL
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Jerry Aldrich
c348a2032a Remove test that uses deprecated ppa resource
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 13:09:17 -08:00
Clinton Wolfe
2f42803a90
inspec check: Allow 'Proprietary' as a valid license term.
Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-22 15:50:38 -05:00
Clinton Wolfe
ed460c7869
Fix SSL tests by allowing multiple cipher counts
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-22 15:00:49 -05:00
Jerry Aldrich
5c4be8de87 Fix SSL tests by allowing multiple cipher counts
The value of `ciphers` is 681 on my localhost, but 993 on Travis.

This modifies the test to allow both values.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-21 15:02:58 -08:00
Jerry Aldrich
10f0393683 Fix AWS tests found during ChefStyle spike
This fixes some style issues and fixes a duplicated test method name.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-21 13:05:46 -08:00
Clinton Wolfe
0a131e4945
Centralized Deprecation Facility #3690
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-17 15:08:16 -05:00
James Stocks
ad4df90912 Allow 'Proprietary' as a valid license term.
Currently our supported profiles output a warning for every instance of `inspec check` because our license metadata `Proprietary, All rights reserved` is not considered valid.
This commit allows for a string beginning with `Proprietary` to be considered valid, as well as any valid SPDX value.

Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-16 11:19:55 +00:00
Clinton Wolfe
48e2188047 Remove class var for testing, replace with tramp data
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-16 00:24:19 -05:00
Clinton Wolfe
212fe36b76 Add debug output to ignore actions
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 23:49:20 -05:00
Jerry Aldrich
f5ec7c9c65 Fix style/RuboCop on cw/deprecation-facility
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-14 13:57:59 -08:00
Clinton Wolfe
3c5a26ecfa Move attribute unit tests to a more expectced location
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-11 17:23:57 -08:00
Clinton Wolfe
066fde854d Allow empty opts to functional test helper run_inspec_process
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-11 16:42:46 -08:00
Clinton Wolfe
c169119895 linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
c43e401dda Fix default exit code logic to properly use value in Inspec::UI
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
b2bb8c062b Last polish on the unit tests, all pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
642d8d61b6 Funcitonal tests pass; some unit tests fail
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
f5ab0d9125 Config file validation in place
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
2121667e31 Starting implementation, global method is wired up
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
916000d10f Sketch of unit tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
aea7052a5c
Fix extra '&&' in windows functional tests, add diagnostics (#3717)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:52:22 -08:00
Clinton Wolfe
ad84987357 Fix spurious ampersands in windows invocation
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-09 17:16:44 -08:00
Clinton Wolfe
d6b5bdef09 Add diagnostics to the functional test helper
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-09 17:14:42 -08:00
Miah Johnson
15162bf920 Add resources for aws_billing_report and aws_billing_reports. (#2838)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-09 16:06:48 -08:00
Clinton Wolfe
25119168de
Testing: aim json export inheritance test at a local child profile that we control (#3696)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-05 12:21:34 -05:00
Tim Smith
b5ff949059 Update Ruby versions used for testing; fix Travis CI issues (#3678)
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-12-20 22:17:07 -05:00
Amit Saha
bbc07f5f11 aws_sqs_queue - new resource (#3674)
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2018-12-20 14:33:21 -05:00
Jerry Aldrich
91fe4ad03b Fix labels on Docker containers (#3673)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-12-20 12:31:13 -05:00
Noel Georgi
f1fbd518e5 Expose additional WinRM options for transport, basic auth, and SSPI (#3669)
Signed-off-by: Noel Georgi <git@frezbo.com>
2018-12-20 11:57:53 -05:00
Jerry Aldrich
8019b2c487 Modify URL fetcher to accept URI (#3633)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-12-12 13:05:51 -05:00
Clinton Wolfe
c0a46cf841
UI Object for for CLI work (#3618)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-12-12 11:44:16 -05:00