Commit graph

6192 commits

Author SHA1 Message Date
Clinton Wolfe
1552dc0210 Merge branch 'cw/use-deprecation-everywhere-3-port' of github.com:inspec/inspec into cw/use-deprecation-everywhere-4-port 2019-04-16 17:42:45 -04:00
Clinton Wolfe
201c52594d Correct deprecation message on shadows property
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-16 17:32:29 -04:00
Clinton Wolfe
a3a2699e8d Update unit tests to expect deprecations
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-16 17:28:39 -04:00
Clinton Wolfe
ba6d59dc66 Deprecation handler in unit test helper
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-16 16:27:56 -04:00
Miah Johnson
e76978cd67
Merge pull request #3948 from inspec/snappj/improve-omnibus-test-scripts
Improve omnibus test scripts
2019-04-16 12:25:26 -07:00
Chef Expeditor
92a132ef18
Bump version to 4.1.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-16 18:42:03 +00:00
Clinton Wolfe
0c884b1415
Merge pull request #3895 from mitre/al-mitre/more-permissive-than
Signed-off-by: Aaron Lippold <lippold@gmail.com>
2019-04-16 14:41:43 -04:00
Jeremiah Snapp
265ce834ad Do not add inspec's bin path to the PATH env var
By not adding inspec's bin path to the PATH env var
we can properly test that inspec's install scripts
created the appropriate symlinks.

Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
2019-04-15 17:04:30 -04:00
Jeremiah Snapp
8533998fb8 Reload Env:PATH to get changes from inspec installation
Reloading Env:PATH does a better job of testing if
the installation properly configured the system's
PATH.

Signed-off-by: Jeremiah Snapp <jeremiah@chef.io>
2019-04-15 17:02:34 -04:00
Matt Kulka
633cea6673 support address matchers on interface resource
Adds missing functionality to `interface`. Fixes #1830

```
describe interface("eth0") do
  its(ipv4_addresses) { should include 1.2.3.4 }
end
```

And so on... see diff/docs for additional matchers.

Signed-off-by: Matt Kulka <mkulka@parchment.com>
2019-04-12 08:24:13 -07:00
Clinton Wolfe
c1660e8568 Helper script to check for typos in deprecation group names
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-12 10:57:30 -04:00
Clinton Wolfe
fc1bc75358 Adjust deprecations somewhat
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-12 10:55:36 -04:00
Chef Expeditor
5de39cb325
Bump version to 4.0.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-12 14:09:02 +00:00
Clinton Wolfe
ce9fe22955
Merge pull request #3939 from inspec/new_webmock
Test with webmock 3+
2019-04-12 10:08:37 -04:00
Chef Expeditor
e456a1786d
Bump version to 4.0.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-12 14:08:18 +00:00
Clinton Wolfe
c88250d87b
Merge pull request #3940 from inspec/new_train
Remove the omnibus override to use train 1.X
2019-04-12 10:08:02 -04:00
Chef Expeditor
3d5c0f8b8c
Update CHANGELOG.md with details from pull request #3941
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-12 13:49:59 +00:00
Clinton Wolfe
70adab14cd
Merge pull request #3941 from inspec/cw/add-inspec-habitat-to-docs
Add inspec-habitat resources to website docs
2019-04-12 09:49:45 -04:00
Jerry Aldrich
40031a9b83 Use deprecation facility throughout code
This converts all current deprecation warnings/TODOs to use the
`Inspec.deprecate()` deprecation facility.

This also modifies `Inspec.deprecate()` to only require 1 argument.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-04-11 19:15:01 -04:00
Chef Expeditor
414268eccc
Bump version to 4.0.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-11 22:56:25 +00:00
Clinton Wolfe
4348e8fa07
Merge pull request #3935 from inspec/cw/add-license-gating
Add license acceptance to InSpec v4
2019-04-11 18:56:11 -04:00
Tim Smith
93b7f68448 Remove the omnibus override to use train 1.X
We don't want this anymore

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-04-11 14:28:46 -07:00
Tim Smith
501a39018e Attempt to switch to new webmock that supports Ruby 2.6+
Signed-off-by: Tim Smith <tsmith@chef.io>
2019-04-11 14:27:24 -07:00
Chef Expeditor
afe936ead1
Bump version to 4.0.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-04-11 20:23:32 +00:00
Clinton Wolfe
03385b98ba
Merge pull request #3928 from inspec/mj/tmr
Telemetry Object Model
2019-04-11 16:23:17 -04:00
Clinton Wolfe
780efbea74 Modify resources index to shorten OS Resources button
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 16:17:04 -04:00
Clinton Wolfe
735e7b060b Oh parens
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 16:14:45 -04:00
Clinton Wolfe
c6940be8d4 Make license touching for functional and int testing portable to windows
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:30:30 -04:00
Miah Johnson
5adf33469a improve testing for DataSeries#to_h and DataSeries#to_json
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-04-11 12:22:29 -07:00
Miah Johnson
55ea2d984c Not sure how to make this not dependant on list_data_series to prove its
functionality.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-04-11 12:17:59 -07:00
Clinton Wolfe
5d4bb83093 Add inspec-habitat to list of resource packs
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:11:25 -04:00
Clinton Wolfe
8915ad049f Correct pre-integration task name
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:06:09 -04:00
Clinton Wolfe
34d16553bb Use touched license file to make re-homed config test pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 15:03:27 -04:00
Miah Johnson
3c6db15124 improve tests for Collector#list_data_series
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-04-11 11:47:42 -07:00
Clinton Wolfe
8d3e704532 Update CLI option for accepting license; licensing tests pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 14:20:41 -04:00
Clinton Wolfe
d94addf54a Update functional test to remove interactive testing; impossible now with tty detection
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 13:11:11 -04:00
Clinton Wolfe
0ce122ff21 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:37:43 -04:00
Clinton Wolfe
638d4440a5 Add license-acceptance library to gemspec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:33:04 -04:00
Clinton Wolfe
3478ac3897 Add user messaging when writing a license file
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
1c13bcc35e Change exit code to 172 when license is not accepted
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
f7c4f56670 Ensure that an empty invocation does not trigger the license check
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
e0fe3f1876 Add version to list of exempt commands
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
30e5c39e74 tmpdir and mktmpdir are two verry different things
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
023bfefc67 Add ungated invocations
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
7d81f93496 Add test for interactively answering no
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
fb73b39976 Add tests for interactively answering yes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
2f3adf6176 Add tests for when persistence file already exists
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
1c9533087d Test when --accept-license is used
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
e3857a8783 Sketch of functional test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00
Clinton Wolfe
d41dc48afa If the license was accepted only for testing, delete it at exit
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-04-11 10:30:46 -04:00