Raise exception if no token is set when using the chef-automate fetcher (#249)
Raise exception if no token is set when using the chef-automate fetcher (#249)

The chef-automate fetcher uses the data_collector token settings but
does not check to ensure it's set before passing it to InSpec for
Fetcher purposes. This causes InSpec to create a data-collector-token
header with a nil value, and then Net::HTTP will toss an ugly error
when trying to call `#strip` on nil.

InSpec should validate inputs too, but this will help catch this issue
in the audit cookbook and provide a better error message. This was
found in the Chef sales demo environments.

Signed-off-by: Adam Leff <0e18f44c1fec03ec4083422cb58ba6a09ac4fb2a@leff.co>
jeremymv2/audit,jeremymv2/audit,chef-cookbooks/audit,chef-cookbooks/audit