Adds missing functionality to `interface`. Fixes#1830
```
describe interface("eth0") do
its(ipv4_addresses) { should include 1.2.3.4 }
end
```
And so on... see diff/docs for additional matchers.
Signed-off-by: Matt Kulka <mkulka@parchment.com>
The opening and closing mechanic varied between all the various
resources. This changes them all to use a HEREDOC with a tilde
to remove leading whitespace. This removes the need for the
special method to trim the `#print_example` method from shell.
Signed-off-by: Franklin Webber <franklin.webber@gmail.com>
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>
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>
This prevents a stack trace from being shown to the user if the `http`
resource is used on an unsupported platform.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* add aws_eks_cluster
Signed-off-by: Timothy van Zadelhoff
timothy.inspec@theothersolution.nl
* disable ABC check on fetch_from_api
Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>
* add status predicates
* Change docs for status attribute
Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>
* Add integration tests
Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>
* Adjust EKS build code to almost work
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* EKS only uses private subnets - integration tests pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Correct AWS Exception class for resource search miss in unit test
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Update unit test to reflect AWS resource-standard miss behavior, returning nil for most properties
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Update package.rb to solve issue #3361
Update the windows package search regex.
According to issue #3361
* Update package.rb
Fix trailing spaces
* Update helper.rb
update sha for get-item-package. To fix the issue #3361
Signed-off-by: markus hackethal <mh@it31.de>
* Improve filesystem.rb to support windows
improve filesystem.rb to support windows.
Split into 2 classes LinuxFileSystemResource / WindowsFileSystemResource
Add filesystem to verify a FS-type ( currently not for linux because missing test server )
Size on Windows is converted to GB - discussion about this welcome
update to reflect also windows os
* Create get-wmiobject-filesystem
* Delete get-wmiobject-filesystem
* Fix the testing code for filesystem.
Change its 'filesystem' to 'type' according to recommendation from @miah
Signed-off-by: Markus Hackethal <mh@it31.de>
* When pty is used not having --no-pager makes inspec hang during the test
* Updated tests
Signed-off-by: Jose Alexandre <jose.alexandre@worldfirst.com>
* add security-group to security-group rules
* update docs
* Add integration tests for security-group to security-group rules
* rubocop fix
* Add one security group rule, with position.
* make control fit description
Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl
* Fixing #3563; freebsd is not a substring of 'bsd'
* Actually, this is better.
* Change coditional for FreeBSD from a string match to a call to os.bsd?
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Methods like…
* `count()` return `Integer` values
* `boolean()` return `TrueClass`/`FalseClass` values
* `concat()` return `String` values
…but threw exceptions because those types weren't supported.
This adds support to the `xml` resource, and adds tests to verify some of those examples.
Signed-off-by: Mark Hughes <greenantdotcom@users.noreply.github.com>
* Resource for a Windows Security Identifier (SID)
* Integration tests for security_identifier resource
* Address rubocop violations
* Improve security_identifier from PR feedback
* Update security_identifier tests
* Improve security_identifier unit tests
* Fix unit tests fpr security_identifier resource
* More security_identifier unit tests
* Add docs page for security_identifier resource
* Fix issues with documentation
* Improve docs
Link to Microsoft reference page, and use their term 'trustee' instead of 'entity' where applicable.
* Change exists to exist
* Test appveyor file changes.
Signed-off-by: Jared Quick <jquick@chef.io>
* Add missing tests for groups resource, document members propery, and assorted fixes.
Update existing documentation for group resource.
Add documentation for groups resource.
Update group resource tests to test members property.
Change groups resource members property to have simple style. (this
ensures members is a single array)
remove deprecated have_gid propery.
change `if !` to `unless`
Remove early return from members method. This prevented members from
working correctly on any OS other than Windows.
Add missing tests for the groups resource.
remove tests for has_gid
Signed-off-by: Miah Johnson <miah@chia-pet.org>
* Fix comments
Signed-off-by: Jared Quick <jquick@chef.io>