inspec/test/functional
Vasundhara Jagdale 95c17d4e7f
CHEF-3849: InSpec should exit quickly and clearly if waiver file is malformed/corrupt (#6644)
* Functional test for malformed waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Raise error for malformed yaml content and exit

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates functional test for malformed yaml waiver file and for empty waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Raises error in case of missing required parameters in waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Update functional test for missing parameters, extra parameters or column without headers in waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix linting

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix warning and error messages

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates nil and false check for yaml data and adds additional empty check.

Co-authored-by: Sathish Babu <80091550+sathish-progress@users.noreply.github.com>
Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Adds more generic message as this yaml reader is now getting used by other functionalities like waiver file

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fixed test description to reflect correct use case

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix validate headers was not validating the required parametes for all the data fields as it was not called inside the loop where we are iterating over the data and fetching the headers.

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates the test files for the use case to missing parameters and extra parameters

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updates code to better handle errors and warnings related to missing required parameters and extra parameters in waivers file in all format i.e (yaml, json and csv).

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Updated functional test to capture the updated error and warning messages for waiver file validation

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Fix linting

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Deleted fixture file which is not required

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

* Refactor: Renamed method validate_headers to reflect whats it's doing and instead of return data in array it will now return the data in hash

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>

---------

Signed-off-by: Vasu1105 <vasundhara.jagdale@progress.com>
Co-authored-by: Sathish Babu <80091550+sathish-progress@users.noreply.github.com>
2023-09-12 10:36:40 -04:00
..
fetchers_test.rb These tests don't pass on a network cafe and just hang forever. 2020-02-03 13:18:56 -08:00
filter_table_test.rb Skipping on windows 2021-03-25 21:04:46 +05:30
git_fetcher_test.rb CHEF-642 Fix for inspec exec fails with git fetcher if current directory does not have .git directory (#6626) 2023-08-31 20:06:24 +05:30
helper.rb Enhanced outcomes changes in json based and yaml reporter 2022-07-29 14:30:59 +05:30
inheritance_test.rb Fixes many of the old skip_windows instances 2020-09-14 15:55:10 +01:00
inputs_test.rb CHEF-4115 Added ability to merge reporter configurations from both CLI and config (#6568) (#6579) 2023-07-25 08:45:42 -04:00
inspec_archive_test.rb Build fix for archive and vendor tests due to cookstyle offenses 2021-09-29 13:23:35 +05:30
inspec_check_test.rb CFINSPEC-181: Fix unable to upload inspec compliance profile using to Chef Automate. 2022-04-14 21:47:10 +05:30
inspec_clear_cache_test.rb Handles edge cases for parallelization 2021-03-16 15:41:55 -04:00
inspec_detect_test.rb First pass at cleaning deprecations for old minitest/spec-style tests. 2019-10-03 13:45:19 -07:00
inspec_env_test.rb Fix env smoke test by updating ERB.new in inspec env; add additional test (#6342) (#6440) 2023-02-24 17:42:42 +05:30
inspec_exec_automate_test.rb Put back passthrough automate reporter output. 2021-03-15 13:17:54 -04:00
inspec_exec_json_test.rb Enhanced outcomes changes in json based and yaml reporter 2022-07-29 14:30:59 +05:30
inspec_exec_jsonmin_test.rb Ran chefstyle -a 2021-05-09 23:59:04 -04:00
inspec_exec_junit_test.rb Fixed failing test 2021-06-04 17:24:28 +05:30
inspec_exec_signed_profile_test.rb Updated sign and verify command to directly accept the path of the profile instead of additional option to provide those. Updated docs for the same. 2022-06-02 10:36:50 +05:30
inspec_exec_streaming_progress_bar_test.rb Foreport 6229 to inspec 6 (#6277) 2022-10-20 14:07:10 -04:00
inspec_exec_test.rb CHEF-4115 Added ability to merge reporter configurations from both CLI and config (#6568) (#6579) 2023-07-25 08:45:42 -04:00
inspec_export_test.rb Add ability to export metadata and README 2022-05-13 00:31:32 +05:30
inspec_json_profile_test.rb CFINSPEC-250: Fix for inspec json command does not populate the attribues/inputs for the profile 2022-05-12 13:34:32 +05:30
inspec_report_test.rb Licensing - Integrates Software Entitlement (#13) 2023-03-27 10:26:35 -04:00
inspec_schema_test.rb Minitest deprecation warning fix for nil check 2022-07-29 14:31:40 +05:30
inspec_shell_test.rb Enhanced outcomes changes in cli reporter 2022-07-29 14:30:58 +05:30
inspec_supermarket_test.rb Test cases and documentation added 2021-11-29 19:12:30 +05:30
inspec_test.rb Updated to generate binary format of the signed profile 2022-05-13 00:31:32 +05:30
inspec_vendor_test.rb Build fix for vendor test 2021-09-29 13:23:35 +05:30
license_test.rb Fixes many of the old skip_windows instances 2020-09-14 15:55:10 +01:00
logging_test.rb Add a failing test case for silencing deprecations 2020-05-13 22:45:58 -04:00
plugins_test.rb Basic test case added for streaming reporter plugin type 2022-02-04 17:28:09 +05:30
profile_gem_dependency_test.rb CFINSPEC-252: Fix profile gem dependency installation is failing when gem version is not specified. 2022-05-13 00:18:03 +05:30
telemetry_test.rb Add a functional test to check Thor run context detection 2020-05-25 21:00:24 -04:00
ui_test.rb no color change where no ansi code is used at all 2021-05-19 14:39:10 +05:30
waivers_test.rb CHEF-3849: InSpec should exit quickly and clearly if waiver file is malformed/corrupt (#6644) 2023-09-12 10:36:40 -04:00