Commit graph

326 commits

Author SHA1 Message Date
Dominik Richter
3e02e622c5 bugfix: linux file stat parameters and mount
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:43 +02:00
Christoph Hartmann
51fff9104b bugfix: use instance variable, include winrm 2015-09-22 02:15:43 +02:00
Christoph Hartmann
b03db74798 improvement: set default user at a later stage to support user@target 2015-09-22 02:15:43 +02:00
Dominik Richter
2db06783fb update find_files for all other resources
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:43 +02:00
Dominik Richter
165c08799f bugfix: deep merge mysql conf parameters
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:43 +02:00
Dominik Richter
4852842bf6 feature: add hash utility for deep_merge
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
58fa9bc6c7 update mysql_conf to work with new find_files
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
1345c1d017 update findfiles to work with new backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
f1cc7cbf9b lint utils
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
753e7775ef lint detect
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
486c5fde1c fix code complexity lint
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
0d5ee00ac5 reduce branch size complexity mysql (lint)
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
470c2ef920 wrap up core resource linting
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
903b9642e4 lint resources
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
74da29c3ed lint vulcano lib files
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
07cb7efe36 lint targets
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
46b300f409 finish linting backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
e5686ea4e2 lint backends
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
cfbd5ccfc0 lint plugins
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Dominik Richter
6e01505414 lint
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Dominik Richter
67b5ecc06e bugfix: force PTY on SSH connection
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Christoph Hartmann
1570e8e7af Merge pull request #4 from chef/docker
Start Docker + SSH backends
2015-09-22 02:15:41 +02:00
Dominik Richter
1359152fc6 add ssh channels to get command stdout/stderr/status
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Dominik Richter
0a13817639 feature: add ssh backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Dominik Richter
e3373679ec feature: add docker container backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Christoph Hartmann
238f1b2016 add pip resource to verify gem packages 2015-09-22 02:15:41 +02:00
Christoph Hartmann
bdb859b730 add npm resource to verify gem packages 2015-09-22 02:15:41 +02:00
Dominik Richter
275039dead more rubocop
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:41 +02:00
Christoph Hartmann
0171b2e2f2 add gem resource to verify gem packages 2015-09-22 02:15:41 +02:00
Christoph Hartmann
77815154eb add the be_installed matcher 2015-09-22 02:15:41 +02:00
Christoph Hartmann
9783751741 implement package resource 2015-09-22 02:15:41 +02:00
Dominik Richter
a6c47a2e39 rubocop
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
dcdf8ea0e2 init linux_file owner class
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
a9bd476cb5 feature: configure specinfra backend
via target or backend config; set the backend to: specinfra+exec, specinfra+ssh, specinfra+winrm, specinfra+docker etc.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
03e6402f5c use LinuxFile to get type information in specinfra backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
13bc7f4015 move linux file handling to separate class
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
686134e06b bugfix: url handler crashing on handles?
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:26 +02:00
Dominik Richter
0125bcace8 add call tracing to mock backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:26 +02:00
Dominik Richter
0abef702fc initialize @stat in local backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:26 +02:00
Dominik Richter
ecad431bc6 move mock_command into mock, out of helper
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
17386740c7 dont redefine classmethod on initialize
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
f1c454aae3 typo fix on @commands
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
cb5f2d4409 bugfix: inherit base methods
Don't redefine methods that aren't there yet. yes: ruby parses top down at at that point we don't have these methods yet anyway, so don't :send them to the class

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
32a6f01d1f simplify mock backend association
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
ea91af6da1 lint
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
93a3bc8e58 dont reference backend in local command
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
1d1220983a feature: local backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Christoph Hartmann
a7efec310b implement yum resource 2015-09-22 01:10:56 +02:00
Christoph Hartmann
7e9eb2920d add usage header for audit resource 2015-09-21 14:12:34 +02:00
Christoph Hartmann
62d0b217f9 optimize comments for audit_policy resource 2015-09-21 14:09:43 +02:00
Christoph Hartmann
e57e5f3fd6 bugfix: use new volcano backend for registry key 2015-09-21 14:09:10 +02:00
Christoph Hartmann
92ff33cbba improvement: use separate object to hold filter state, optimize users output 2015-09-21 14:07:58 +02:00
Christoph Hartmann
d40ab9a9ad bugfix: set default path for inetd_conf 2015-09-21 14:06:01 +02:00
Christoph Hartmann
0d7d01efbd bugfix: set default path for limits.conf 2015-09-21 14:04:02 +02:00
Christoph Hartmann
797d24c14a add login_def resource unit test 2015-09-21 14:01:51 +02:00
Christoph Hartmann
9358ac3035 rename env.rb to os_env.rb 2015-09-21 13:58:47 +02:00
Christoph Hartmann
672f03a0dd improve output of ntp resource for single value arrays 2015-09-21 13:58:03 +02:00
Christoph Hartmann
7295e4c16f improve handling on uid data view 2015-09-21 13:56:08 +02:00
Christoph Hartmann
852e5ae627 improvement: remove class variables from security policy implementation 2015-09-21 13:52:49 +02:00
Christoph Hartmann
53eb3b6990 bugfix: escape string before regex, fix regular expression to identify key 2015-09-21 13:52:33 +02:00
Christoph Hartmann
e9e24a6bd5 use new volcano backend for security policy 2015-09-21 13:51:27 +02:00
Christoph Hartmann
f0ac64cf31 improvement: extend mock to support simulated cmds 2015-09-21 13:43:09 +02:00
Christoph Hartmann
cdf15b9dd1 bugfix: support multiple values in ssh config like 'HostKey', improve readability by extracting the first value from array, if we have only one value 2015-09-21 13:43:09 +02:00
Christoph Hartmann
0e8651bf26 fix rubocop issues 2015-09-05 16:07:54 +02:00
Christoph Hartmann
36c9de7529 more rubocop fixes 2015-09-04 09:59:30 +02:00
Christoph Hartmann
91ea24d538 replace :: with . syntax 2015-09-04 09:15:20 +02:00
Christoph Hartmann
bbbb8380ca replace raise with fail 2015-09-03 23:24:42 +02:00
Christoph Hartmann
556bb5a0f0 remove empty lines 2015-09-03 23:20:53 +02:00
Christoph Hartmann
1773d20178 use single quotes 2015-09-03 23:18:28 +02:00
Christoph Hartmann
5c137a7ab1 remove redundant return 2015-09-03 20:45:37 +02:00
Christoph Hartmann
349d5bf9f1 harmonize method definition style 2015-09-03 20:43:58 +02:00
Christoph Hartmann
7bdcc00e94 add utf-8 header 2015-09-03 20:36:46 +02:00
Christoph Hartmann
5612752b82 use single quotes 2015-09-03 20:35:23 +02:00
Christoph Hartmann
a895d19f03 simplify mock file loading method 2015-09-03 17:53:38 +02:00
Christoph Hartmann
a206d0ef09 (re)add debug for mock backend 2015-09-03 17:51:08 +02:00
Christoph Hartmann
7db6941219 feature: add bond resource implementation 2015-09-03 17:34:11 +02:00
Christoph Hartmann
ceb68f94cf feature: extend mock framework to support file mappings 2015-09-03 17:34:11 +02:00
Dominik Richter
c9fcb2913a complete all file tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 16:17:52 +02:00
Dominik Richter
29a143a67f remove file ctime
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 15:43:30 +02:00
Dominik Richter
708fa8485d bugfix: reset specinfra backends between runs manually
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 15:32:33 +02:00
Dominik Richter
f54fa6537a use string for backend conf
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 14:56:08 +02:00
Dominik Richter
f618fa391b bugfix: specinfra file type detection
mask & tmask returns non-zero values, if some bits fit the file-type. this leads to overlapping results. make sure the mask result has the full mask present, then use it.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 14:14:57 +02:00
Dominik Richter
841198993d runner conf must use string-keys
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 13:43:32 +02:00
Dominik Richter
18701752a7 improvement: make runner config map work with keys and string
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 12:56:40 +02:00
Dominik Richter
199cb84ab3 not implemented only throws on missing methods
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 17:30:49 +02:00
Dominik Richter
951f63c6c8 feature: configurable formatter for test exec
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 16:44:14 +02:00
Dominik Richter
1c2ab098f5 specify methods all backends must implement
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 11:53:25 +02:00
Dominik Richter
05b4167971 start backend and file tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 04:55:22 +02:00
Dominik Richter
32964c1e4e tests for backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 04:19:23 +02:00
Dominik Richter
e08787d14e move file interface + helpers to backend plugin
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-02 00:50:52 +02:00
Dominik Richter
f60b7580d5 complete specinfra file backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-01 11:48:50 +02:00
Dominik Richter
a64597594e minor bugfixes
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-01 11:11:34 +02:00
Dominik Richter
04db46f116 add aliases for target and backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 19:49:39 -07:00
Dominik Richter
601abe2579 rename backend reference @vulcano -> vulcano
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 19:33:15 -07:00
Dominik Richter
b2e031c056 start serverspec migration
This project is inspired by Serverspec and all the wonderful contributions that went into it. Thank you all so much! We have used Serverspec as our audit base and have now a slightly different perspective. We hope to continue the spirit on this path. Hopefully both projects will find their way together.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:36:05 -07:00
Dominik Richter
d292ed6ea5 migrate directory resource
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:24:34 -07:00
Dominik Richter
e5daa52064 fix ssh config path
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:18:37 -07:00
Dominik Richter
1bbe67682e start migrating file resource
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:14:17 -07:00
Dominik Richter
50a5803427 rename is_file? -> file?
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:13:53 -07:00
Dominik Richter
431c27d4ab migrate all specinfra backends
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-08-29 17:13:07 -07:00