Commit graph

3106 commits

Author SHA1 Message Date
John Keiser
16e759c834 add support for json2 2016-08-24 11:15:17 +02:00
Christoph Hartmann
0413cc4ed6 Merge pull request #964 from chef/chris-rock/restructure-tests-suites
restructure test suites in travis
2016-08-24 11:13:02 +02:00
Christoph Hartmann
02158fbfe4 restructure test suites in travis 2016-08-24 10:50:02 +02:00
Steven Danna
622de28f0f Merge pull request #965 from chef/ssd/expand-path
Expand relative paths based on profile location
2016-08-24 09:29:26 +01:00
Steven Danna
ed179ac088
Only redirect logging to STDERR if format=json
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-24 09:12:59 +01:00
Steven Danna
80fe61b8cd
Expand relative paths based on profile location
Also: Log to STDERR by default

NB: This will result in absolute paths being rendered to lock files. We
think that is OK for now since we are going to build some UX around
path-based dependencies and lock files.  Namely, we are going to tell
people it is a bad idea.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-24 09:12:56 +01:00
Kartik Null Cating-Subramanian
16a943fae5 Merge pull request #968 from Anirudh-Gupta/master
can check windows service startup mode now
2016-08-23 16:41:25 -04:00
Anirudh Gupta
4041f1898e can check windows service startup mode now 2016-08-24 02:01:10 +05:30
Christoph Hartmann
9e45d71bf3 Merge pull request #962 from chef/username-is-already-taken2/win-port-checking
Resolved an issue checking ports on windows
2016-08-23 17:26:28 +02:00
username-is-already-taken2
52c52d565f Update host.rb
Resolved an issue checking ports on windows

The previous version wasn't really checking if a port was accessible as we were only validating if the ping succeeded. Using TcpTestSucceeded to determine if the connection worked or not.
2016-08-23 17:15:33 +02:00
Kartik Null Cating-Subramanian
3415359ea2 Merge pull request #961 from chef/ssd/deps-resolver-replace
WIP: Replace Molinillo-based resolver
2016-08-23 10:52:41 -04:00
Christoph Hartmann
b6318cbc1b Merge pull request #923 from chef/chris-rock/win-file-permissions
Add integration tests for file owner on windows
2016-08-23 16:11:14 +02:00
Christoph Hartmann
a381e406c4 add integration tests for file permissions on windows 2016-08-23 16:03:58 +02:00
Steven Danna
366e65b198
Add the start of tests for the Resolver class
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 14:50:12 +01:00
Steven Danna
d64b72d71d
Replace Molinillo-based resolver
The Molinillo library is a good library for systems that need a
constraint solver that will solve dependency problems requiring a single
version of each named dependency.

In our case, the eventual goal is to allow libraries to have conflicting
transitive dependencies at runtime. Isolation will be provided by
restricting all calls within a given profile to scope which can only see
that profile's dependencies.

To facilitate working on the isolation feature, I've replaced the
Molinillo-based resolver with a minimal resolver which will allow us to
load multiple versions of the same library.

Since we will likely want a good amount of logging around this feature
in the future, I've added a Inspec::Log singleton-style class, replacing
the previous Inpsec::Log which appeared unused in the code base.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 14:27:57 +01:00
Christoph Hartmann
961e815804 Merge pull request #949 from chef/ssd/deps-lockfile
Add prototype of inspec.lock
2016-08-23 15:25:08 +02:00
Steven Danna
d9b6210d30
Remove unused url functions from fetchers
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 13:54:56 +01:00
Steven Danna
02d611e68c
Add archive_path helper to Tar and Url fetchers
Eventually I think we'll want this as part of the fetcher API generally.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 13:54:56 +01:00
Steven Danna
a6ec345eac
Don't set nil cwd in inspec/profile 2016-08-23 13:54:56 +01:00
Steven Danna
3049eb1388
Add comments based on code review and plans for future work
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 13:54:56 +01:00
Steven Danna
9c1b82e7d4
Add prototype of inspec.lock
This adds a basic prototype of inspec.lock. When the lockfile exists on
disk, the dependencies tree is constructed using the information in the
lock file rather than using the resolver.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-23 13:54:55 +01:00
Christoph Hartmann
13e9a69701 Merge pull request #945 from chef/os_helpers
Add darwin helper
2016-08-23 13:55:58 +02:00
Dominik Richter
3222670379 Merge pull request #943 from chef/ksubrama/shell2
Fix command evaluation for inspec shell -c
2016-08-23 12:09:15 +02:00
Tim Smith
d953986d25 Add darwin helper
Signed-off-by: Tim Smith <tsmith@chef.io>
2016-08-23 10:37:52 +02:00
Kartik Null Cating-Subramanian
039c760545 Fixup behavior and add functional tests 2016-08-23 03:07:23 +02:00
Kartik Null Cating-Subramanian
01763d43ed Fix command evaluation for inspec shell -c 2016-08-23 03:07:23 +02:00
Dominik Richter
856dd920f7 Merge pull request #947 from chef/vj/document-or-feature
document OR feature
2016-08-22 21:58:43 +02:00
Victoria Jeffrey
8bb791c12f document OR feature 2016-08-21 19:01:59 -04:00
Christoph Hartmann
baaaf3c95b Merge pull request #944 from chef/os_docs
Update platforms in the docs to match the code
2016-08-19 20:22:08 +02:00
Tim Smith
0dbe816f57 Docs should reference family not platform
Signed-off-by: Tim Smith <tsmith@chef.io>
2016-08-19 20:14:03 +02:00
Tim Smith
86247c012f Add missing platforms to the docs
Signed-off-by: Tim Smith <tsmith@chef.io>
2016-08-19 20:14:03 +02:00
Tim Smith
bdc6e23a9a Update links in the maintainers docs 2016-08-19 20:14:03 +02:00
Christoph Hartmann
2ac94cb947 0.31.0 2016-08-19 20:05:56 +02:00
Christoph Hartmann
64964aa9bd Merge pull request #925 from chef/ksubrama/docs
inspec shell documentation - Fix #805
2016-08-19 20:02:33 +02:00
Kartik Null Cating-Subramanian
83d9deda4f inspec shell documentation 2016-08-19 19:29:32 +02:00
Christoph Hartmann
55193fca15 Merge pull request #909 from chef/ksubrama/shell
Improve inspec shell by having it evaluate describe/control blocks.
2016-08-19 19:28:24 +02:00
Kartik Null Cating-Subramanian
33ae22d313 Support controls and describe blocks in InSpec shell 2016-08-19 19:07:23 +02:00
Christoph Hartmann
2848aeb07d Merge pull request #941 from chef/chris-rock/fix-functional-tests
fix functional test for compliance plugin
2016-08-19 17:52:49 +02:00
Christoph Hartmann
f72fddb114 fix functional test for compliance plugin 2016-08-19 17:16:19 +02:00
Christoph Hartmann
1e93d370fe Merge pull request #935 from chef/ssd/dep-url-fetch-1
Fetch deps based on urls
2016-08-19 09:58:09 +02:00
Christoph Hartmann
95029203cd unique controls for dependency tests 2016-08-19 09:47:41 +02:00
Steven Danna
bde8aa6768 Add basic class descriptions
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-19 09:47:40 +02:00
Steven Danna
f97924901e Ensure we expand requirements with respect to cwd
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-19 09:47:40 +02:00
Steven Danna
d779dd53ae Move all dependency related classes into inspec/dependencies
Signed-off-by: Steven Danna <steve@chef.io>
2016-08-19 09:47:40 +02:00
Steven Danna
2041a08aa2 Fetch deps based on urls
This extends the dependency feature to include support for url-based
dependencies.  It takes some deviations from the current support for
URLs that we'll likely want to make more consistent.

By default, we store downloaded archives in the cache rather than the
unpacked archive. However, to facilitate debugging, we will prefer the
unpacked archive if we find it in the cache.

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-19 09:47:40 +02:00
Steven Danna
afc581b613 Cleanup dependency class organization
- Move classes into their own files
- Remove classes that aren't used

Signed-off-by: Steven Danna <steve@chef.io>
2016-08-19 09:47:40 +02:00
Christoph Hartmann
16ae499d05 Merge pull request #938 from chef/vj/fix-inspec-compliance-login-help
give accurate information for inspec compliance login --help
2016-08-18 21:01:09 +02:00
Christoph Hartmann
af04a0f5ba implement workaround for thor 2016-08-18 20:50:49 +02:00
Victoria Jeffrey
b98c3e243e give accurate information for inspec compliance login --help 2016-08-18 20:00:27 +02:00
Christoph Hartmann
a2cbe6ed8d Merge pull request #930 from chef/vj/fix-cli-profiles-output-bad-token
fail gracefully on inspec compliance profiles when bad token is provided
2016-08-18 19:54:19 +02:00