Ryan Davis
07dc5e3192
First pass at cleaning deprecations for old minitest/spec-style tests.
...
3 files left to go, and they're behaving oddly so I'm leaving them out
in this pass. Looks like 21 deprecations left.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-03 13:45:19 -07:00
Ryan Davis
e070f151b9
Merge pull request #4557 from inspec/zenspider/rspec-expectations
...
Fixed tests to work with rspec-expectations 3.8.5+.
2019-10-03 12:51:08 -07:00
Ryan Davis
708a319ce8
Fixed tests to work with rspec-expectations 3.8.5+.
...
We were using a "private" method in our tests and they changed the
signature.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-02 18:08:19 -07:00
Ryan Davis
d1fbbada4d
Yet another bump of our skip_windows! due date.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-30 12:23:15 -07:00
Ryan Davis
866efdf141
Merge pull request #4531 from inspec/mj/wtf_rake
...
Remove maintainers task from require
2019-09-27 14:45:21 -07:00
Ryan Davis
984e02e312
Quick fix for faraday_middleware bug introduced when bumping to faraday 0.16.0.
...
Namespacing changed in faraday from Faraday::Error::* to Faraday::*
but was not reflected in faraday_middleware (which hasn't released
since February). I will file an issue and/or PR with them later.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-27 14:19:45 -07:00
Ryan Davis
fd1ab6fff0
Merge pull request #4513 from inspec/zenspider/plugin_loader
...
Fixed Inspec::Plugin::V2::Registry#detect_system_plugins
2019-09-26 12:29:29 -07:00
Ryan Davis
ca4844210d
Fixed Inspec::Plugin::V2::Registry#detect_system_plugins
...
+ Falls back to checking for inspec-core if inspec not found.
+ Fails gracefully if neither are found.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-25 16:10:00 -07:00
Ryan Davis
90c4904a55
Merge pull request #4490 from inspec/zenspider/split-long-functional
...
Split and parallelize some tests to make them faster
2019-09-24 17:45:57 -07:00
Irving Popovetsky
bbb927e3dd
Remove invalid test cases for tags
...
Signed-off-by: Irving Popovetsky <irving@chef.io>
2019-09-17 15:58:12 -07:00
Irving Popovetsky
4aebe87c2e
Update unit tests to match
...
Signed-off-by: Irving Popovetsky <irving@chef.io>
2019-09-17 15:58:12 -07:00
Ryan Davis
fc1ad67ffc
More parallelization for functionals.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-17 11:50:31 -07:00
Ryan Davis
a473a94303
Merge pull request #4493 from inspec/mj/waiver3
...
Waivers Phase 3
2019-09-16 17:50:02 -07:00
Ryan Davis
d3f81f1194
Turn on parallelism for inspec_shell_test.rb
...
Seems safe after several runs.
Takes the time down from ~180s to 22s.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-16 17:19:32 -07:00
Ryan Davis
ba462724db
Turn on parallelism for inspec_exec_test.rb
...
Seems safe after several runs.
Takes the time down from ~275s to 35s.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-16 17:19:32 -07:00
Ryan Davis
a0a7917faa
Merge pull request #4485 from inspec/zenspider/objects-inputs
...
Split out Inspec::Input functional code from the code generation code.
2019-09-16 17:03:49 -07:00
Ryan Davis
1d3c9341ec
Finished up the phase 3 waiver json output tests.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-16 16:39:34 -07:00
Miah Johnson
5d94b0d709
Add waiver_data to json output, update assertion to show where waiver_data lives.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-09-16 14:49:05 -07:00
Miah Johnson
168c77e472
Refactor tests.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-09-16 14:49:05 -07:00
Ryan Davis
e375ea30c8
Split out Inspec::Input functional code from the code generation code.
...
Includes moving errors into Inspec::Input and Inspec::InputRegistry.
Fixes #4456 .
Fixes #4473 .
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-13 17:12:20 -07:00
Miah Johnson
008ac9705b
Merge pull request #4484 from timgates42/feature/typo_becuase
...
Fix simple typo: becuase -> because
2019-09-12 17:25:37 -07:00
Tim Gates
f1e88ca65f
Fix simple typo: becuase -> because
...
Obvious Fix.
2019-09-13 09:30:00 +10:00
Clinton Wolfe
8132aaf85c
Merge pull request #3844 from inspec/ja/add-error-output-to-json-command
...
json resource: Add handling for `command:` error
2019-09-11 11:12:26 -04:00
Ryan Davis
a2b6517f9a
skip a test when on windows
...
(and make it more compatible for when it does work)
Blocked by #4465 .
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-10 14:19:42 -07:00
Ryan Davis
fcfcc354fe
Reworked test cases and impl to only respond to output, not exit code.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-10 14:19:42 -07:00
Ryan Davis
dfce5e722f
Merge pull request #4427 from inspec/cw/waivers-overlay
...
waivers: functional test fixture and eval-time skipping
2019-09-09 18:41:37 -07:00
Ryan Davis
f5bbfe5fac
Merge pull request #4365 from inspec/zenspider/the-need-for-speed
...
Make inspec much faster for most commands.
2019-09-09 18:02:10 -07:00
Jerry Aldrich
0e1b3fa65a
json resource: Add handling for command:
error
...
This provides the user with messages if `json(command: 'command_that_errors')`
exits non-zero and/or has STDERR.
Without this the resource will report "No output from command" when really the
output is contained in STDERR.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-09-09 15:16:34 -07:00
Ryan Davis
79b9c3cbad
Merge pull request #4451 from inspec/zenspider/fix-tarball-decoding
...
Try to decode archive contents to UTF-8 to avoid encoding corruption.
2019-09-09 11:13:48 -07:00
Clinton Wolfe
5d94440823
Fix logic error for future expiring waivers
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
43bc7e0343
Modify @__skip_rule to distinguish only_if and waiver, and force waiver to win
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
0db0a2bfdc
Don't assume waiver_ prefix in waiver files
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
718e205cf2
Alter expiration_date behavior to match spec
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
ff209b4bae
Refactor control_id lookup in waiver test file
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
eb1ec437d7
Linting and test number corrections
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
5891c9aee9
A failing functional test to skip waivered controls
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Clinton Wolfe
77b4e45175
Test fixture profile and input file for waivers
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-09-09 11:29:26 -04:00
Ryan Davis
d19d0bfd7c
Refactor tests for TarProvider and ZipProvider a bit.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-06 00:42:36 -07:00
Ryan Davis
6e821e787e
Save off supports[:os] and restore it after each test.
...
This fixes some other tests that require supports[:os] to be correct.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-04 15:44:26 -07:00
Ryan Davis
6296fdc688
Replace backticks in test descriptions with single-quotes.
...
Backticks means you can't selectively run one of these tests w/o
subshelling out to `brew`, or having to edit first.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-04 15:44:26 -07:00
Ryan Davis
3b69967cc8
Fixed a bug in checking supports (strings vs symbols)
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-04 15:44:26 -07:00
Ryan Davis
b6bfeffd9e
Make inspec much faster for most commands.
...
Removes pre-loading and registration of resources by adding
method_missing to a couple key areas.
This still drops the ball in some areas, but it is a start.
2019-09-04 15:44:26 -07:00
Lance Albertson
1e94e3503e
Fix for postfix_conf when using a non-standard config location
...
Pass the first argument of the opts array instead of the whole array which
confuses the SimpleConfig parser. Also added a test which verifies this fixes
the issue.
In addition, change the base_name to something that matches other resource base
names.
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-09-03 15:28:44 -07:00
Ryan Davis
49330e8a8e
Extended skip_windows to the end of September.
...
This is getting depressing...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-09-03 12:08:41 -07:00
kekaichinose
d33870b635
Merge pull request #4214 from inspec/zenspider/fix_nil_file
...
Fixed file resource raising UndefinedMethod on source_path
2019-08-30 13:19:54 -07:00
Clinton Wolfe
a6bd7ec4b5
Merge pull request #4401 from inspec/cw/input-from-cli
...
inputs: Accept bare input from the command line
2019-08-28 15:41:21 -04:00
Clinton Wolfe
51de566d93
Assert adjustments
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-28 13:25:49 -04:00
Clinton Wolfe
82acec957e
Add API for fetching plugin vconfig values.
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-28 13:25:49 -04:00
Clinton Wolfe
38f3469ee3
Validation for the plugins area of the config file
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-28 13:25:49 -04:00
Clinton Wolfe
c6d355e4f7
Accept version 1.2 for config file format
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-08-28 13:25:49 -04:00