Commit graph

2069 commits

Author SHA1 Message Date
Thomas Heinen
4ef2c7ad1e Improve programmatic plugin configuration
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2021-01-27 13:31:12 +01:00
Thomas Heinen
00975d8a64 Enable programmatic setting of plugin configuration
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2021-01-26 11:37:34 +01:00
Clinton Wolfe
10255e4118
Update oracledb_session resource to use more general invocation options 2021-01-24 22:46:07 -05:00
Clinton Wolfe
9836c4a207 Add ENV var to skip live net tests in plugin installer unit tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-01-07 15:16:15 -05:00
Clinton Wolfe
0cad164371
Truncate code_desc when truncating reports (5372) 2021-01-06 11:06:49 -05:00
Clinton Wolfe
8c62c5ea69 Add failing tests to truncate code_desc when reporter message truncation is used
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-01-05 18:09:51 -05:00
David Marshall
874ee77791 add test for when run is not specified in waiver
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>
2020-12-28 16:26:19 -08:00
Clinton Wolfe
3b29eb69ab Remove windows test skip timebomb
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 15:17:24 -05:00
Clinton Wolfe
acc4b412ab Silence linter warning
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 13:25:04 -05:00
Clinton Wolfe
cdfb325ca3 Apply chefstyle -a, and manually remove duplicate requires
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 13:25:04 -05:00
Clinton Wolfe
fcadb9792f Update functional tests to work with rspec 3.10+
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-12-21 12:24:24 -05:00
Raphael Geissert
4872ddb780 Accept arrays in parse_config's method_missing
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>
2020-12-08 10:40:51 +01:00
Nick Schwaderer
c766519485
Merge pull request #5302 from yarick/yt/wildcart_support_platform_name
Added platform-name wildcard support
2020-12-03 13:17:02 +00:00
Alex Pop
9438c81a0f Fix mock sha256
Signed-off-by: Alex Pop <apop@chef.io>
2020-12-02 09:29:16 +00:00
Alex Pop
e71043ee09 Make wmi resource always return arrays for params
Signed-off-by: Alex Pop <apop@chef.io>
2020-12-02 09:29:16 +00:00
superyarick
e7e196334a Merge remote-tracking branch 'upstream/master' into yt/wildcart_support_platform_name
Signed-off-by: superyarick <yarick@yarick.net>
2020-12-01 18:29:44 -05:00
Lance Albertson
a6cff007ed Fix Windows escaping of Windows package names
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>
2020-11-30 18:02:50 -08:00
Nick Schwaderer
acf2b2bbab Reverts without bug
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-11-23 15:49:52 +00:00
Nick Schwaderer
0860e631a7 Revert "Supply resource name, params to code_desc"
This reverts commit 345a832eb1.

Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-11-23 15:46:19 +00:00
pacopal
28be72d967 Update oracledb_session.rb
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
2020-11-23 14:43:19 +01:00
Nick Schwaderer
345a832eb1 Supply resource name, params to code_desc
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-11-19 09:59:53 +00:00
superyarick
c653ce343a added platform-name wildcard support
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>
2020-11-08 15:24:43 -05:00
Nick Schwaderer
1f0bcd988f
Merge pull request #5278 from inspec/ns/waiver_message
Ensure that we populate information about waiver expiration regardless of `run: true/false`
2020-10-19 10:41:05 +01:00
Nick Schwaderer
4c4bfe0426 Update tests to handle waiver expiration message
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-10-14 12:55:39 +01:00
James Stocks
db5f6a1615 Tidy --help output slightly
Give `exec` a short description in the main help output. Hide the option to disable core plugins.

Signed-off-by: James Stocks <jstocks@chef.io>
2020-09-25 13:02:16 +01:00
James Stocks
7576ad8ff5 Add Chef patent URL to --help
Fixes #5248

Signed-off-by: James Stocks <jstocks@chef.io>
2020-09-25 13:02:16 +01:00
Clinton Wolfe
6e7e05e6b6 Adjust expected error count
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00
Clinton Wolfe
4e1c209d17 Make sure we test the legacy reporter in the unit test for junit
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00
Clinton Wolfe
b3f72f5854 Implement a corrected junit2 reporter that can be validated
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00
Clinton Wolfe
c602e53910 Update test to remove some skips due to outdated fixture
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>
2020-09-22 11:40:01 +01:00
Clinton Wolfe
955ab36922 Update junit tests to use nokogiri
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-09-22 11:40:01 +01:00
IanMadd
c1da4f64c4 Updating links to inspec docs in ruby scripts
Signed-off-by: IanMadd <imaddaus@chef.io>
2020-09-14 14:09:30 -07:00
IanMadd
6a592a6db2 Update various readmes and docs
Signed-off-by: IanMadd <imaddaus@chef.io>
2020-09-14 14:09:23 -07:00
Nick Schwaderer
668197f726
Merge pull request #5213 from inspec/ns/windows
skip_windows! documentation and clearing
2020-09-14 16:53:15 +01:00
Nick Schwaderer
94224e0695
Merge pull request #5210 from Udyrfrykte/master
Improve handling of bracketed options in deb source
2020-09-14 15:56:25 +01:00
Nick Schwaderer
1a1205c729 Fixes many of the old skip_windows instances
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-09-14 15:55:10 +01:00
Raphael Geissert
b2e62b5b2f Run ps with an ulimited width on linux
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>
2020-09-02 08:34:11 +02:00
Nick Schwaderer
1d71ce141a
Merge pull request #5185 from StylusEaterChef/amd/issue-5183
First pass at fixing issue #5183.
2020-08-27 12:43:18 +01:00
Nick Schwaderer
6a60b456ba
Merge pull request #5054 from inspec/cw/run-data-filters
RunData Filters; sensitive inputs; suppress diff; sorted output
2020-08-27 11:15:57 +01:00
Udyrfrykte
fe74f4fd5b Improve apt.rb's read_debs
Make it better at handling whitespace in bracketed options

Signed-off-by: Benoît Gastinne <Udyrfrykte@users.noreply.github.com>
2020-08-17 11:38:40 +02:00
Tim Smith
303f530850 Update to Chefstyle 1.2.1
Update a few cop names
Remove redundant returns

Signed-off-by: Tim Smith <tsmith@chef.io>
2020-08-12 13:12:26 -07:00
Adam M Dutko
04c3aef004 Fix Issue #5183.
Signed-off-by: Adam M Dutko <adutko@chef.io>
2020-08-11 10:34:13 -04:00
Clinton Wolfe
a839d4602c Add ability to sort results in reporting phase
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-08-10 14:32:08 -04:00
Clinton Wolfe
3aca12d622 Add option to suppress diff output
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-08-10 14:31:28 -04:00
Clinton Wolfe
ceca77e118 Mark inputs as sensitive
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-08-10 14:30:11 -04:00
Nick Schwaderer
cc521b5400
Merge pull request #5084 from inspec/cw/reporter-plugin-junit
Convert JUnit Reporter to a Plugin
2020-08-07 18:06:43 +01:00
Nick Schwaderer
71e141e10a Move windows bomb forward pre-emptively
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>
2020-08-03 10:57:29 +01:00
Nick Schwaderer
986dd1aafb
Merge pull request #5165 from inspec/ns/messages_should_only_be_noted_as_trunncated_if_they_were_actually_truncated
Ensure truncate message only returns on truncated values
2020-07-29 11:55:39 +01:00
Nick Schwaderer
3129af9db9
Merge pull request #5123 from Perceptyx/fix-freebsd-osfamily-user-group-tests
Fix freebsd osfamily user group tests
2020-07-29 10:12:13 +01:00
Nick Schwaderer
d8b06560a1 Ensure truncate message only returns on truncated values
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>
2020-07-29 09:50:25 +01:00