Commit graph

1389 commits

Author SHA1 Message Date
Miah Johnson
8435990722
Merge pull request #3899 from inspec/sp/crontab-path-update
crontab: Add validation for path param
2019-04-04 17:26:13 +00:00
Clinton Wolfe
2f5c063e08 Add 'passthrough' field
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-28 01:10:25 -04:00
Clinton Wolfe
a616205dfc Add failing tests for moving the passthru logic to json-automate
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-28 01:07:41 -04:00
Clinton Wolfe
4b96929bf5 Modernize automate output test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-26 10:44:01 -04:00
Miah Johnson
6ce349dcde
Merge pull request #3873 from inspec/cw/config-add-caching
Add caching to Inspec::Config
2019-03-21 10:37:06 -07:00
Stuart Paterson
97f6f232c8
Replace single-quoted static string.
Signed-off-by: Stuart Paterson <spaterson@chef.io>
2019-03-21 16:24:10 +00:00
Stuart Paterson
5accfa5391
Add protection for crontab resource path and document it.
Signed-off-by: Stuart Paterson <spaterson@chef.io>
2019-03-21 15:49:00 +00:00
Clinton Wolfe
789fca2520
Merge pull request #3889 from devoptimist/decouple_tests
Decoupling test profiles from example profiles
2019-03-20 11:07:30 -04:00
devoptimist
2d49f39adc moved example tests into their own sub dir, and reused examples_path variable
Signed-off-by: devoptimist <sbrown@chef.io>
2019-03-18 15:15:32 +00:00
Keith Walters
c2bd0616fe Allow http resource to follow redirects
By specifying a `max_redirects` attribute, the `http` resource worker
will follow any HTTP Redirect response (301, 302, etc...) up to the
limit defined by this attribute. For a local worker, exceeding that
limit will raise a `FaradayMiddleware::RedirectLimitReached` exception.
For a remote worker, the curl command will exit without populating the
`status` and `body` properties.

Signed-off-by: Keith Walters <keith.walters@cattywamp.us>
2019-03-16 20:54:52 -04:00
devoptimist
94d80f6c8f Decoupling test profiles from example profiles
Signed-off-by: devoptimist <sbrown@chef.io>
2019-03-14 00:32:13 +00:00
Clinton Wolfe
c580b695c7
Merge pull request #3842 from inspec/ja/fix-iis-app-pool-resource
iis_app_pool: Fix PowerShell JSON parsing error
2019-03-11 13:52:07 -04:00
Clinton Wolfe
f7202c229b Add caching to Inspec::Config
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-03-06 14:59:06 -05:00
Jerry Aldrich
66a343555b iis_app_pool: Fix PowerShell JSON parsing error
This works around a current bug in PowerShell where the output cannot be
parsed as JSON.

The `-Compress` flag does not affect the validity of the data but only
the appearance of the string.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-02-28 12:04:59 -08:00
Clinton Wolfe
52f6351f84 Adjust regexes for credset name and add tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-27 15:14:27 -05:00
Clinton Wolfe
7328e82ae6 Implement credential set loading
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-27 15:14:27 -05:00
Clinton Wolfe
07ee1c3bb5
Merge pull request #3814 from inspec/tas50/kitchen
Update the integration tests to use dokken-images and newer Chef technologies
2019-02-27 14:43:21 -05:00
Clinton Wolfe
ef18081dfe Merge branch 'cw/attrs-rename-classes-methods'
Accidentally merged cw/attrs-rename-default-attribute into cw/attrs-rename-classes-methods, intended to go to master.
2019-02-26 15:38:20 -05:00
Clinton Wolfe
ac41a6ae20
Merge pull request #3811 from inspec/cw/attrs-rename-classes-methods
Attribute->Input Rename:  Rename Classes and Methods
2019-02-25 18:02:11 -05:00
Clinton Wolfe
c9e8716310 Change two more mentions of DEFAULT_ATTRIBUTE
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-22 10:10:50 -05:00
Clinton Wolfe
24e8c0a6dd Replace DEFAULT_ATTRUBUTE, unit test for it passes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-22 10:05:31 -05:00
Jerry Aldrich
0684cda6c6 Suppress warnings in unit test output
This does the following:
  - Captures warning for lack of `--sudo` with `--sudo-password`
  - Captures warnings for transformation of URL target in url fetcher
  - Changes deprecated `supports:` syntax to use new syntax

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-02-22 00:10:39 -08:00
Clinton Wolfe
947cf32307 Fix version test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:44:25 -05:00
Clinton Wolfe
491ec001a2 Fix bad class name in unit test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
1dab1c1bd5 Skip a test related to input override and profile inheritance; we know this is in flux
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
c28c244f16 Fix a handful of functional tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
f7d58ad92c Replace most mentions of attribute with input in test/
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
4f361bfc56 Replace most mentions of Attribute (titlecase) in lib and test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:10 -05:00
Clinton Wolfe
ce99624095 Renamed AttributeRegistry->InputRegistry
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:09 -05:00
Clinton Wolfe
a1982a5f8b First pass on renaming attribute->input, unit test passes
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-20 20:41:09 -05:00
Tim Smith
0fe5880c5d Add comment regarding the postgresql pin
Basically this avoids sous-chefs breaking inspec tests by accident

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-14 14:02:06 -08:00
Clinton Wolfe
cbf1b665f8 Fix typo in require
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-14 12:37:27 -05:00
Clinton Wolfe
fc448ed6f1 Rename attribute_registry to input_registry
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-14 12:37:27 -05:00
Clinton Wolfe
c538eae2df Rename objects/attribute to objects/input
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-14 12:37:27 -05:00
Tim Smith
68ff8d8b43 Update what we expect for the x509 request
The new built in chef resource creates it a bit differently than the legacy cookbook resource did

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 22:00:00 -08:00
Tim Smith
4b3095dac2 Further modernize the cookbook and remove legacy setup
Remove container setup that comes for free with the dokken containers now
Use the new openssl resource names
Remove all the encoding statements that even rubocop doesn't recommend anymore
Remove some compatibility with centos-5 and ubuntu 15.10

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 21:50:33 -08:00
Tim Smith
772244c12a Use the latest Chef 14 in testing and nuke windows/openssl cookbooks
All the windows / openssl resources are built into Chef now.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 18:04:43 -08:00
Tim Smith
097e2deedc Don't include the apt recipe over and over again in the recipes
We run apt_update once with chef and we already update the cache directly on the container at start. We don't need to try to do the same thing 3 other times.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 17:19:55 -08:00
Tim Smith
55a8f752f9 Remove deps from the Berksfile that are in the metadata
There's no need for this. Never has been.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:28:16 -08:00
Tim Smith
b07aed1c73 Use the platform_family? helper
It's much simpler than listing every single possible platform and it makes this actually work on Oracle

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:06:30 -08:00
Tim Smith
ec29727838 Let Chef handle the root_group itself
We have node['root_group'] and Chef will apply this on its own.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:04:53 -08:00
Tim Smith
6c706f0715 Don't use apt/yum in the kitchen configs either
There's really no need for this. It just slows down the run

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:03:53 -08:00
Tim Smith
2f89081f53 Remove direct usage of apt/yum cookbooks in the os_prepare cookbook
We have an apt_update resource now
Yum cookbook was never needed
dnf is now supported on Fedora out of the box

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:02:41 -08:00
Tim Smith
e826eae292 Move the template out of the default directory
This is a Chef 11 thing.

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 16:01:17 -08:00
Clinton Wolfe
66d0d146b2 Rename test control files
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-11 12:10:08 -05:00
Clinton Wolfe
785888a209 Rename functional tests, unit tests, and test fixtures
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-08 18:23:01 -05:00
Clinton Wolfe
fd3c3df8c1 Add failing functional tests for more piped config subcommands
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-08 13:18:08 -05:00
Jerry Aldrich
273597d371 Remove encoding: utf-8
Thanks @miah

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-02-07 13:04:58 -08:00
Jerry Aldrich
7134989eba Respond to @clintoncwolfe's feedback
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-02-07 11:15:01 -08:00
Jerry Aldrich
a6f74a33b2 Fix Inspec::Config regression in Inspec::Backend
With the changes in PR #3750, `Inspec::Backend.create` needs to support
both being passed a Hash and being passed an Inspec::Config. This adds
a line to convert a passed Hash to an Inspec::Config.

This also adds unit tests for Inspec::Backend because they were missing.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-02-07 01:00:05 -08:00