inspec/test
Nick Schwaderer 4c03ad4c55 Support 'clear_cache'
Helps with Customer Bug 236 (see there for repro)

Currently, when we run `inspec compliance upload my_profile` it is
cached locally in inspec when run. If we update the version in the core
code and run another upload, `inspec compliance upload my_profile` again
it will run the old cached version instead of running a new copy
from automate.

The current workaround is to specify the desired version with
`inspec exec compliance://my_profile/admin#0.1.1`.

The caching happens before we have forward sight into the profile's
contents and only the target name. So the text used to generate the
cache would be `compliance://my_profile/admin` which does not change
version to version.

A fix here could simply identify when we are doing a local `inspec exec
compliance://` (hitting local profiles does not generate a cache) and
skips the cache if there's no version specified. That would eliminate
the unexpected behavior. However, it is a breaking change for customers
as some current caching taking place would no longer take place.

Instead, we have included a `clear_cache` cli method for InSpec,
which should assist the core team and other developers in the future
when debugging edge case issues in InSpec.

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-03-16 15:41:55 -04:00
..
artifact Fix artifact-habitat testing for inspec. 2020-02-10 18:34:00 -08:00
fixtures removed unwanted README files from test fixtures and fixed some minor copy paste test 2021-03-05 16:29:30 +05:30
functional Support 'clear_cache' 2021-03-16 15:41:55 -04:00
helpers Apply chefstyle -a, and manually remove duplicate requires 2020-12-21 13:25:04 -05:00
integration Test kitchen setup to test detection of audit-cookbook 2020-05-25 21:00:24 -04:00
kitchen Make wmi resource always return arrays for params 2020-12-02 09:29:16 +00:00
unit Added test to do test cmp matcher with nil as actul input to cmp against expected 2021-03-05 20:48:27 +05:30
helper.rb Remove windows test skip timebomb 2020-12-21 15:17:24 -05:00