inspec/test/functional
Jerry Aldrich III 91403d8c81 Add Chef Automate support to inspec compliance login (#2203)
* Merge `login` and `login_automate` commands

This provides a single interface for logging into either Chef Automate
or Chef Compliance servers. Server type is evaluated at run time via
HTTP responses from designated endpoints.

This also moves the login logic from `Compliance::ComplianceCLI` to a
separate set of modules in `Compliance::API`. This removes logic from
Thor and allows for more in depth Unit testing.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove empty line below class definition

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add message to `raise CannotDetermineServerType`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Refactor `token_info` assignment

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove unnecessary rubocop disable

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Modify `Login` module namespacing

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove mentions of login_automate and --usertoken

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Modify `determine_server_type` to return a symbol

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add support for `login_automate` and `--usertoken`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Fix encoding typo

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Address PR feedback

This does the following:
  - Moves `CannotDetermineServerType` error to `.login`
  - Changes methods that store configuration to return the configuration
  - Moves user output to one location in `.login`
  - Makes other small improvements

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-10-26 17:32:47 +02:00
..
gitfetcher_test.rb Rename --no-write-lockfile to --no-create-lockfile 2016-09-22 10:08:32 +02:00
helper.rb Add sensitive flag to resources to restrict logging output (#2017) 2017-08-25 16:21:49 -04:00
inheritance_test.rb update functional tests 2016-11-04 18:01:28 +01:00
inspec_archive_test.rb Updating tests for profile versions 2016-12-14 16:20:27 +00:00
inspec_artifact_test.rb fix intermitten functional vendor test failures (#1919) 2017-06-12 14:01:26 +02:00
inspec_check_test.rb Modify DirProvider to allow special characters (#2174) 2017-09-23 09:16:25 +02:00
inspec_compliance_test.rb Add Chef Automate support to inspec compliance login (#2203) 2017-10-26 17:32:47 +02:00
inspec_exec_json_test.rb Remove any "All Rights Reserved" references (#1969) 2017-06-28 04:14:19 -07:00
inspec_exec_jsonmin_test.rb bugfix: remove duplicate message in describe.one blocks 2017-06-07 01:27:47 +02:00
inspec_exec_junit_test.rb Replace Nokogiri with REXML in the JUnit formatter 2017-04-03 14:51:48 -04:00
inspec_exec_test.rb Add sensitive flag to resources to restrict logging output (#2017) 2017-08-25 16:21:49 -04:00
inspec_json_profile_test.rb Support PAX-formatted tar files, standardize file lists (#2225) 2017-10-10 10:36:57 +01:00
inspec_shell_test.rb Update shell resource help to return what is defined (#2219) 2017-10-06 19:32:16 +02:00
inspec_test.rb Added functional tests for inspec version --format json 2017-05-17 09:41:38 -04:00
inspec_vendor_test.rb fix intermitten functional vendor test failures (#1919) 2017-06-12 14:01:26 +02:00