Commit graph

1753 commits

Author SHA1 Message Date
Miah Johnson
6e88b3ceb9 Fix rubocop warnings
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
46e7b00add Fix Rakefile and wtf
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
9543ed8ecc Add a Rakefile as our main Rakefile also requires 'train'
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
4544ff30aa Add a very simple test for Windows Habitat builds.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Clinton Wolfe
bde308f72d
Replace input to_hash method, and add unit test for it (#4545)
Replace input to_hash method, and add unit test for it
2019-10-11 10:50:27 -07:00
Clinton Wolfe
b09edbbbf9 And the YAML fixture too.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-09 20:49:33 -07:00
Clinton Wolfe
8f4ff8923e Add functional test to exercise waivers during profile inheritance
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-09 19:10:48 -07:00
Ryan Davis
f9ec3053aa Refactored unit test to be more like the other one.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-09 17:41:03 -07:00
Ryan Davis
26ffea8d39 Make my diffs pretty for jsonmin tests.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-09 17:40:53 -07:00
Ryan Davis
f3fc535fee Changed formatting and ordering of test data to reduce diffs on failing tests.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-10-09 17:40:31 -07:00
Clinton Wolfe
d150a568cd More test fixes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-09 17:20:24 -07:00
Clinton Wolfe
3c266655ee Refactor exec-json functional tests to reduce subprocesses
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 21:04:58 -07:00
Clinton Wolfe
ba61cd3f45 Update JSON schema to reflect new waiver keys
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 21:01:19 -07:00
Clinton Wolfe
01991cc347 Update some failing test fixtures
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 21:00:11 -07:00
Clinton Wolfe
0f5fde9729 Modify waiver input file to use 'run' subfield instead of 'skip'
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 01:03:40 -07:00
Clinton Wolfe
7516f959d1 If there is no data, alwaya return an empty hash.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 00:31:23 -07:00
Clinton Wolfe
56c2416c57 Move waiver JSON data from per-result to per-control
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-08 00:25:06 -07:00
Clinton Wolfe
88ed1794cb Revert to a small amount of duplicating to_hash in inspec/input.rb
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-06 19:30:37 -04:00
Miah Johnson
e48d08343b
Merge pull request #4452 from mhackethal/user-windows-fix
User windows fix
2019-10-04 15:30:37 -07:00
Clinton Wolfe
11074bb7ce Adjust indentation
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-04 14:06:49 -04:00
Clinton Wolfe
36db8b9a7b Rely on copy of to_hash in objects/input.rb to avoid duplication
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-04 14:05:19 -04:00
Clinton Wolfe
51812a9e4e Replace to_hsh method, and add unit test for it
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-10-04 14:05:19 -04: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