* fix: remove --symref options from git ls-remote
it is causing issue on ubuntu16 and rhel6
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* spec: update test to match commit-sha.tar.gz instead of master.tar.gz
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* spec: skip test on windows, works locally on windows
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
---------
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* gem: Add cookstyle as a dependency for inspec-core.gemspec
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: fix lint of empty newlines
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
---------
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
parser 3.3.1.0 introduced
https://github.com/whitequark/parser/pull/1000, which causes this
failure:
```
% bundle exec ruby -Itest test/unit/profiles/profile_test.rb
inspec/lib/inspec/utils/profile_ast_helpers.rb:7:in `<class:CollectorBase>': uninitialized constant Parser::AST::Processor::Mixin (NameError)
include Parser::AST::Processor::Mixin
^^^^^^^
```
Fix this by inherting from `Parser::AST::Processor` instead.
Closes#7029
Signed-off-by: Stan Hu <stanhu@gmail.com>
* fix: use git gem to perform git remote show
this fixes the issue to perform git remote show when dir is not a git dir
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: update test with default_ref stubbing
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: remove stubs which are not required
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: remove unused method
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: fix broken test due to changes in url fetcher
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: improve error message to be user-friendly
this makes the error message as earlier one
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: change error message:
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* revert: remove git gem dependency and use shellout
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* fix: update url fetcher to use ls-remote to make it work in non-git dirs
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
---------
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* Added class function to list all invoked features by feature sub system
Signed-off-by: Nik08 <nikita.mathur@progress.com>
* Test cases to verify invoked features list function
Signed-off-by: Nik08 <nikita.mathur@progress.com>
---------
Signed-off-by: Nik08 <nikita.mathur@progress.com>
* Adds the check for custom plugins to avoid showing "Unrecognised Feature " warnings for them.
Signed-off-by: Vasu1105 <vjagdale@progress.com>
* Test to verify feature validation should not show warning for custom plugins
Signed-off-by: Vasu1105 <vjagdale@progress.com>
* Fix the test failures
Signed-off-by: Vasu1105 <vjagdale@progress.com>
---------
Signed-off-by: Vasu1105 <vjagdale@progress.com>
* Allow the negate formating for cmp
The 'cmp' matcher when used with a negation as 'should_not' does
has a confusion formating when control fails:
expected: 3
got: 3
This, because the 'format_actual' always pass 'false' to the
'format_expectation'. Thus the 'format_expectation' never reach the
'negate_str'.
Signed-off-by: Pg <pg.developper.fr@gmail.com>
* Linting
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
---------
Signed-off-by: Pg <pg.developper.fr@gmail.com>
Co-authored-by: Vasundhara Jagdale <vjagdale@progress.com>
* test: add unit test for inspec sign #profile_verify
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* enhance: add support for custom config dir to be used during testing
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: add unit test for inspec sign #keygen and #profile_sign
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: remove test for profile sign
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: add test for methods in inspec sign
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
---------
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* chore: change log-level for url fetcher transformation
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* test: remove warning logs from url fetcher test
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
---------
Signed-off-by: Sonu Saha <sonu.saha@progress.com>
* Fix the undefined method file_read error which is causing virtualizaiton resource to set nil for virtualization platform check
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Adds unit test for virtualization resource detect podman container usind detect_container method.
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
---------
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Skip audit log test on Windows
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Fix the text in the audit log test
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
---------
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
* Initial commit to extend backward compatibilty support of waiver with chef client
Signed-off-by: Nik08 <nikita.mathur@progress.com>
* Changes in conditional checks using if instead of unless
Signed-off-by: Nik08 <nikita.mathur@progress.com>
---------
Signed-off-by: Nik08 <nikita.mathur@progress.com>