Commit graph

1732 commits

Author SHA1 Message Date
Miah Johnson
e48d08343b
Merge pull request #4452 from mhackethal/user-windows-fix
User windows fix
2019-10-04 15:30:37 -07:00
Miah Johnson
416c33e056 Add name property to interface resource
Also some general cleanup.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-03 14:53:43 -07:00
Ryan Davis
6fd2db256d
Merge pull request #4560 from inspec/zenspider/apt
Fixed apt resource incorrectly parsing deb files w/ quoted URIs.
2019-10-03 14:50:48 -07:00
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
09392943f5 Fixed apt resource incorrectly parsing deb files w/ quoted URIs.
Fixes #4559.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-03 12:55:15 -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
mhackethal
c3270b537a update user_test.rb
Signed-off-by: mhackethal <mh@it31.de>
2019-09-13 21:19:20 +02:00
mhackethal
0b76859728 adjust user_test.rb 2019-09-13 20:45:54 +02:00
mhackethal
9e06f02e27
Update user_test.rb
adjust expectation of methods to be "nil" on windows
2019-09-13 13:14:34 +02: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
mhackethal
7ac468df5b first test. Signed-off-by: mhackethal <mh@it31.de> 2019-09-12 21:44:13 +02: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
mhackethal
6772f0b301
Update user_test.rb 2019-09-06 11:42:51 +02: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