inspec/test/unit/fetchers
Jerry Aldrich 6ba4aaf630 Add Git SSH and HTTP basic auth support to inspec exec (#3562)
* Add support for `git@` and HTTP basic auth

This adds support for the following:

```
inspec exec git@github.com:private/example_profile
inspec exec https://username:token@github.com/private/example_profile
inspec exec https://username:password@webserver/private/example_profile
```

This also uses the Git fetcher when the URL ends in `.git`. Example:

```
git config credential.helper cache
git ls-remote https://github.com/private/example_profile.git
inspec exec https://github.com/private/example_profile.git
```

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

* Add documentation for `inspec exec` usage

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

* Add tests for Git fetcher and `inspec exec`

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

* Add `opts` to branch of Git fetcher resolve logic

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

* Modify Git example comments

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

* Force `parse_uri` to attempt a parse

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-11-08 15:55:15 -05:00
..
fetchers_test.rb Fail if a remote source content doesn't match lockfile 2016-09-21 10:15:52 +01:00
git_test.rb Add Git SSH and HTTP basic auth support to inspec exec (#3562) 2018-11-08 15:55:15 -05:00
local_test.rb Add GitFetcher and rework Fetchers+SourceReaders 2016-09-09 14:14:36 +01:00
mock_test.rb Add GitFetcher and rework Fetchers+SourceReaders 2016-09-09 14:14:36 +01:00
source_reader_test.rb restructure unit tests 2016-08-18 13:47:43 +02:00
url_test.rb Add HTTP basic auth for URL based inspec deps (#3341) 2018-08-30 12:57:50 -04:00