Anirudh Gupta
75534fdaa5
added hpux user and package resource support
2016-04-21 14:01:56 +05:30
Alex Pop
34a22a290e
add more cmp matcher tests
2016-04-20 11:57:31 -04:00
Dominik Richter
9da23f9cbc
remodel bash and shell wrappers
2016-04-18 11:48:42 -04:00
Dominik Richter
0631779412
configure command execution shells to sh/bash/zsh
2016-04-18 01:09:37 -04:00
Thomas Cate
0f8aff0b91
added default and per kernel checking
2016-04-17 10:46:35 -04:00
Thomas Cate
3051ead64d
added tests for grub_conf resource
2016-04-17 10:46:29 -04:00
Dominik Richter
2a0ccbfd76
fail on unsupported os/platform
2016-04-17 00:04:37 -04:00
Dominik Richter
f54195408f
simplify key symbolization in metadata
2016-04-16 18:47:59 -04:00
Dominik Richter
14995534cd
skip profiles if the platform isnt supported
2016-04-16 15:34:23 -04:00
Dominik Richter
a1188b26ce
add supports_runtime? to metadata
2016-04-16 15:25:59 -04:00
Dominik Richter
5d58fa267b
feature: cmp < / > / <= / >= / == / != sth
matcher
2016-04-15 19:19:15 -04:00
Christoph Hartmann
3007aef248
add function tests for compliance
command
2016-04-13 16:55:14 -04:00
Jacob McCann
9dbf5354e5
Add 'static' value as enabled to systemd service enabled check
2016-04-13 14:44:28 -05:00
Dominik Richter
046e6ce501
bugfix: non-profile execution with json formatter
2016-04-11 11:17:26 -04:00
Dominik Richter
fb54c4ea24
api: inspec.yml supports now adds tests w/o running
...
Instead of just removing all tests because of OS support, supports now acts by adding all tests to the execution context, but doesnt actually execute them. Instead tests are set to skip before they get to the actual execution context
2016-04-06 11:28:52 +02:00
Dominik Richter
c55fb0b587
prevent only_ifs from getting overwritten
2016-04-06 10:46:36 +02:00
Dominik Richter
a72fee6623
add only_if for controls
2016-04-06 10:46:36 +02:00
Dominik Richter
c73afd4c1c
overhault rule/control internals
...
instead of keeping them as flat variables, prefix all internals with `__` to create consistency. Also add accessors on the class-level to expose these values in all rules. This way we keep all variable-names in one location and get some safety on access.
2016-04-06 10:46:36 +02:00
Dominik Richter
598e8be07f
don't remove controls with only_if
...
instead mark them as skipped, but don't just remove them.
This also introduced a number of tests around only_if on the global level
2016-04-06 10:15:53 +02:00
Alex Pop
070c5bb0e9
update tests with 5 examples
2016-04-04 14:19:13 +01:00
Dominik Richter
2cad553de8
add advanced passwd filters (experimental)
2016-03-31 02:03:20 +02:00
Christoph Hartmann
bc3be2f302
fix functional tests
2016-03-28 01:15:48 +02:00
Christoph Hartmann
a0529075d3
add integration tests
2016-03-26 22:49:32 +01:00
Dominik Richter
ee170cc526
support --controls for json
2016-03-25 01:58:59 +01:00
Dominik Richter
17840e0299
split up functional tests
2016-03-25 01:32:03 +01:00
Christoph Hartmann
f4180780d1
document tags and refs
2016-03-25 00:58:27 +01:00
Alex Pop
53c7683ff7
update tests based on resource changes
2016-03-24 21:50:51 +01:00
Alex Pop
3c3d711dfd
bugfix: fix rare inspec shell missing all resources
...
In some instances, when running inspec shell, you dont get any resources inside of it. i.e. `inspec shell` and then `os` will lead to
```ruby
NameError: undefined local variable or method `os' for
from (pry):1:in `add_content'
```
This is because of instance_eval loading withing the given source/line
information and not attaching to the profile context which actually has
all the resources. Fix it by making sure that inspec shell always
attaches to the profile context with resources by providing nil for
source and line information.
2016-03-24 20:37:46 +01:00
Christoph Hartmann
cd57b26bd0
wmi unit test
2016-03-20 11:53:56 +01:00
Christoph Hartmann
7e7196db77
add wmi integration tests
2016-03-20 11:53:56 +01:00
Christoph Hartmann
4c5a3ed412
add vbscript unit test
2016-03-19 19:04:31 +01:00
Christoph Hartmann
e8aa426846
add vbscript integration test
2016-03-19 19:04:31 +01:00
Christoph Hartmann
f50255486b
add support for addresses in port resource
2016-03-19 11:48:14 +01:00
Dominik Richter
a9632d53d4
fix inspec shell and continuously test it
2016-03-19 09:13:23 +01:00
Christoph Hartmann
32a065239c
update unit test, add integration test
2016-03-18 15:47:00 +01:00
Christoph Hartmann
1d043bfebc
move kitchen integration tests to top-level
2016-03-18 11:30:54 +01:00
Christoph Hartmann
8433b55fc4
do not install postgres on ubuntu 15.10
2016-03-18 11:30:54 +01:00
Christoph Hartmann
ea085ef7c0
place empty iso in tmp directory
2016-03-18 11:30:54 +01:00
Dominik Richter
c78a7dfbde
add functional tests for fulljson
2016-03-18 02:42:53 +01:00
Dominik Richter
76fe4483d4
feature: add tags and refs
2016-03-18 01:42:26 +01:00
Dominik Richter
9e6e2bd4f7
add inspec exec tests with json formatter
2016-03-18 00:29:10 +01:00
Dominik Richter
b7e438eabc
add a mock fetcher
2016-03-17 23:37:09 +01:00
Dominik Richter
ca5f7b822b
add tests for resource plugin
2016-03-17 15:58:20 +01:00
Dominik Richter
f7c2fa4392
functional tests for inspec detect + version + exec
2016-03-17 10:21:38 +01:00
Dominik Richter
6853284e31
validate inspec json generation
2016-03-17 10:21:38 +01:00
Dominik Richter
bfd88df27a
verify that archive creates valid zip and tar files
2016-03-17 10:21:38 +01:00
Dominik Richter
0218f1f3ca
feature: --output on archive
2016-03-17 10:21:38 +01:00
Dominik Richter
e3991a2025
bugfix: inspec archive with profile path for inheritance
2016-03-16 20:32:02 +01:00
Dominik Richter
26c34c3487
WIP profile check on inheritance profiles
2016-03-16 20:32:02 +01:00
Dominik Richter
89d7f0b593
give them hell!
...
parallelize minitest runs for functional tests
2016-03-16 08:28:09 +01:00
Dominik Richter
0a4567d49f
add simple command tests for inspec check
2016-03-16 08:23:47 +01:00
Dominik Richter
387415859e
rename internal File
-> FileResource
2016-03-09 10:48:48 +01:00
Adam Leff
577688a3a0
Placing all resources in the Inspec::Resources namespace
...
Many of the resources are named as a top-level class with a fairly generic class name, such as "OS". This causes an issue specifically with kitchen-google which depends on a gem which depends on the "os" gem which itself defines an OS class with a different superclass. This prevents users from using TK, Google Compute, and Inspec without this fix.
Some mocked commands had their digest changed as well due to the new indentation, specifically in the User and RegistryKey classes.
I strongly recommend viewing this diff with `git diff --ignore-space-change`
to see the *real* changes. :)
2016-03-08 13:40:16 -05:00
Dominik Richter
ccf2694940
bugfix: inheritance of local profiles
2016-03-08 14:59:14 +01:00
Dominik Richter
e617f74bcd
filter xinetd fields by regex
2016-02-26 14:46:51 +01:00
Dominik Richter
4a39275fc0
add xinetd_conf resource
2016-02-26 13:19:16 +01:00
Dominik Richter
e9ffc85b53
test for empty global describe block
2016-02-25 14:30:27 +01:00
Dominik Richter
3ae50adae9
feature: conditional OR via describe.one
...
```
describe.one do
describe command("uname -r").stdout do
it { should_not match /x86_64/ }
end
describe test_sth_for_x64_processors do
...
end
end
```
2016-02-25 14:30:23 +01:00
Dominik Richter
2fc0994f4c
add cmp int->string tests
2016-02-23 22:31:10 +01:00
Christoph Hartmann
ee7adc24ec
add unit tests
2016-02-22 18:24:16 +01:00
Stephan Renatus
2da97df5f0
test: read mock-archives in binary mode
...
this doesn't hurt in *nix, but makes tests pass on windows.
2016-02-22 13:47:33 +01:00
Stephan Renatus
c891686d72
tests: create a temporary name, not a Tempfile
...
rubyzip also does use Tempfile under the hood, this causes trouble.
2016-02-22 13:41:12 +01:00
Stephan Renatus
c24a504cb6
tests: clarify kind_of's
2016-02-22 12:06:42 +01:00
Stephan Renatus
8d572934eb
tests: make this work on non-linux
2016-02-22 12:06:42 +01:00
Stephan Renatus
e67576b1cd
tests: make non-existant files explicit
2016-02-22 12:06:42 +01:00
Dominik Richter
33b2876d7c
fix tests and lint
2016-02-22 12:06:42 +01:00
Dominik Richter
d065794d96
remove old target interface
2016-02-22 12:06:42 +01:00
Dominik Richter
1e1e473cb0
replace target-helper with fetcher+reader
2016-02-22 11:24:35 +01:00
Dominik Richter
202a781f6a
fail on incorrect metadata of url download
2016-02-22 11:24:35 +01:00
Dominik Richter
c79d9f7777
add flat source reader
2016-02-22 11:24:35 +01:00
Dominik Richter
c9d1272f49
add relative fetcher
...
This helps reduce any folder structures, weather on disk or in archives, to their relative root paths; i.e. ignore all file-prefixes that are given and go directly to the underlying files, relative to the common folders that contain it
2016-02-22 11:24:35 +01:00
Dominik Richter
f023d02bbb
add inspec source reader
2016-02-22 11:24:35 +01:00
Dominik Richter
125ee53041
create source_reader plugin structure
2016-02-22 11:24:35 +01:00
Dominik Richter
d293550375
chain fetchers together
2016-02-22 11:24:35 +01:00
Dominik Richter
7b073fe153
add url fetcher
2016-02-22 11:24:35 +01:00
Dominik Richter
bd77602695
bugfix: prevent test helper from prematurely deleting tmp-files
2016-02-22 11:24:35 +01:00
Dominik Richter
4e830ffc24
add tar fetcher
2016-02-22 11:24:35 +01:00
Dominik Richter
1c29667523
add zip fetcher
2016-02-22 11:24:35 +01:00
Dominik Richter
a83e29cc01
add local fetcher
2016-02-22 11:24:35 +01:00
Dominik Richter
27f7aa7796
create new fetcher system
2016-02-22 11:24:35 +01:00
Dominik Richter
1e096c7181
add shadow resource for /etc/shadow
2016-02-19 14:26:04 +01:00
Christoph Hartmann
3f6b89e24d
extend github url support
2016-02-19 09:12:25 +01:00
Dominik Richter
1fa957c8ca
ensure deprecated methods still work
2016-02-18 16:25:02 +01:00
Dominik Richter
83fcc35d2a
expose all fields + deprecate singular accessors
2016-02-18 16:10:42 +01:00
Christoph Hartmann
26276ca991
use ruby zip and tar for unit tests
2016-02-18 14:27:16 +01:00
Dominik Richter
b8cce5d3c7
create zip for test helper in ruby
...
The zip command is not always there. (e.g. i dont have it on my box). just use the available zip library
2016-02-18 14:25:55 +01:00
Dominik Richter
b872c04616
bugfix: url helper loading zip and tar
2016-02-18 14:25:55 +01:00
Dominik Richter
509088ba5d
share test helpers for loading profile archives
2016-02-18 14:25:55 +01:00
Dominik Richter
e354854fc9
bugfix: dont skip url target unit test
2016-02-18 14:25:55 +01:00
Dominik Richter
03bf732d82
add cmp for Arrays
2016-02-18 13:58:37 +01:00
Stephan Renatus
476bd750b0
restrict service integration tests on centos to >= 6
2016-02-17 12:55:09 +01:00
Stephan Renatus
d5a6d1000f
integration tests for sysv runlevels
2016-02-17 11:41:34 +01:00
Dominik Richter
33f58b3348
add tests for runlevel testing
2016-02-14 18:37:20 +01:00
Dominik Richter
36cbafc438
add runlevel helper object to services
2016-02-14 18:23:58 +01:00
Dominik Richter
0934948a1a
support runlevels for system V + service matching
...
Bugfix: there were services that would get matched because of the way the regex was constructed, i.e. if the user inserted `.` or `*` or anything regexy. Even if the service only had part of the name you were interested in, it would match (e.g. `sshd` would find `my_sshdaemon`).
Apart from this, runlevels are now detected for SystemV. This is exposed in `#info`
2016-02-13 02:11:51 +01:00
Stephan Renatus
7815cefded
iptables: adapt integration tests
...
_Only_ CentOS 6 does not strip the quotes from comments.
2016-02-10 09:57:32 +01:00
Stephan Renatus
4ffc72bf93
iptables integration test: split according to platform
...
centos puts quotes where ubuntu drops them
2016-02-10 09:57:32 +01:00
Stephan Renatus
81f149fd14
iptables: add integration theses
2016-02-10 09:57:32 +01:00
Stephan Renatus
e184347c6d
iptables unit test: add comment examples
...
this is not broken; but it should stay not broken ;)
2016-02-10 09:57:32 +01:00
Christoph Hartmann
03856d6941
add apache cookbook to integration tests
2016-02-09 17:35:33 +01:00
Stephan Renatus
4b6eced92a
auditd_rules: access by key, tests + documentation
2016-02-09 11:51:52 +01:00
Stephan Renatus
cd5f47ed33
auditd_rules: unit tests, meet the real world
2016-02-09 11:51:52 +01:00
Stephan Renatus
07fb5caa9b
resources/auditd_rules: add integration tests
2016-02-09 11:51:52 +01:00
Stephan Renatus
664561aa80
auditd_rules: status querying (old/new) and unit tests
...
TODO: unit tests for the legacy format
2016-02-09 11:51:52 +01:00
Stephan Renatus
b18936d704
move simple_config_test.rb to utils/
2016-02-09 11:51:52 +01:00
Stephan Renatus
57db5a9414
unit test FilterArray, make retrieved values unique
2016-02-09 11:51:52 +01:00
Stephan Renatus
4afb22565e
auditd_rules: teach old dog new tricks
2016-02-09 11:51:52 +01:00
Stephan Renatus
2afc29e48f
auditd_rules: stash legacy behaviour away
2016-02-09 11:51:52 +01:00
Dominik Richter
ac6d7fb76f
fix unit tests for winrm 1.6.1 command scheme
2016-02-09 11:05:36 +01:00
Dominik Richter
e56321f6c7
semantics: rename CLI plugins registry -> subcommands
...
Basically make sure everyone understands these are only subcommands. we might consider adding plugins for options or existing commands instead of new subcommands. this just ensures everyone knows what registry is for
2016-02-09 01:20:38 +01:00
Christoph Hartmann
b7a88dbd7a
fix linting and unit test
2016-02-05 16:57:51 +01:00
Christoph Hartmann
f826c07af5
minor improvements
2016-02-05 14:55:12 +01:00
Christoph Hartmann
3d7ee9d95b
add unit test for cli plugin
2016-02-05 14:06:55 +01:00
Stephan Renatus
688709356c
upstart_service: add version mock for ubuntu
2016-02-05 13:49:18 +01:00
Stephan Renatus
eecb295377
add tests for upstart on centos
...
...which are failing
2016-02-05 13:49:18 +01:00
Alex Pop
dd02d5985f
ec2 name tag instances for easier cleanup
2016-02-05 13:26:37 +01:00
Christoph Hartmann
86ee6a1298
extend unit tests
2016-02-04 18:46:23 +01:00
Christoph Hartmann
d7cb5a9ae0
adapt unit tests
2016-02-04 18:05:40 +01:00
Christoph Hartmann
81de512fbf
fix order of logging messages
2016-02-03 22:20:02 +01:00
Stephan Renatus
828d6ad443
Inspec::Profile fix @metadata
2016-02-03 16:47:49 +01:00
Stephan Renatus
1c76d723ff
Update tests
2016-02-03 15:42:33 +01:00
Dominik Richter
34bc94d13f
mock resource operating systems for tests
2016-01-29 21:55:08 +01:00
Stephan Renatus
6fbd28c2bb
runit_service: fix resource, improve integration tests
...
Turns out using `/usr/bin/yes` to imitate a daemon process is a TERRIBLE idea.
2016-01-29 17:03:05 +01:00
Christoph Hartmann
52ed18f9d5
update ec2 kitchen yml
2016-01-29 13:20:39 +01:00
Christoph Hartmann
500ac1c41a
update integration tests
2016-01-28 18:30:39 +01:00
Christoph Hartmann
62844eee0c
add unit tests
2016-01-28 18:30:38 +01:00
Christoph Hartmann
678ee2b473
parse port information on solaris 10 and 11 via netstat
2016-01-28 18:30:38 +01:00
Stephan Renatus
56f22a1d2a
resource/postgres_session: add integration tests, change error handling
...
this makes it work (tested with default-ubuntu-1404), but doesn't
improve the error handling (i.e., the skip_resource doesn't really
prevent the failure)
2016-01-25 16:44:53 +01:00
Stephan Renatus
b69dac698b
resources/launchd_service: add test
...
indicating that parsing is broken for non-running enabled services
2016-01-25 16:29:08 +01:00
Dominik Richter
88d2b26387
bugfix: write given ID to metadata json
...
Whenever the user provides an ID under which the profile is scoped, write it out to JSON during generation.
2016-01-25 15:48:56 +01:00
Christoph Hartmann
b30720f926
Merge pull request #380 from chef/sr/service-override
...
add service overrides for picking specific service managers, add runit_service
2016-01-21 13:35:23 +01:00
Stephan Renatus
7a308806aa
unit tests: add systemd_service instance with overridden service_ctl
2016-01-21 11:41:48 +01:00
Dominik Richter
d10207caca
warn about legacy supports fields in metadata
...
I.e.: Prevent users from writing `supports: linux` and similar. These are deprecated and will be removed. Also improve the warning to indicate what the user should do instead. Finally add tests to make sure we get all these.
2016-01-21 11:05:26 +01:00
Stephan Renatus
21224abd10
integration tests: stop using alpine iso
2016-01-21 10:39:03 +01:00
Stephan Renatus
f2f2db120d
fix runit_service tests, replace socat with a proper mock daemon
2016-01-21 09:53:59 +01:00
Stephan Renatus
492c7f8146
runit_service: cleanup; fix "non-running-runit-service" test + recipe
2016-01-21 09:05:29 +01:00
Dominik Richter
cac102aeac
add profile tests (non-legacy)
2016-01-20 21:57:23 +01:00
Stephan Renatus
a4e9a34c5d
add runit_service integration tests
2016-01-20 17:54:04 +01:00
Stephan Renatus
5c0cdb31c9
*_service: add unit tests
...
NB I've just added default duplicates to one instance (i.e., there's
only one `systemd_service`), since there's no os-specific magic in them.
Also these tests only verify that the default choice is equivalent to
`service` on the tested distribution.
2016-01-20 15:54:36 +01:00
Stephan Renatus
0e410df69d
add *_service overrides, allowing for different control binaries
2016-01-20 15:33:18 +01:00
Dominik Richter
20b138778e
bugfix: expose tests for docker unit-tests
2016-01-19 15:48:06 +01:00
Dominik Richter
6cc2575170
bugfix: clean up failed dockerized tests
...
We need to put those tickets back in the semaphore, otherwise the remaining tests never get executed. doh
2016-01-19 15:48:06 +01:00
Dominik Richter
611487e956
clearly identify legacy profile tests and fix identification
2016-01-19 15:48:06 +01:00
Dominik Richter
8c464965c1
extract example group creation
...
and restore profile tests that had been completely mocked until now
2016-01-19 15:48:06 +01:00
Dominik Richter
dd2d93fd6f
completely separate rspec runner parts
2016-01-19 15:48:06 +01:00
Dominik Richter
4064e63df5
add tests for loading metadata yaml internals
2016-01-15 20:51:34 +01:00
Dominik Richter
acbc345321
make metadata.rb legacy mode consistent for supports
...
Before introducing InSpec profiles in https://github.com/chef/inspec/pull/252 we had `metadata.rb` keep all information. This included an undisclosed field called `supports`. However, this field was never actually used in practice. So for legacy profiles, this means that `supports` was ignored. In order to keep old profiles running in exactly the way they were before, ignore this field when reading from metadata.rb
2016-01-15 18:58:18 +01:00
Jeremy W. Chalfant
a2ea1da6e3
move all lsof to formmated output (-F)
2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
f9b5ba1505
account for AIX 7.2 etc.
2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
b363e1d147
formatted lsof mockup
2016-01-14 23:03:24 -05:00
Jeremy W. Chalfant
59d1849607
aix service tests
2016-01-14 23:03:23 -05:00
Jeremy W. Chalfant
aac258218c
more tests
2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
821e95db05
add aix test
2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
bc503f080d
rename etc_group to etc_group_spec and etc_group test success on AIX
2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
db43739951
AIX packages
2016-01-14 23:00:10 -05:00
Jeremy W. Chalfant
5f7dccc1b4
aix group tests
2016-01-14 23:00:09 -05:00
Jeremy W. Chalfant
26afecf857
add aix user support
2016-01-14 23:00:09 -05:00
Jeremy W. Chalfant
ec8ee25028
aix support for file tests was added to train
2016-01-14 23:00:09 -05:00
Mark Harrison
f5780b69a4
Correctly detect UDP ports on linux
...
netstat on UDP lines doesn't display a port state (e.g. LISTEN), so make this
field optional when parsing the netstat line.
2016-01-14 22:53:38 -05:00
Stephan Renatus
5c17f8b643
regexp github url targets, add tests for Inspec::Targests::UrlHelper
...
replacing occuring http:// with https:// is probably ok, github
redirects to https anyways
2016-01-14 12:05:58 -05:00
Jacob McCann
f25ab3a373
Fix systemd service enabled check
2016-01-11 15:32:33 -06:00
Christoph Hartmann
a1ddbe4cf2
explicitly ignore supports for inspec check
2016-01-10 23:59:57 -05:00
Stephan Renatus
a26dbe146d
fix reading profiles bug
...
For reading the profiles metadata, we're using the train mock backend
through Inspec::Runner. The new `supports` feature never agrees with the
mock backend.
Now, it we figure out if this is a mock class and then just say that it
supports whatever we're asking for.
Tl;dr: there's probably a more beautiful solution to this.
Added a test case, but it fails -- while the command line interface
works fine.
2016-01-07 15:16:49 -08:00
Dominik Richter
5c5ed106dd
dummy holder for ex2 creds in kitchen
2016-01-04 03:45:58 +01:00
Christoph Hartmann
b1d6906d16
update readme for aws integration tests
2016-01-04 03:45:58 +01:00
Christoph Hartmann
b24ed632a1
add yml, csv, json and ini to windows integration tests
2016-01-04 03:43:21 +01:00
Christoph Hartmann
a72ba94f10
handle mount results with multiple entries
2016-01-03 00:03:24 +01:00
Christoph Hartmann
e1402a16d9
split integration tests for mount
2016-01-03 00:03:24 +01:00
Christoph Hartmann
50d2ef4db5
add integration tests for mountpoints
2016-01-03 00:03:24 +01:00
Christoph Hartmann
a5acb03e49
add mount
resource
2016-01-03 00:03:24 +01:00
Christoph Hartmann
c7b7eccb5d
update unit test for new parser
2016-01-03 00:03:24 +01:00
Christoph Hartmann
167aa6bdfb
add test for unsupported os
2016-01-02 21:27:40 +01:00
Dominik Richter
d6f48d3534
catch empty support clause
2015-12-31 17:57:59 +01:00
Dominik Richter
af8e4e93ca
add supports keyword to profiles
2015-12-31 17:54:13 +01:00
Dominik Richter
526932584d
fix metadata validation
2015-12-28 13:35:38 +01:00
Dominik Richter
7473dea1f2
ignore auto-generated controls during verify check
2015-12-23 11:11:49 +01:00
Dominik Richter
b2e0fac625
change check errors on summary+title to warnings
2015-12-23 09:18:59 +01:00
Christoph Hartmann
ca33ac9288
Merge pull request #321 from jeremymv2/security_policy_fixes
...
Fixing issue with security policy always returning nil
2015-12-17 17:55:01 +01:00
Jeremy J. Miller
7c279c7d04
helper.rb now reflects the new commands in the security_policy resource
2015-12-17 10:08:28 -05:00
Jeremy J. Miller
9210c97840
Cleaned up extra spaces in file
2015-12-16 21:46:27 -05:00
Jeremy J. Miller
0163d24b72
Adding security_policy integration test
2015-12-16 21:44:18 -05:00
Stephan Renatus
3a1dcb7669
teach cmp
matcher octal tricks
2015-12-16 11:32:31 +01:00
troyready
29f954f7f3
add release to el pkg version & catch missing linebreaks
...
Package release info (e.g. '19.el7') is often required to determine if
a system has been properly patched.
Lines like the following from rpm are messing up the version returned
by the package resource:
"...\nVersion : 1.8.6p3 Vendor: Red Hat, Inc.\n..."
Correcting this with a new conditional check.
2015-12-11 13:05:22 -08:00
Christoph Hartmann
c461ffe7e7
add integration test for compare matcher
2015-12-11 17:03:12 +01:00
Stephan Renatus
652d51e9dc
[resource/port] add port(addr, port)
variant
2015-12-08 20:33:36 +01:00
Stephan Renatus
8532dd7034
[resource/port] change attribute names to plural, indicating arrays
...
see discussion in #256
2015-12-08 20:33:36 +01:00
Adam Leff
c146a76679
File permission checks should return false unless file exists
...
Currently, #readable?, #writeable?, and #executable? will incorrectly
return true if the file does not exist.
In addition, I took the opportunity to refactor the File resource to
make it easier to write unit tests and supplied a full unit test
suite for this resource.
2015-12-08 19:57:34 +01:00
Stephan Renatus
7a1cd660c3
[resources/processes] add users, states attribute; update docs
...
processes('bash').user does not actually make much sense for a resource
that is a list -- different entries can belong to different users.
Analogous for processes('bash').state.
The attributes 'users' and 'states' expose the unique values
corresponding to that property of entries in the process list.
Fixes #295 .
2015-12-08 13:06:27 +01:00
Christoph Hartmann
dcb09802d3
support string and symbol for os resource
2015-12-07 11:11:55 +01:00
Stephan Renatus
79f48afa6c
[resources/apache_conf]: add tests, fix bug
...
before, the resource would throw an exception when include_files
returned nil (i.e., [].flatten!)
added basic unit tests capturing the include_files behaviour
2015-12-07 10:50:48 +01:00
Christoph Hartmann
7c393a1891
Merge pull request #291 from chef/sr/fix-find_files
...
revert to old find_files interface
2015-12-04 14:41:36 +01:00
Stephan Renatus
324ba14a6b
fix optional type argument handling
2015-12-04 14:27:32 +01:00
Stephan Renatus
390e0fcca7
restore old find_files interface
...
- fixes #276
- basic test for find_files
2015-12-04 14:15:45 +01:00
Adam Leff
e0c356dae7
Adding support for Wind River Linux
...
WRL is used as the OS on Cisco Nexus devices and acts like a Red
Hat variant. These changes add support for WRL.
2015-12-03 17:41:11 -05:00
Artem Sidorenko
46f60f05af
Support mint in the integration tests
2015-12-02 06:33:07 +01:00
Christoph Hartmann
2c8a8ccb25
improvement: add etc_group support for centos and add integration test
2015-12-01 10:40:12 +01:00
Christoph Hartmann
9231833cad
add unit tests for user resource that cover ldap groups
2015-11-24 18:35:10 +01:00
Christoph Hartmann
a8e50cd2cf
implement integration tests for ini, csv, json and yaml resources
2015-11-24 16:46:17 +01:00
Christoph Hartmann
0531976a40
implement unit tests for ini resource
2015-11-24 16:46:17 +01:00
Christoph Hartmann
921c2b886c
add more case-insensitive tests
2015-11-23 16:25:33 +01:00
Alex Pop
25acd86c88
add NTLMMinServerSec test
2015-11-23 14:43:47 +00:00
Seth Chisamore
beade346bf
Add Windows support to the os_env
resource
...
This change allows checks like:
```
describe os_env('PATH') do
its('split') { should include('C:\wix') }
end
```
2015-11-19 15:41:00 +01:00
Dominik Richter
d9ded1d38d
test for multiple computed calls to flat describe
2015-11-19 14:28:37 +01:00
Dominik Richter
3afd0d556d
fix typos
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-11-19 14:17:18 +01:00
Christoph Hartmann
2a82905096
simplify cookbook
2015-11-17 22:28:11 +01:00
Christoph Hartmann
83a1e7180e
add integration test for registry key
2015-11-17 22:28:11 +01:00
Christoph Hartmann
27de925c2b
update mock command for registry key
2015-11-17 22:28:11 +01:00
Christoph Hartmann
38e982709e
update unit test
2015-11-17 22:28:11 +01:00
Christoph Hartmann
07f142593e
move registry key test into new directory
2015-11-17 22:28:11 +01:00
Alex Pop
c95cbe340a
add registry_key recipe and spec tests
2015-11-17 22:28:11 +01:00
Christoph Hartmann
8a85e68695
bugfix: run integration tests on windows
2015-11-17 22:14:05 +01:00
Christoph Hartmann
7fe79fdf57
add integration test for port scan
2015-11-16 20:34:21 +01:00
Dominik Richter
17ce88b63d
api: don't force root on os_env
2015-11-13 12:10:22 +01:00
Christoph Hartmann
b33717fa55
add test case for upstart with systemv service
2015-11-13 09:54:30 +01:00
Christoph Hartmann
e703ef3bf8
move test files to work with default test-kitchen
2015-11-13 09:54:30 +01:00
Dominik Richter
8d682973b0
extend csv tests, remove dot-resolver
2015-10-27 15:58:02 +01:00
Dominik Richter
e0874b47b1
extend yaml tests, remove dot-resolver
2015-10-27 15:58:02 +01:00
Dominik Richter
a55e240a0f
extend json tests, remove dot-resolver
2015-10-27 15:58:02 +01:00
Dominik Richter
32e5e3ec29
move to symbols-based fields in profile params
2015-10-27 02:29:11 +01:00
Dominik Richter
7779cdb469
add simple tests for profile
2015-10-27 02:29:11 +01:00
Christoph Hartmann
8738687a89
update to new kitchen-inspect
2015-10-26 19:33:53 +01:00
Dominik Richter
414bf6b1fa
bugfix: handle empty processes result
2015-10-26 16:49:26 +01:00
Dominik Richter
6dc0a3b638
rename inetd_config -> inetd_conf
...
be consistent with the filename
2015-10-26 16:21:51 +01:00
Dominik Richter
95242bf9c2
add content parser tests
2015-10-26 15:50:57 +01:00
Dominik Richter
b58a4b3f43
rename vulcanosec -> inspec
2015-10-26 12:34:15 +01:00
Christoph Hartmann
126ce88bce
fix unit tests
2015-10-26 12:16:38 +01:00
Christoph Hartmann
2fe8ba56a3
add folder test and test more file matcher
2015-10-25 21:36:49 +01:00
Christoph Hartmann
3c76ed6e37
integration test for file
2015-10-24 11:15:53 +02:00
Christoph Hartmann
2ba34c302c
integration test: create sample file
2015-10-24 11:15:53 +02:00
Christoph Hartmann
a199796b5e
add integration test for group
2015-10-24 11:15:52 +02:00
Christoph Hartmann
3a5d091efb
add apt repository integration test
2015-10-24 11:15:52 +02:00
Christoph Hartmann
7080aaf346
install nginx repo on debian and ubuntu for integration test
2015-10-24 11:15:52 +02:00
Christoph Hartmann
857e5ed28e
add kernel_module integration tests
2015-10-23 13:58:20 +02:00
Christoph Hartmann
1d61c0e042
add integration test for kernel_parameter
2015-10-23 13:44:20 +02:00
Christoph Hartmann
191ef73c65
add integration test for user resource
2015-10-23 12:14:00 +02:00
Christoph Hartmann
ea0814939a
add prepare cookbook for package integration test
2015-10-23 12:14:00 +02:00
Christoph Hartmann
f15d05fd22
add package tests
2015-10-23 12:14:00 +02:00
Christoph Hartmann
65761233ba
update comments
2015-10-23 12:14:00 +02:00
Christoph Hartmann
b7f179ae55
add tests for service
2015-10-23 12:14:00 +02:00
Christoph Hartmann
7d909f01dd
run test with sudo
2015-10-23 12:14:00 +02:00
Christoph Hartmann
f38b278b50
setup test-kitchen workflow
2015-10-23 12:14:00 +02:00
Dominik Richter
ecc04aab7b
test: add dsl tests
2015-10-19 10:30:04 +02:00
Dominik Richter
f6aa71d0ed
provide better errors on docker_run tests
2015-10-19 10:21:05 +02:00
Dominik Richter
20dae26925
split methods for processing rules and checks after loading
2015-10-19 09:49:40 +02:00
Dominik Richter
d66f874e1c
feature: support expect keyword in rules
2015-10-18 19:14:22 +02:00
Dominik Richter
f2e955eb37
test: add tests for rule.describe
2015-10-18 19:11:56 +02:00
Dominik Richter
b38adfc6b2
test: add profile context tests
2015-10-18 19:11:56 +02:00
Dominik Richter
ec0931ef9c
test: group resource tests
2015-10-17 22:53:21 +02:00
Dominik Richter
56b88cba1d
create factory for backend creation
2015-10-15 22:42:06 +02:00
Dominik Richter
dcb0b8e557
remove runner tests while migrating to train
2015-10-15 00:47:07 +02:00
Dominik Richter
132019a6d9
move backend creation to profile context
...
keeping it in the runner will create conflicts with rspec runners
2015-10-14 23:44:15 +02:00
Dominik Richter
be614e9056
migrate backend to Train project
2015-10-14 23:13:49 +02:00
Christoph Hartmann
7635a20756
flatten describe tests
2015-10-12 13:35:16 +02:00
Christoph Hartmann
7096b3cd9a
remove let in tests
2015-10-12 13:35:15 +02:00
Christoph Hartmann
dd2fb7938f
ease windows feature test
2015-10-12 13:35:15 +02:00
Christoph Hartmann
d666ce84a2
fix describe in unit tests
2015-10-12 13:35:15 +02:00
Christoph Hartmann
128eb4a7f6
add tests for iptables
2015-10-12 10:34:24 +02:00
Christoph Hartmann
9774ec7984
add test coverage for apt
2015-10-10 23:28:03 +02:00
Christoph Hartmann
1dec6a60b8
remove ruby warnings in helper
2015-10-09 19:55:16 +02:00
Christoph Hartmann
c14e364b93
add mock commands for linux
2015-10-09 19:55:06 +02:00
Christoph Hartmann
2176039120
add linux tests for host
2015-10-09 19:27:29 +02:00
Christoph Hartmann
5a70133330
add mock files for host windows tests
2015-10-09 19:27:07 +02:00
Christoph Hartmann
80b38412e6
add tests for windows
2015-10-09 19:21:55 +02:00
Christoph Hartmann
3126a46b1e
add bridge unit tests for windows
2015-10-09 15:26:59 +02:00
Christoph Hartmann
74729f5779
add more unit test cases
2015-10-09 15:10:43 +02:00
Christoph Hartmann
b2ed180885
add bridge test for linux
2015-10-09 15:07:58 +02:00
Christoph Hartmann
9d92abf524
add windows support to network adapter
2015-10-08 13:01:50 +02:00
Christoph Hartmann
153c670952
introduce better network interface abstraction, add test cases
2015-10-08 13:01:50 +02:00
Christoph Hartmann
46853e74b6
fix lint issues
2015-10-08 13:01:50 +02:00
Dominik Richter
4176d1b227
improvement: add default print method to resources
2015-10-08 11:06:20 +02:00
Christoph Hartmann
d2997400df
add author information
2015-10-07 18:45:08 +02:00
Christoph Hartmann
9c893c5653
add mock result for GetWin32 Group
2015-10-07 18:45:08 +02:00
Christoph Hartmann
737df5348a
add test coverage for group resource
2015-10-07 18:45:08 +02:00
Christoph Hartmann
537728b41b
test case where group or os is not available
2015-10-07 18:45:08 +02:00
Christoph Hartmann
c17be0438a
add unit tests for group resource
2015-10-07 18:45:07 +02:00
Christoph Hartmann
e57505739e
improvement: return gids in etc_group as integer
2015-10-07 18:45:07 +02:00
Christoph Hartmann
028e7f977e
filter comments in /etc/group
2015-10-07 18:45:07 +02:00
Christoph Hartmann
df9411e529
rename test from etcgroup
2015-10-07 18:45:07 +02:00
Christoph Hartmann
9295a60913
add test case for script resource
2015-10-07 13:13:37 +02:00
Christoph Hartmann
8fff2ee989
add author header
2015-10-06 18:55:44 +02:00
Dominik Richter
a72dc86442
bugfix: configure test runners correctly to updated backend
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-06 15:35:37 +02:00
Dominik Richter
5662bb7383
migrate transport runner tests
2015-10-06 00:06:13 +02:00
Dominik Richter
6d54b6e2c5
simplify mock resource creation
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-05 23:22:13 +02:00
Christoph Hartmann
f38ce7d5f4
bugfix: fix error, where the winrm default path is not set properly by default
2015-10-05 15:35:02 +02:00
Christoph Hartmann
6b2064ad89
return password expiry information for linux
2015-10-05 11:50:49 +02:00
Christoph Hartmann
cab93a178a
add tests for user resource
2015-10-05 11:50:49 +02:00
Dominik Richter
369e61d0cd
feature: add path to target specification
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-03 23:39:09 +02:00
Christoph Hartmann
e139070923
increase test coverage for oneget
2015-10-03 13:27:20 +02:00
Dominik Richter
8b97bdbaa7
expose simpleconfig groups
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-30 12:18:09 +02:00
Dominik Richter
4d70aed6ee
add tests for simple config
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-30 12:14:38 +02:00
Dominik Richter
4e15e425a4
move darwin to bsd type
...
see: https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#/media/File:Unix_timeline.en.svg
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 12:14:40 +02:00
Dominik Richter
4f0c0d7f21
add unit tests to os common detection
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:52:50 +02:00
Dominik Richter
c77a0a1c81
api: make mock backend quiet by default
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-28 11:27:19 +02:00
Christoph Hartmann
62ebb6fe17
lint tests
2015-09-25 19:34:25 +02:00
Christoph Hartmann
ec7a743f21
Merge pull request #51 from chef/ssh-transport
...
Verify ssh transport backend
2015-09-25 15:06:00 +02:00
Dominik Richter
31a960e2b6
add ssh backend to runner kitchen tests
...
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-25 14:09:41 +02:00
Christoph Hartmann
a53b2d66c5
add comments
2015-09-25 12:58:34 +02:00
Christoph Hartmann
46fcb334da
bugfix: use debian 8 for systemd unit test
2015-09-25 12:58:26 +02:00
Christoph Hartmann
007d292890
rewrite systemv service implementation, read enabled services from rc
2015-09-25 12:58:03 +02:00
Christoph Hartmann
2901dde219
add systemv service unit tests
2015-09-25 12:54:19 +02:00