Some versions of `ss` wrap IPv6 addresses in brackets, eg:
```
[fe80::dc11:b9b6:514b:134]%eth0:123
[::]
```
This change removes all brackets during parsing.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
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>
This converts all current deprecation warnings/TODOs to use the
`Inspec.deprecate()` deprecation facility.
This also modifies `Inspec.deprecate()` to only require 1 argument.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.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>