Vasu1105
10d96ece3f
Add windows platform support for ibmdb2_conf and ibmdb2_session resource
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-01 18:06:16 +05:30
Vasu1105
12e3ee9aca
Fix the command to query on the database
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-01 18:06:16 +05:30
Vasu1105
763f221810
Fix lint errors
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-01 18:06:16 +05:30
Vasu1105
30ea9cfe57
Add ibmdb2_conf and ibmdb2_session resource
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-09-01 18:06:16 +05:30
Clinton Wolfe
28956c0cf5
Merge pull request #5643 from inspec/nm/tags-fix
...
Fix tags processing issue in profiles
2021-08-31 23:40:56 -04:00
Clinton Wolfe
681e2eacfa
Merge pull request #5638 from inspec/nm/fetcher-default-branch-fix
...
Fix url fetcher when default git profile branch is not master
2021-08-31 23:27:56 -04:00
Mendy Baitelman
7abebdf80b
Merge remote-tracking branch 'upstream/main' into add-http-for-windows-2
2021-08-31 17:08:28 -07:00
Clinton Wolfe
d564ab21c6
Merge pull request #5640 from inspec/spelling_fixes
...
Fix typos identified by cspell
2021-08-31 16:29:06 -04:00
Nikita Mathur
c85f49d0d8
Change to filter tags on both key and value basis of hashmap style tags
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-08-31 18:14:58 +05:30
Nikita Mathur
ddcb096666
Fix control tags fetching logic which was breaking profiles with tags used
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-08-31 17:17:27 +05:30
Vasu1105
81b28c2c51
Change master to main branch for inspec-gcp and inspec-azure repo
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-31 14:04:38 +05:30
Nikita Mathur
ca1991451f
Issue fix related to bitbucket default branch fetching in url fetcher
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-08-31 13:12:22 +05:30
Tim Smith
403647c3e4
Fix typos identified by cspell
...
Just a pile of misc typos
Signed-off-by: Tim Smith <tsmith@chef.io>
2021-08-30 16:49:46 -07:00
Clinton Wolfe
83fcc7fec4
Merge pull request #5629 from inspec/vasundhara/fix_for_security_policy_resource
...
Fix for security_policy resource does not return array for local groups
2021-08-30 17:17:16 -04:00
Clinton Wolfe
04dabfee23
Merge pull request #5636 from inspec/vasundhara/remove-wmic-calls-security-identifier
...
Replace use of wmic from security_identifier resource as it will be deprecated soon
2021-08-30 17:11:58 -04:00
Nikita Mathur
44cd84312f
Fix url fetcher when default git profile branch is not master
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-08-30 19:10:12 +05:30
Vasu1105
99a170d7e5
Updated inspec-aws git url to replace branch to master to main
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-30 18:08:06 +05:30
Vasu1105
2100a66bef
Removed use of wmic from security_identifier resource as it will be deprecated soon
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-30 12:47:03 +05:30
Vasu1105
8487da327f
Fix for security_policy resource does not return array for local groups
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-27 18:34:25 +05:30
Clinton Wolfe
77297cfef0
Merge pull request #5578 from elsnepal/aliyun3
...
Add aliyun3 support to service resource
2021-08-23 22:49:28 -04:00
Vasu1105
d1bc86a214
Fix postgres_session error Unable to connect to database
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-08-19 14:15:39 +05:30
Clinton Wolfe
dcf49ad510
Merge pull request #5601 from inspec/nm/bug-apache-conf
...
Fix apache_conf issue when Server Root is not present in configuration
2021-08-17 21:00:38 -04:00
Clinton Wolfe
d191964e23
Merge pull request #5598 from inspec/nm/filtertable-range
...
Fix range based filtering in filter tables
2021-08-17 20:51:05 -04:00
Clinton Wolfe
5bbe34acb0
Merge pull request #5596 from inspec/nm/control-tags
...
Filter active controls in profile by tags
2021-07-27 23:14:41 -04:00
Clinton Wolfe
48c5e22fc0
Merge pull request #5572 from inspec/vasundhara/add_mongodb_session
...
Add mongodb_session resource and docs.
2021-07-27 22:54:48 -04:00
Clinton Wolfe
e1f63cc7a5
Merge pull request #5592 from inspec/vasundhara/add_OPA_support
...
Add support for OPA: add resource opa_cli and opa_api
2021-07-27 22:47:23 -04:00
Nikita Mathur
aa888cf909
Build fix - virtulization test was failing
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-22 13:32:23 +05:30
Nikita Mathur
82db157c06
Apache conf doc changes for server root requirement and review changes
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-19 17:56:13 +05:30
Vasu1105
6ed14dc7de
Fix lint
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-07-19 15:01:31 +05:30
Vasu1105
f0ca02a1c5
Adds unit test for opa_api and opa_cli resource
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-07-19 14:44:47 +05:30
Nikita Mathur
1e8363587e
Test case to test apache_conf when server root is not configured
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-19 14:41:29 +05:30
Nikita Mathur
69b15b6e64
Fix range usage in filter table
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-14 14:27:03 +05:30
Will Dower
5a7f7b4b27
changed array style at chefstyle's request
...
Signed-off-by: Will Dower <wdower@mitre.org>
2021-07-12 11:47:25 -04:00
Will Dower
94f3999fed
updated docs for resource
...
Signed-off-by: Will Dower <wdower@mitre.org>
2021-07-12 11:44:13 -04:00
Will Dower
82f3548118
add
...
Signed-off-by: Will Dower <wdower@mitre.org>
2021-07-12 11:13:47 -04:00
Will Dower
bdd01b3220
Merge remote-tracking branch 'upstream/master' into firewalld_update
...
Signed-off-by: Will Dower <wdower@mitre.org>
2021-07-09 15:34:06 -04:00
Daniel Tingstrom
451fd7bf01
Fix boolean methods to include a '?'
...
Signed-off-by: Daniel Tingstrom <dtingstrom@mitre.org>
2021-07-09 11:38:09 -04:00
Nikita Mathur
a16e9fcf45
Tag based filtering for controls - initial commit
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-09 19:03:15 +05:30
Nikita Mathur
89b0f95c75
Using os_env resource to read ORACLE_HOME env in oracle listener conf resource
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-09 16:31:45 +05:30
Clinton Wolfe
69213b555b
Merge pull request #5576 from inspec/vasundhara/postgresql_resource_update
...
Update postgresql resources to normalize it for platform supports
2021-07-08 18:48:04 -05:00
Clinton Wolfe
f22c342704
Merge pull request #5584 from inspec/nm/mssql-port-fix
...
Remove default port for mssql_session, allowing named connections
2021-07-08 18:39:33 -05:00
Daniel Tingstrom
3e8738a4e6
Update firewalld resource to include more properties
...
Signed-off-by: Daniel Tingstrom <dtingstrom@mitre.org>
2021-07-08 16:50:48 -04:00
Collin McNeese
06eb9b9a84
adds chrony_conf InSpec resource
...
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-07-06 10:46:47 -05:00
Nikita Mathur
f3633aa096
File existence check and other null checks
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-07-02 15:15:19 +05:30
Vasu1105
6bfc2fad2f
Fixed failing specs
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-07-01 15:28:58 +05:30
Nikita Mathur
46328b4812
Removed default port option to enable using named instances with no port option
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-30 17:19:19 +05:30
Nikita Mathur
cb31cefaa2
Review changes - Fetching listener file using env variable
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-29 14:43:56 +05:30
Nikita Mathur
6ea2023922
Review changes - File renames and copy right line removed from resources for oracle conf resources
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-29 12:25:48 +05:30
Nikita Mathur
f921c25efc
Oracle_db_conf and oracle_listener_conf changes, test cases and doc added
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-29 12:25:48 +05:30
Clinton Wolfe
61c83d28b3
Merge pull request #5567 from inspec/nm/oracle-session-exception
...
Oracle Session Exception Handling
2021-06-29 00:47:23 -04:00
Ashish Nepal
80b00794d5
add aliyun3 support
2021-06-26 20:30:57 +01:00
Vasu1105
964a5142f7
Revert changes for password authentication removal
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-25 16:53:49 +05:30
Vasu1105
74cbcc1c5a
Removed password authentication as it breaks for windows and it needs to be handle by user using postgress configuration files
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-25 13:29:23 +05:30
Vasu1105
7f7cbf0ddb
Add unit test for mongodb_session resource
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-24 12:03:53 +05:30
Nikita Mathur
7ec66a0ca9
Missing oracle-error file added for testing
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-24 00:13:04 +05:30
Nikita Mathur
88641c3fac
Fix in oracle command which weren't working in windows powershell
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-21 12:09:54 +05:30
Clinton Wolfe
e4c7dea551
Merge pull request #5562 from inspec/vasundhara/add_mongodb_conf_resource
...
Add support for mongodb_conf resource in InSpec
2021-06-16 22:24:24 -04:00
Nikita Mathur
c28bacdab7
Oracle session exception handling
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-06-16 19:37:58 +05:30
Vasu1105
607d9a1ebc
Removed port property
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-15 20:04:00 +05:30
Vasu1105
da00e359aa
Add mongodb_conf resource to InSpec
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-14 18:17:05 +05:30
Clinton Wolfe
6080ba3108
Merge pull request #5553 from inspec/vasundhara/fix-postgres-session-resource
...
Fix postgres_session resource to raise exception if there is a error in connection or in query
2021-06-09 20:50:52 -04:00
Clinton Wolfe
741806bf83
Merge pull request #5551 from inspec/vasundhara/fix-mysql-session-resource
...
Fix mysql_session resource to raise exception if there is a error in connection or in query
2021-06-09 20:48:55 -04:00
Vasu1105
6f4bd2413d
Fixed failing test
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-04 17:24:28 +05:30
Vasu1105
c801a03b88
Fix postgres_session resource to raise exception if database connection is not established due to any reason or there is error with query
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-03 19:11:25 +05:30
Vasu1105
3d31bbf09b
Fixed typo
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-03 19:02:43 +05:30
Vasu1105
7d91371d9f
Fix mysql_session resource to handle the exceptions if the mysql session is not established. Currently it does not raise any exception due to which the inspec test gives false result
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-06-02 15:35:23 +05:30
Nikita Mathur
3eea2b055a
Fix related to loading dependent profiles from a profile in shell
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-31 21:38:35 +05:30
Clinton Wolfe
ceeb6c7d3d
Merge pull request #5530 from inspec/nm/detect-no-color
...
Bugfix for `inspec detect --no-color` to not return colourful output
2021-05-20 14:52:20 -04:00
Nikita Mathur
209948d3fd
no color change where no ansi code is used at all
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-19 14:39:10 +05:30
Clinton Wolfe
85ecf5373d
Merge pull request #5522 from inspec/vasundhara/fix-for-port-resource
...
Fix for port resource performance: adding more specific search while using ss command
2021-05-18 15:37:01 -04:00
Nikita Mathur
f9659bfaf0
Test cases and color code changes for no-color option in detect cmd
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-18 16:09:42 +05:30
Nikita Mathur
8403780995
test case added for file resource when it does not exist
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-17 14:02:27 +05:30
Vasu1105
1ea3697197
Removed fixture file which was not needed
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-17 11:32:06 +05:30
Vasu1105
da75f0ce33
Removed old ubuntu version from mock_loader file as it's not getting used and added new version of Ubuntu in mock_loader file.
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-17 11:28:39 +05:30
Vasu1105
7990b31f5f
Updated test to mock the newly added command
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-17 11:12:27 +05:30
Clinton Wolfe
442c89d45e
Merge pull request #5523 from kannanr/master
...
Support zfs_pool and zfs_dataset resources on Linux. Handled #5075
2021-05-16 16:56:07 -04:00
Kannan Ramakrishnan
d1831a318c
Lint errors handled. Signed-off-by: @kannanr <kannaa.ram@gmail.com>
2021-05-15 17:48:19 +05:30
Vasu1105
0d83a44f44
Fix the lint and failing test for windows_feature resource
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-05-15 16:56:53 +05:30
Kannan Ramakrishnan
19c624cf38
Support zfs_pool and zfs_dataset resources on Linux. Handled #5075 . Signed-off-by: @kannanr <kannaa.ram@gmail.com>
2021-05-15 12:18:39 +05:30
Clinton Wolfe
02e8e9cc9c
Ran chefstyle -a
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-09 23:59:04 -04:00
Nikita Mathur
fe2ec54d31
Build fix for error that occured after automate alias release
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-05-07 16:42:19 +05:30
Clinton Wolfe
78eea839f3
Merge pull request #5500 from inspec/cw/remove-coverage
...
Remove coverage testing
2021-05-05 12:12:30 -04:00
Clinton Wolfe
1e2b0e79c1
Merge pull request #5487 from inspec/vasundhara/fix_depedent_control_errors
...
Fix undefined method `+' for nil:NilClass\n\nProfile: - when using profile dependencies and require_controls
2021-05-03 21:03:27 -04:00
Clinton Wolfe
c61e70b75b
Remove unused coveralls hooks from test helper
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-03 20:58:48 -04:00
Clinton Wolfe
06fcd26bee
Conditionalize IPv6 support
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-03 20:18:31 -04:00
Clinton Wolfe
2c0cd30f25
Exclude fedora from installing iptables, as it causes a conflict
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-02 22:00:38 -04:00
Clinton Wolfe
f5c8f67c2b
Do not build inspec gem locally or install in os_prepare
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-02 21:00:05 -04:00
Clinton Wolfe
d9d021a861
Update versions of dokken images used and get most of them working; oraclelinux 8 is not working
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-02 21:00:05 -04:00
Clinton Wolfe
55732b848a
Do not use audit cookbook for resource testing
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-05-02 21:00:05 -04:00
Nikita Mathur
7693363a1a
Fix for default null values compatible for both windows and non-windows system
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-28 22:27:30 +05:30
Nikita Mathur
457e544724
Fix for non-existent member for group resource
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-28 22:26:33 +05:30
Clinton Wolfe
0fa00ed252
Merge pull request #5479 from inspec/nm/groups-members-fix
...
Added new property `members_array` for group & groups resources.
2021-04-28 12:33:02 -04:00
Vasu1105
57c1484150
Adds one more profile inside the require_controls_test to check inheritance
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-27 19:29:13 +05:30
Nikita Mathur
b70f3166d4
New property members_array added for group and groups resources and updated documentation
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-23 13:48:29 +05:30
Vasu1105
a09fb159d3
Fix lintstyle
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-22 12:53:08 +05:30
Vasu1105
76dca7f97c
Adds policy property, unit test and documentation for modules and booleans
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-22 11:40:32 +05:30
Clinton Wolfe
79aa03ae14
Merge pull request #5466 from inspec/nm/inputs-regex
...
New input option `pattern` added for DSL and metadata inputs
2021-04-21 19:34:07 -04:00
Nikita Mathur
ea6760c2c0
Undid changes of required validation to fix build errors
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-21 12:33:54 +05:30
Nikita Mathur
e77d5331c5
Added new pattern option, fix for input options on dsl and functional test cases for input options
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-21 12:33:54 +05:30
Vasu1105
58e30cfa81
Review comments fixed
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-21 11:43:03 +05:30
Vasu1105
bd9d81314d
Integrated review comments
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-21 11:43:02 +05:30
Vasu1105
c963b2ac14
fix linting
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-21 11:43:02 +05:30
Vasu1105
cbe7e8c03f
Add selinux resource with basic features support
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-04-21 11:43:02 +05:30
Clinton Wolfe
b3e367da57
Remove default of 3600 seconds for command timeout
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-20 13:32:33 -04:00
Clinton Wolfe
e673b332a3
Merge pull request #5465 from inspec/cw/source-in-reporter
...
Optionally include controls source code in CLI reporter
2021-04-20 13:24:15 -04:00
Clinton Wolfe
1056b84326
Add functional test for --reporter-include-source
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-15 16:16:12 -04:00
Clinton Wolfe
46541a7cae
Typo in test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-08 16:25:09 -04:00
Clinton Wolfe
4dbee6b7bd
Alter split code to handle comments containing the word 'control', and rename some vars
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-08 16:25:09 -04:00
Clinton Wolfe
c21055af62
Rename --ludicrous-speed to --filter-waived-controls and reword usage message
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-04-08 16:25:09 -04:00
Nick Schwaderer
bb5cfbd434
Implement retain-waiver-data to keep 100% feature-ability
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-04-08 16:20:02 -04:00
Nick Schwaderer
ac8ee33b63
Extend nuke_waivers
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-04-08 16:19:17 -04:00
Nick Schwaderer
db3e2751d6
Sets up testing and expectation for completely nuked waived controls
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-04-08 16:18:35 -04:00
Nikita Mathur
8d22d0a360
Code linting issue fixed
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-08 16:04:09 +05:30
Nikita Mathur
5865cdd1c4
Added input and input file option for shell, along with functional test cases
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-08 13:54:12 +05:30
Clinton Wolfe
fa41586910
Merge pull request #5446 from inspec/nm/fix-input-hash-access
...
Bug fix for loading hashmap inputs consistently
2021-04-07 08:49:53 -04:00
Nikita Mathur
82e126726b
Improvements in hashmap profiles
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-07 16:09:27 +05:30
Nikita Mathur
094293b01d
Refactored logic to enable hash indifference in all input types
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-05 16:10:55 +05:30
Nikita Mathur
ec30fc3d4e
Hash with indifference changes for inputs used via runner api
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-04-05 14:41:35 +05:30
Nikita Mathur
a55b083b0a
Improvements in various descriptions and a better way to check for hash type
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-31 12:35:13 +05:30
Nikita Mathur
c0b213c46a
Bug fix for loading hashmap inputs consistently from external and metadata file
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-31 11:42:54 +05:30
Clinton Wolfe
dfb7f64ba6
Explicitly force default timeout in tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 22:13:11 -04:00
Clinton Wolfe
8df0fb0814
Functional tests for command resource timeout
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-03-29 21:46:25 -04:00
Vasu1105
edf8d4d7ed
Skipping on windows
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 21:04:46 +05:30
Vasu1105
a0d669a0f0
Updated test so that can run in the test enviornment
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 19:15:50 +05:30
Vasu1105
7c25a2b5df
Updated test
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:23 +05:30
Vasu1105
9af59c2164
Fixes #5369 the FilterTable::ExceptionCatcher error and now shows exact exception message
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:23 +05:30
Vasu1105
0a62a6ac3b
Added functional test for FilterTable::ExceptionCatcher
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:22 +05:30
Vasu1105
45e9288e90
Revert "Profile to test the FilterTable::ExceptionCatcher issue"
...
This reverts commit 33e096f0854c0f156130fe610ab3ab8f8b65cad4.
2021-03-25 15:50:22 +05:30
Vasu1105
805cf46848
Profile to test the FilterTable::ExceptionCatcher issue
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-25 15:50:22 +05:30
Nikita Mathur
628d1561f9
Unnecessary white spaces removed from git fetcher testing files
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-23 16:42:52 +05:30
Nikita Mathur
d9bb2649e6
Code refactoring changes for fix #5233
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-23 16:20:47 +05:30
Nikita Mathur
d673e840a3
Fix for executing git profiles with default branch not just master
...
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
2021-03-23 16:20:47 +05:30
Clinton Wolfe
f1e118cbaa
Merge pull request #5430 from issue-3181-json-reporter-passthrough-data
2021-03-19 10:24:22 -04:00
Clinton Wolfe
3038ffa807
Merge pull request #5435 from collinmcneese/profile_init
2021-03-19 10:19:26 -04:00
Clinton Wolfe
5378a5128b
Merge pull request #5434 from inspec/vasundhara/fix-for-controls-option
2021-03-19 10:16:02 -04:00
Vasu1105
513c7be801
Added specific regex as for describe block we genrate random control with some random hex which might contain the number that I have used in the rgex due to which test is failing
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:57:46 +05:30
Vasu1105
b180914889
Updated test for --controls option
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
9a404f5e0f
Fixed failing test in inputs_test.rb
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
a5932b7da7
Fixes 5215: While using --controls options the control block was also getting evaluated as filtering of the control was happening after evaluating so added the filter logic in the control_eval_context. Also when we have describe block outside control block we are we
...
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>
2021-03-19 16:10:12 +05:30
Vasu1105
df8d589e25
Removed readme file from test profile
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:12 +05:30
Vasu1105
b4d319610a
Fixing test cases
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Vasu1105
b984bbe960
Fixes #5215 : When we are using --controls option it was also evaluating the control block of not included controls in the controls option as it was filtering the controls from the list after evaluating updated the logic so that it gets evaluated after filtering. Removed filter_controls methods as no more using that
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Vasu1105
89e994c4b3
Fixed test file for syntax issues
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Vasu1105
e1e10732ae
Revert "Updated test to match the exact string"
...
This reverts commit 2048c4dff6689342cd7ef42ea9ba98a4c6715723.
2021-03-19 16:10:11 +05:30
Vasu1105
75ca22c3ce
Updated test to match the exact string
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Vasu1105
6853f6450e
Added test to catch the control execution issue while using controls option
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-19 16:10:11 +05:30
Yoshi Yamaguchi
68aa7ca14b
Change test to be consistent with the main implementation
...
Signed-off-by: Yoshi Yamaguchi <yoshifumi@google.com>
2021-03-19 17:37:06 +09:00
Collin McNeese
88f6d99be3
updates test fixutres for cloud profiles to use inputs instead of attributes
...
Signed-off-by: Collin McNeese <cmcneese@chef.io>
2021-03-17 11:39:42 -05:00
Nick Schwaderer
cbe105bbe0
Handles edge cases for parallelization
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2021-03-16 15:41:55 -04:00
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
Alexander Stein
351a943b35
Put back passthrough automate reporter output.
...
Signed-off-by: Alexander Stein <astein@flexion.us>
2021-03-15 13:17:54 -04:00
Alexander Stein
6748c1d704
Clean up whitespace issues.
2021-03-15 11:54:23 -04:00
Alexander Stein
dbda2b8694
Merge branch 'master' of https://github.com/inspec/inspec into issue-3181-json-reporter-passthrough-data
2021-03-11 22:04:13 -05:00
Alexander Stein
827ce32eec
Add passthrough tests to json reporter.
2021-03-11 22:03:50 -05:00
Clinton Wolfe
27e4854663
Merge pull request #5425 from option-to-skip-empty-profile-report
...
Fixes #5373 : Add option to filter empty profiles from report
2021-03-10 12:07:19 -05:00
mbaitelman
974d78af76
Add head test
...
Signed-off-by: mbaitelman <mendy@baitelman.com>
2021-03-09 21:42:50 -08:00
Alexander Stein
a75241fe1d
More test cleanup.
2021-03-09 23:37:10 -05:00
Alexander Stein
8a017d5fd4
Remove passthrough test from json-automate.
2021-03-09 23:29:12 -05:00
mbaitelman
39c22f4189
cookstyle fixes
...
Signed-off-by: mbaitelman <mendy@baitelman.com>
2021-03-08 07:02:11 -08:00
mbaitelman
ad1bf219eb
Merge remote-tracking branch 'upstream/master' into add-http-for-windows-2
...
Signed-off-by: mbaitelman <mendy@baitelman.com>
2021-03-08 06:47:36 -08:00
mbaitelman
4ad11e8103
fixed tests
...
Signed-off-by: mbaitelman <mendy@baitelman.com>
2021-03-07 23:58:50 -08:00
Vasu1105
8a046b28b4
Added test to do test cmp matcher with nil as actul input to cmp against expected
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-05 20:48:27 +05:30
Vasu1105
216306a219
removed unwanted README files from test fixtures and fixed some minor copy paste test
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-05 16:29:30 +05:30
Vasu1105
7dba4fa641
Fixes #5373 : Add option to filter empty profiles from report
...
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2021-03-04 22:09:48 +05:30
Clinton Wolfe
b425f1d6b9
Merge pull request #5414 from inspec/cw/ssh_conf_first_value
2021-02-23 12:05:44 -05:00
Clinton Wolfe
d22a1bd931
Failing unit test for multiple values in ssh_config
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-02-21 15:06:18 -05:00
Clinton Wolfe
b07b85f582
Failing test case for deep skip_control issue 5300
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2021-02-16 17:59:14 -05:00
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
mbaitelman
f88404a865
call class insteader of loader
...
Signed-off-by: GitHub <noreply@github.com>
2020-10-19 05:24:09 +00:00
mbaitelman
58fd1311c5
Add test fixture
...
Signed-off-by: GitHub <noreply@github.com>
2020-10-16 18:02:31 +00:00
mbaitelman
89cb81ca33
Update to return JSON, start writing tests
...
Signed-off-by: GitHub <noreply@github.com>
2020-10-16 18:01:38 +00:00
Mendy Baitelman
c31057e6f9
Update method name in tests
...
Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
2020-10-15 23:16:27 +00: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
Felipe Zipitria
dd8960dbf6
feat(sensitive): add sensitive output to mysql and postgres sessions
...
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
2020-07-22 14:20:17 -03:00
Felipe Zipitria
d2ae7a7fbf
fix(osfamily): use corresponding family or name for bsd/freebsd
...
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
2020-07-22 08:43:25 -03:00
Nick Schwaderer
2744ff43e5
Merge pull request #5128 from james-stocks/js/report_bad_profiles
...
Report faulty profiles instead of crashing
2020-07-15 13:28:17 +01:00
Nick Schwaderer
934aa8d49a
Merge pull request #5138 from jrbeilke/bug-apt-cdrom
...
skip apt-cdrom repos in apt resource when parsing lists
2020-07-14 11:49:21 +01:00
James Stocks
833aac3ef1
Add profile load failure message to CLI reporter
...
Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-09 14:02:42 +01:00
Nick Schwaderer
6d340b323c
Allow ‘=‘ character in CLI inputs
...
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>
2020-07-09 12:50:21 +01:00
Jon Beilke
bedef776a6
skip apt-cdrom repos in apt resource when parsing lists
...
Signed-off-by: Jon Beilke <Jonathan.Beilke@windlogics.com>
2020-07-08 14:19:09 -05:00
James Stocks
08398cc3c1
Address linting mistakes.
...
Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-03 15:53:09 +01:00
James Stocks
fd4c501c70
Change profile skip_message to status_message
...
Keep a duplicate of the message in skip_message for the JSON reporters, for backwards compaibility.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-03 15:53:09 +01:00
Bryan McLellan
dada8ea074
Add the generic 'darwin' to the service resource
...
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>
2020-07-02 09:36:27 -04:00
James Stocks
41087c5ec6
Set profiles that fail to load as failed
...
Signed-off-by: James Stocks <jstocks@chef.io>
2020-07-02 13:33:07 +01:00
Nick Schwaderer
480567564b
Review skip_windows violations and expiration
...
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>
2020-07-02 11:53:38 +01:00
James Stocks
af5fd7bd03
Merge pull request #5036 from inspec/cw/interface-improvements
...
Additions to the interface resource
2020-06-25 11:27:53 +01:00
Clinton Wolfe
ad673fa570
Do not include CIDR range on ipv4_address and ipv6_address
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 15:37:19 -04:00
Clinton Wolfe
d9007588a6
Add an heuristic-based IP lookup property
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 15:37:19 -04:00
Clinton Wolfe
52468e470e
Barebones plural interfaces resource
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 15:37:19 -04:00
Clinton Wolfe
c386828e7a
Add properties for ipv4 and ipv6 ipaddresses for compat
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 15:37:19 -04:00
Clinton Wolfe
a4000d6912
Adds support for interface on BSD and MacOS
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 15:37:19 -04:00
Clinton Wolfe
aa824d1b49
Fix a bad interaction involving clearing the plugin registry in unit testing
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-18 14:23:54 -04:00
Nick Schwaderer
7068694885
Revert "Make CLI reporter into a plugin"
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-06-18 12:30:15 +01:00
James Stocks
6c9cb23808
Update sslshake test for sslshake 1.13.1
...
There are now 1003 ciphers.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-06-18 11:25:35 +01:00
Nick Schwaderer
dca57b61c0
Merge pull request #4907 from inspec/cw/telemetry-run-context
...
Telemetry - determine run context from stack introspection
2020-06-17 18:17:09 +01:00
Nick Schwaderer
82c6472444
Merge pull request #5069 from inspec/cw/reporter-plugin-cli
...
Make CLI reporter into a plugin
2020-06-17 17:02:07 +01:00
Clinton Wolfe
98ae89e6cc
Convert JUnit reporter to plugin, RunData is still Hash-based
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-11 16:46:04 -04:00
James Stocks
070823122d
Merge pull request #5062 from inspec/cw/reporter-plugin-jsonmin
...
Make the JSON-min Reporter into Plugin
2020-06-11 12:30:18 +01:00
Clinton Wolfe
09bbc7e2e7
Remove a ruby expression-based test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-05 17:40:49 -04:00
Clinton Wolfe
925363766e
Document and test to verify that it skips resources in describe blocks
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-05 17:40:49 -04:00
Clinton Wolfe
f39cf8c904
Tests to exercise only_if functionality
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-05 17:39:54 -04:00
James Stocks
d5f825e716
Merge pull request #5026 from inspec/cw/silence-deprecations
...
CLI Option to silence deprecations
2020-06-05 14:10:50 +01:00
Nick Schwaderer
fb1aeb0655
Merge pull request #5011 from inspec/cw/complex-cli-inputs
...
Boolean, Numeric, and Structured CLI inputs
2020-06-05 04:23:48 -07:00
Clinton Wolfe
458a5c4410
Replace Hash RunData access with method calls
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-03 21:51:21 -04:00
Clinton Wolfe
76033c03ff
Convert CLI reporter to plugin, RunData is still Hash-based
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-03 21:13:27 -04:00
Clinton Wolfe
afc6e59e95
Update run_data fixture to include correct statistics structure
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-03 20:30:29 -04:00
Clinton Wolfe
99ec27b337
Fix json-min reporter unit test
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-02 21:35:16 -04:00
Clinton Wolfe
26e5ae3410
Update run_data fixture to include correct statistics structure
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-06-02 21:34:42 -04:00
Clinton Wolfe
88da919558
Fix exit code check for windows
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-25 23:27:00 -04:00
Clinton Wolfe
d5be4c2927
Test kitchen setup to test detection of audit-cookbook
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-25 21:00:24 -04:00
Clinton Wolfe
43a5fd7945
Test kitchen setup to verify Telemetry RunContext detection under TestKitchen
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-25 21:00:24 -04:00
Clinton Wolfe
09cfcedcd4
Refactor os_prepare cookbook to split out inspec installation
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-25 21:00:24 -04:00
Clinton Wolfe
439c93b115
Add a functional test to check Thor run context detection
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-25 21:00:24 -04:00
Clinton Wolfe
dcc70bc541
Trim log message, make boolean check case insensitive
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-23 00:25:08 -04:00
James Stocks
32fa14f1b0
Merge pull request #5039 from james-stocks/js/issue_5037
...
Allow for waiver time as well as date
2020-05-22 16:52:23 +01:00
James Stocks
23ed9bcf06
Merge pull request #5007 from inspec/cw/reporters-as-plugins
...
Reporters as Plugins
2020-05-22 16:10:29 +01:00
Clinton Wolfe
6dfb37befa
typo
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-21 18:57:30 -04:00
Clinton Wolfe
3184d5ca9e
Add an object model for run_data
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-20 13:27:20 -04:00
James Stocks
350c0bfe8f
Handle waiver expiration dates being YAML strings
...
This is technically incorrect YAML, but if you transcode YAML between several tools you may end up with a date/time value being an explicit string.
It would be helpful if InSpec supported any string value that easily translates to a Time.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-20 15:00:43 +01:00
James Stocks
35e36ad40a
Allow for waiver time as well as date
...
Fixes #5037
The YAML parser may parse a waiver timestamp as a Time rather than a Date. Even when the user doesn't care about time, they may be using a tool that outputs YAML with trailing zeroes for hour, minutes, seconds etc.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-20 14:59:07 +01:00
Nick Schwaderer
989d86c2ce
Stores output of inspec json
to archive and artifact
...
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-20 12:34:17 +01:00
Clinton Wolfe
6a59618d2b
Add a failing test case for silencing deprecations
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-13 22:45:58 -04:00
Clinton Wolfe
ee095a244a
Soften the exception to a warning when the input is not parseable
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-07 10:47:57 -04:00
James Stocks
ba99226baf
Remove TODO Windows skip
...
I removed the skip to see what would break, and on my Windows laptop
these tests pass OK. The TODO didn't explain what wasn't applicable to
Windows, so I'm just going to remove it.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-07 14:01:32 +01:00
James Stocks
1510ff1078
Remove Windows skip from test/functional/inspec_exec_jsonmin_test.rb
...
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-07 13:16:22 +01:00
James Stocks
2103b52dbe
Merge pull request #4994 from james-stocks/js/json
...
Reporter options to truncate message and suppress stacktrace
2020-05-07 12:54:34 +01:00
Clinton Wolfe
12f3f313cb
Don't try to test JSON input under powershell
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-06 16:33:50 -04:00
Clinton Wolfe
786e3728d7
Failing tests for #4799
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 18:09:11 -04:00
Clinton Wolfe
970f583764
Tighten up tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:59:50 -04:00
Clinton Wolfe
c683c4d64d
Failing test cases for 4963
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
824018efa3
Failing test cases for #4977
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 17:37:23 -04:00
Clinton Wolfe
5accb27224
Linting, and a thinko
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Clinton Wolfe
5a7a48bb62
Basics of a working reporter plugin system
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-05-05 16:51:31 +01:00
Nick Schwaderer
a1129f9efc
Allows input and control to have the same name
...
In https://github.com/inspec/inspec/issues/4936 the issue was reported that naming an input the same as a control caused an unexpected failure.
In that particular case, the naming was a result of a pre-waivers workaround which is no longer necessary, but ultimately a breakage of that name clash is an unexpected occurrance.
Due to how inputs are named and registered, `__apply_waivers` thinks that an object is a waiver that is not a waiver and tries to process it. On the micro level, it breaks when trying to pass a variable to a string as if it were a Hash.
It is imperative that we preserve 100% of the current featureset, pass our tests, and fix this edge case along with new test coverage for the failure.
This PR updates the code to do a slightly more elegant and small ‘waiver check’ to stop the namespace clash from breaking our code.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
2020-05-05 10:00:19 +01:00
James Stocks
69fb6e0782
Move reporter option handling to base
...
They don't need to be json specific, they should apply to any reporter if the user has chosen these settings.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 15:24:50 +01:00
James Stocks
ae66aee2b2
(WIP) Reporter options to truncate message and suppress stacktrace
...
TODO: Option names are not JSON specific but only json reporter has been implemented.
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 15:24:50 +01:00
James Stocks
e4fd110ff4
Push Windows test skipping for 2 more months
...
There are open issues for the failng cases and they are in our priority list.
https://github.com/inspec/inspec/issues?q=is%3Aopen+label%3A%22Aspect%3A+Testing%22+label%3A%22Platform%3A+Windows%22
Signed-off-by: James Stocks <jstocks@chef.io>
2020-05-04 14:55:51 +01:00
Clinton Wolfe
58e8bc5167
Divide tests into undeclared and required groups
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-04-24 16:38:11 -04:00
Clinton Wolfe
a12dfcfdc0
Add a failing test case for 4769
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-04-24 13:57:28 -04:00
James Stocks
951fcc9553
Merge pull request #4954 from tecracer-theinen/feature/virtualization-detection
...
Improve virtualization resource
2020-04-06 10:23:58 +01:00
James Stocks
6b11089789
Add 1 more month to Windows test skipping
...
Signed-off-by: James Stocks <jstocks@chef.io>
2020-04-02 17:19:16 +01:00
Thomas Heinen
be120e13b1
Fix deprecation warning on auditd test
...
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2020-03-11 17:24:39 +00:00
Thomas Heinen
6a90c10ae3
Improve virtualization resource
...
Signed-off-by: Thomas Heinen <theinen@tecracer.de>
2020-03-11 17:46:32 +01:00
Clinton Wolfe
a38100a185
Update GCP and azure tests to reflect no-creds errors as seen on CI server
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-03-02 14:32:12 -05:00
Clinton Wolfe
2d9c443a04
Add functional tests that try each of the cloud resource packs with bad creds
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-02-26 14:41:38 -05:00
Ross Moles
e7f01151f0
Merge branch 'master' into oracledb_session_resource
2020-02-14 10:50:10 +00:00
Clinton Wolfe
03d394a51b
Fix auditd resource processing of action and list ( #4665 )
...
Fix auditd resource processing of action and list
2020-02-13 15:12:47 -05:00
Ross Moles
351c4e3651
update unit test
...
Signed-off-by: Ross Moles <rmoles@chef.io>
2020-02-12 18:17:04 +00:00
Ryan Davis
d2e1c3a463
Merge pull request #4905 from inspec/zenspider/artifact
...
Fix artifact-habitat testing for inspec.
2020-02-10 18:57:20 -08:00
Miah Johnson
7bb0bb2188
Merge pull request #4865 from inspec/jh/schema-improvements
...
Jh/schema improvements
2020-02-10 18:38:28 -08:00
Ryan Davis
947365719a
Fix artifact-habitat testing for inspec.
...
Needed a fallback on `ENV["project_root"]` not being defined.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-10 18:34:00 -08:00
Clinton Wolfe
774b5944fb
Detect install type via install path ( #4856 )
...
Detect install type via install path
2020-02-10 15:36:04 -05:00
Clinton Wolfe
73b3336e30
Test feedback
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-02-10 15:12:32 -05:00
Miah Johnson
4f642e0942
Clean up schema PR.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2020-02-05 17:06:55 -08:00
Jacob Henry
724f82237b
Revision of schema to JSON Schema draft 7
...
Signed-off-by: Jacob Henry <jchenry@mitre.org>
2020-02-05 17:05:47 -08:00
Clinton Wolfe
f52b195d7d
...
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-02-05 12:21:14 -05:00
Clinton Wolfe
f8d99eabb9
Move path_exist test code into test file
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-02-05 12:15:48 -05:00
Ryan Davis
ee2401cb13
Merge pull request #4884 from inspec/zenspider/mocha/quiet
...
Please stop warning about mocha.
2020-02-04 12:59:47 -08:00
Clinton Wolfe
64c35b78f9
issue 4807: test for inputs in profiles ( #4883 )
...
issue 4807: test for inputs in profiles
2020-02-04 14:54:29 -05:00
Ryan Davis
6330fa486f
Please also stop warning about VERSION being defined.
...
This removes ::InspecPlugins::TestFixture in installer_test and
loader_test on every test.
Please... no more output in our test runs...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 16:38:25 -08:00
Ryan Davis
327e571ce9
Please stop warning about mocha.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:49:47 -08:00
Ryan Davis
07d5e84eb7
Improved the unit/profiles/* tests.
...
Use better assertions for better failure messages.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
89a0b44c64
Refactored and moved Resource.create_dsl to ProfileContext.
...
ProfileContext#to_resources_dsl is the only usage of it.
The responsibility for this code should be on ProfileContext.
Refactored a majority of #create_dsl to be a 2-line long Module.new
instead of 36 lines. Much less magic. Still has an anonymous module
but it is now much easier to address and debug.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
fa3122cbff
Removed metaprogramming in Inspec::Backend.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
cea752a01d
Tweak for aws resources to determine if they're still under test.
...
Everyone now has an `inspec` method, but the AWS ones still return
nil as their backend hasn't been set up.
This seems wrong...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
ae0dead7be
This is all dead. Removed.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
43f520b4a8
Merged Inspec::Plugins::Resource to Inspec::Resource.
...
This also removes Inspec::ResourceBehaviors and Inspec::ResourceDSL.
All class methods look like class methods.
All instance methods look like instance methods.
There is still too much clever going on with __register creating
another anonymous subclass, but I think I can work that out/down too.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 14:41:37 -08:00
Ryan Davis
44a006a05a
Rename Inspec::Resource.supports to support_registry.
...
To fix an already existing name collision between Inspec::Resource and
Inspec::Plugins::Resource.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:19:32 -08:00
Ryan Davis
99f86c8a0b
These tests don't pass on a network cafe and just hang forever.
...
Changing to localhost resolves immediately but assumes you're NOT
running a git server on http locally.
This seems more valid to me than assuming you know how DNS is going to
resolve everywhere.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Ryan Davis
51b65f6c2e
Overhaul Platform#supported?
...
+ State normal path first.
+ Use Enumerable to state your logic up front, don't build it into
loops with breaks/returns.
+ Remove nonsensical duplication of key formats. (should push up or remove)
+ Had to add an extra test case that wasn't covered here but was in
metadata_test.rb (why?!?)
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Ryan Davis
2490a88b9c
Minor test improvements
...
We need to track down `x.must_equal true`.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Ryan Davis
99ded5a132
Improve test expressiveness by using more direct assertions.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Ryan Davis
06ceba3f3d
Add test for LEC to expose second-level libraries require.
...
Not the best test in the world, but it is better than nothing.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Ryan Davis
ddb0db12ef
Completely refactored profile_resource_exceptions_test.rb
...
Half... half.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-03 13:18:56 -08:00
Nazli Beitollahpour
8a03d38b4b
issue 4807: test for inputs in profiles
...
Signed-off-by: Nazli Beitollahpour <nazli.beitollahpour@umontreal.ca>
2020-02-02 21:43:41 -05:00
Ryan Davis
a3060c4ca8
Merge pull request #4860 from inspec/cw/win-func-input-tests
...
Remove skips from windows testing in 'inputs' and 'archive' functional tests
2020-01-31 17:51:36 -08:00
Ryan Davis
c70f73dc96
Merge pull request #4864 from inspec/zenspider/resource/inspect
...
Added --inspect option to inspect shell command.
2020-01-31 16:42:00 -08:00
Ryan Davis
cc1393bb9a
Merge pull request #4822 from PiQuer/master
...
make command.exist? POSIX conform
2020-01-31 16:41:27 -08:00
Ryan Davis
f2155a64ed
Merge pull request #4843 from michaellihs/master
...
Add support for yocto linux in service resource
2020-01-29 16:19:27 -08:00
Ryan Davis
19ce5df589
Merge pull request #4827 from inspec/mj/namespaces
...
Move parsers under Utils
2020-01-29 16:18:43 -08:00
Ryan Davis
10406545ca
Merge pull request #4862 from inspec/zenspider/resources
...
Fix up the platform on etc_hosts, virtualization, ini, and xml resources to fix OS disparity.
2020-01-29 16:07:47 -08:00
Ryan Davis
2ae2bcf6fb
Merge pull request #4818 from JackChance/master
...
replaced instances of `have_protocols` with `have_protocol` in docume…
2020-01-29 15:46:25 -08:00
Clinton Wolfe
37455bdd11
Parallelize unit tests
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-29 16:15:58 -05:00
Clinton Wolfe
3419c84233
Make predicates private to reduce namespace pollution; added dockerenv check for docker mode
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-29 11:28:52 -05:00
Ryan Davis
9c051da22b
Fix platform on apache_conf to include all unix.
...
Now discovers the first available conf file from a list of known
paths. Might have to expand based on various distros.
Had to tweak the tests because the mock loader mocks EVERYTHING every
time. :/
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-28 14:53:37 -08:00
Ryan Davis
8bd2528ef8
Added --inspect option to inspect shell command.
...
* Removed Resource#inspect (calling to_s) to make debugging a happy experience.
* Added ResourceBehavior.toggle_inspect to add/remove a basic inspect.
* Added `--inspect` flag to `shell` command. Call toggle_inspect unless --inspect used.
* Cleaned up matchers.rb and removed most explicit calls to inspect.
* Added ResourceInspector to rspec's INSPECTOR_CLASSES.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-28 14:52:04 -08:00
Clinton Wolfe
3d5226fb68
Q-quote the args to the train plugin
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-28 13:48:10 -05:00
Clinton Wolfe
28f8d6cc5f
Removing skip in archive test just seems to work, too
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-28 12:24:29 -05:00
Clinton Wolfe
6290ee0190
Just remove skips, it seems to work
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-28 11:57:25 -05:00
Clinton Wolfe
357cf051b1
PR feedback part 1
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-28 11:06:12 -05:00
Clinton Wolfe
46ade02401
Use an archive if possible when fetching fails and --airgap is… ( #4806 )
...
Use an archive if possible when fetching fails and --airgap is provided
2020-01-28 10:02:57 -05:00
Ryan Davis
df31f744f4
Fix up platform on filesystem resource.
...
From linux to unix. This should work fine even on AIX, according to
the man pages.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-01-27 15:34:33 -08:00
Clinton Wolfe
76a9c3e590
Install-path based install context detection
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-27 13:29:37 -05:00
Noel Georgi
7ac25401bb
Add: content option for x509_certificate
...
Signed-off-by: Noel Georgi <git@frezbo.com>
2020-01-22 13:49:35 +05:30
Raimar Sandner
fa2f2c2caa
make command.exist? POSIX conform
...
With the current implementation, on a Linux system without bash
command.exist? always returns false. 'sh -c' is guaranteed to exist on a
POSIX-conform system [1] whereas 'bash -c' only works if bash is
actually installed.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
Obvious fix.
2020-01-19 00:05:33 +01:00
Michael Lihs
edd93eea81
Add support for yocto linux in service resource
...
Signed-off-by: Michael Lihs <michael.lihs@thoughtworks.com>
2020-01-18 01:26:16 +01:00
Miah Johnson
0d57612103
Update references to use new namespace
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2020-01-07 15:12:42 -08:00
Clinton Wolfe
ef9ef919fc
Linting
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
3e3398ff29
Switch to using tmpdir option during testing to avoid rm calls
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
ba4fa9832c
parallelize fetcher tests, conditionalize automate fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
913c066be9
Test fixture and functional test for compliance fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
82ae3b5fa1
Test fixtures and functional test for local fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
ed209643f3
Test fixture for url fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:05 -05:00
Clinton Wolfe
928cf6f05e
Functional test and fixtures for git fetcher fallback
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2020-01-03 14:15:04 -05:00
Ryan Davis
f09595c33d
Merge pull request #4821 from inspec/zenspider/mocha2
...
Found and fixed more mocha/setup deprecations.
2020-01-02 16:07:35 -08:00
Ryan Davis
c57a0e1f13
Found and fixed more mocha/setup deprecations.
...
This level of duplication is not good.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:46:47 -08:00
Ryan Davis
73cccd8681
Cache the backend in profile_context_test.rb
...
And this speeds it up from 0.5s to 0.07s.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Ryan Davis
313f3462ca
Cache MockLoader.connection.
...
Speeds up test/unit/profile/profile_context_test from 7-8s to 0.5s.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Ryan Davis
6426feeeb4
Removed the last of the metaprogramming from ControlEvalContext.
...
* Merged CEC.create args into CEC#initialize
* Converted the only call site of CEC.create to just call new.
* Added profile_context and resources_dsl accessors to CEC.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-31 15:27:12 -08:00
Clinton Wolfe
2409e8fb99
Set test skip bomb date to end of 2020Q1
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-31 12:19:27 -05:00
Cameron Straka
8b037fa9c2
replaced instances of have_protocols
with have_protocol
in documentation and examples
...
Signed-off-by: Cameron Straka <strakacameron@hotmail.com>
2019-12-31 10:51:55 -05:00
Ryan Davis
8e281e007e
oops
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-24 04:11:17 -08:00
Ryan Davis
83f7504d7c
Merge pull request #4789 from Perceptyx/add-freebsd-package
...
Add suport for freebsd package resource
2019-12-17 14:05:40 -08:00
Felipe Zipitria
bff3fa960d
Add suport for freebsd package resource
...
Signed-off-by: Felipe Zipitria <fzipitria@perceptyx.com>
2019-12-17 08:39:43 -03:00
Ryan Davis
e49efa2619
This should fix the mocha deprecations.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-16 15:01:38 -08:00
Trevor Vaughan
21edc712bd
Fix auditd resource processing of action and list
...
Per auditctl(8), the -a option can have either list,action or
action,list. This PR matches against valid actions for the action field
and passed the remainder off to the list field.
Closes #4664
Signed-off-by: Trevor Vaughan <tvaughan@onyxpoint.com>
2019-12-12 17:38:47 -05:00
Ryan Davis
04581d2270
Merge pull request #4771 from inspec/zenspider/rspec-3.9
...
Bump rspec to 3.9 and fix broken tests.
2019-12-09 12:09:32 -08:00
Ryan Davis
f67171fa6b
Bump rspec to 3.9 and fix broken tests.
...
Tests are STILL brittle, but this at least lets us drop old rspec.
Fixes #4575
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-06 16:52:35 -08:00
Clinton Wolfe
bba6d70b3b
Raise FetcherFailure for url headers missing
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:58 -05:00
Clinton Wolfe
b34d489f5c
Add .invalid TLD to test hostanmes
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:58 -05:00
Clinton Wolfe
6b0877591f
Refactor functional test to DRY up
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
8679443698
Functional test for git fetcher failure handling
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
4bda0ddeeb
fixture and implementation for git fetcher failure handling
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
c1d1e6d12f
functional test for URL fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
8a3213861a
Fixture and implementation for URL fetcher
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:32:19 -05:00
Clinton Wolfe
0ddf1687f5
A functional test for the local fetcher
...
I hate to do this, but unit testing this reveals odd behavior
in the fetcher - fetching in a unit harness appears to always succeed.
I'd like to make this into a unit test, but for now I want to focus on
the fetchers.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:30:08 -05:00
Clinton Wolfe
72f1011979
Fixture and implementation for local fetcher error handling
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-12-04 13:30:08 -05:00
Ryan Davis
c5e38d81c4
Merge pull request #4759 from inspec/zenspider/windows-again-and-again
...
Bump windows deadline AGAIN.
2019-12-03 18:43:31 -08:00
Ryan Davis
2fdd68c805
Bump windows deadline AGAIN.
...
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-12-03 18:41:48 -08:00
Miah Johnson
b174273034
Merge pull request #4724 from mbaitelman/add_last_login_user
...
Add last login date to WindowsUser
2019-12-02 13:27:45 -08:00
Miah Johnson
7a837e16d1
Merge pull request #4745 from inspec/mj/cc-coverage
...
Enable Codeclimate Test Coverage
2019-12-02 13:27:00 -08:00
Ryan Davis
fe3c49e705
Merge pull request #4743 from inspec/zenspider/fixtures
...
Suppress output from rubygems installs.
2019-12-02 10:41:04 -08:00
Miah Johnson
fe8f868504
dont set a default simplecov format; we do that elsewhere.
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-28 00:53:22 -08:00
Miah Johnson
9db7b70e30
remove coveralls; all we need is simplecov
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-27 22:12:48 -08:00
Ryan Davis
5a0be99ffb
Added 2.7.0 gem repos to our fixtures.
...
This is NOT THE RIGHT WAY to do this... but it fixes a ton of tests. :(
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 15:42:52 -08:00
Ryan Davis
f2e4fb549c
Address and fix all our ruby 2.7 warnings & errors.
...
This does NOT include fixes for our dependencies that are also having
2.7 warnings (which cause our functional tests to fail because for
some reason we expect stderr to be empty, which is brittle).
I've got upstream PRs to fix all of those. My tests pass locally. I
could push a commit that modifies the Gemfile to use my forks, but I'd
like to see how this fares for now.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 15:42:52 -08:00
Ryan Davis
d4b3a5c149
Suppress output from rubygems installs.
...
I still wish this wouldn't fetch or install... but in the meantime,
leave my dots alone.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-27 13:42:43 -08:00
Clinton Wolfe
6adf7b13be
Merge pull request #4734 from inspec/cw/move-fetchers
...
Move lib/fetchers to lib/inspec/fetchers and re-namspace
2019-11-25 14:56:06 -05:00
Miah Johnson
a636f6bdc9
Merge pull request #4678 from inspec/mj/artifact_tests
...
Add several tests to our artifact suite
2019-11-25 11:53:57 -08:00
Miah Johnson
c993f91ca6
rubocop is on the beat
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-22 12:48:56 -08:00
Clinton Wolfe
9792bae00d
Move the registry cache object
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-22 10:09:51 -05:00
Clinton Wolfe
d9f55bf85c
Singularize the fetchers directory name
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-22 09:57:28 -05:00
Miah Johnson
45070c15c0
Fixup tests
...
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-21 17:01:10 -08:00
Clinton Wolfe
7807c3fa01
Re-namespace core Fetchers
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-18 13:20:35 -05:00
Clinton Wolfe
80ef0eeeba
Take back the Inspec::Fetcher namespace
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-15 16:23:00 -05:00
Mendy Baitelman
6baf0f8a1c
Fix tests
...
Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
2019-11-14 21:22:07 -08:00
Ryan Davis
89888be944
Removing the osx? guard that has been pushed to minitest and released.
...
This is mostly to bump a release because our last one blew up.
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-14 15:05:13 -08:00
Clinton Wolfe
b39d47bda7
Move fetcher files
...
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-11-14 15:25:43 -05:00
Mendy Baitelman
4ba95a0236
Fix syntax, start tests
...
Signed-off-by: Mendy Baitelman <mendy@baitelman.com>
2019-11-13 23:08:23 -08:00
Ryan Davis
540521031b
Merge pull request #4707 from inspec/zenspider/apt-fix
...
Fixes parsing of apt config files with arch specifier.
2019-11-13 15:48:15 -08:00
Ryan Davis
4e818faeb4
Fixes parsing of apt config files with arch specifier.
...
Fixes #4683 .
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-11-12 15:08:06 -08:00
Ryan Davis
865e0d43c0
Fixed a race condition in the tests on windows.
...
Second test would always fail, resumably because the GC kicks in and
the tempfile gets obliterated before the subprocess can read it.
Don't do tempfiles via let. Do them via ivars so they can persist.
2019-11-12 14:51:56 -08:00