When using `schtasks` a list is returned if the task has multiple
triggers. This merges that list with the last item taking precedence.
This is how `Get-ScheduledTask` behaves.
Initially, I was going to rewrite this resource to use
`Get-ScheduledTask` but the original author purposely did not do this
so that PowerShell v3 would be supported. We only support PowerShell
v5, but I don't want to break any current users and this change didn't
seem to controversial to me.
If it gives us trouble, I recommend rewriting it to use
`Get-ScheduledTask`.
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This should resolve#1011 which provides an ip6tables resource to test IPv6
iptables rules. This is essentially a copy of the iptables resource with a few
renames.
In addition, I've pulled in the integration tests for iptables into ip6tables
and enabled it on docker so that it properly gets tested regularly. The test
cookbook recipe has been updated to support all of the current platforms that
are being tested.
Signed-off-by: Lance Albertson <lance@osuosl.org>
This fixes `nginx_conf.params` when:
- Given an empty file
- Given a file with only comments
- Given a file that has an include for a file that:
- Is empty
- Has all lines commented out
This also fixes a test where a missing file is actually empty
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
This speeds up parallel unit test runs from a very consistent 2:49 to
a very consistent 1:53, or a 33% reduction.
Signed-off-by: Ryan Davis <zenspider@chef.io>
Trying to fix file_test failure that only happens on travis.
The "mock" file in question is supposed to have a stat of 644, but
actually has 664 but only on travis-ci.
Signed-off-by: Ryan Davis <zenspider@chef.io>
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>
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>