generating a control for them automatically and then execute due that also becomes a control and has to add same logic to filter the control in that mehtod
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
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>
The existing documentation explicitly claims that not specifying “run” in a waiver is equivalent to specifying “run: false.” It turns out to be the case that the claim is completely false. This commit includes a test for a new control 18_waivered_no_expiry_default_run that behaves exactly like the control 04_waivered_no_expiry_ran_fails. That is, not specifying run in a waiver is the same as specifying “run: true.”
Signed-off-by: David Marshall <dmarshall@gmail.com>
A single-element array allows Rspec's its behaviour to be worked around
and allow options containing dots to be tested using its.
This is already implemented by resources such as `json` and those based
on it (e.g. xml).
Related to issue #875.
Signed-off-by: Raphael Geissert <atomo64@gmail.com>
This resolves#5235 and supersedes #5238.
Instead of using `-match` use `-like` when querying the Windows registry. This
completely removes the problem of trying to clean the string for a regex and
just let's Powershell do that with `-like`.
I confirmed this works with the use case of having a package name such as
`Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.28.29325` work as-is
without any modification.
Signed-off-by: Lance Albertson <lance@osuosl.org>
Update format_options for sqlplus to support all versions.
Reference: Issue 5182
Signed-off-by: Francisco Palomares <fpalomares@hotmail.com>
Fixed Test Unit to compare with new values
added unit test for platform-name wildcard
added doc for release wildcard
added doc for platform-name wildcard
Signed-off-by: superyarick <yarick@yarick.net>
The tests depended on an old fixture profile that skipped a test,
which no longer happens. It also was targeting a test that does not exist.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
On some systems the output of ps may be truncated, which may prevent
profiles from working as intended.
Some implementations specifically mention that the output width is
undefined "(it may be 80, unlimited, determined by the TERM variable,
and so on)".
This fixes#5226.
Signed-off-by: Raphael Geissert <atomo64@gmail.com>
These tests are being worked on, and there has been internal discussion
about the value of this bomb. I am not taking a stance on that at this
point. However, when we do hit a bomb that requires all repo PRs (
including community ) to do a rebase after we do a fixing PR.
To prevent this while our team resource is somewhat limited I am going
to pre-emptively push this out.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
At the moment we return the "Truncate" text whenever the setting is
utilized. This PR ensures that we only advise truncation when it's been
executed.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
Fixes#5131
Due to the use of `#split(‘=‘)` against inputs supplied via the CLI we had an edge case where inputs with `’=‘` in the value would cause a breakage.
This PR supplies a test for the regression and fixes the bug with a regex solution.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
macOS 11 Big Sur will be released later this year. Current beta versions
return 10.16 as the version, but the product name has changed from 'Mac
OS X' to 'macOS'. Train probably needs to be modified to deprecate
'mac_os_x' as a platform in favor of 'macos' but that would be a
significant downstream change. Train does fall back to 'darwin' on macOS
10.16, so by adding darwin to the list of platform names for the service
resource we are able to work around this for the moment.
This is the only location where mac_os_x is currently being used in
InSpec. Because we're in a case statement on platform rather than the
more generic platform family, we can't simply remove mac_os_x in favor
of darwin.
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
We have 72 `skip_windows` that need addressing. This PR removes
confirmed instances where the tests now work on windows. It also marks
tests with a comment where they are confirmed to still break. Unmarked
instances still need review.
It also updates the `skip_windows` expiration date.
72 `skip_windows` needing resolution OR alternative documentation upon investigation
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>