Commit graph

621 commits

Author SHA1 Message Date
Dominik Richter
b04cfc688d add folder integration tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
2727918205 add test provisioner for folder and symlink
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
12c45d0e7a clean test.rb file
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
0969a04853 add symlink file integration tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
7c436baf3c implement remaining file tests for runner
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
1c522d185e extend file tests 2015-09-22 02:17:29 +02:00
Dominik Richter
5557c92923 start file runner integration tests 2015-09-22 02:17:29 +02:00
Dominik Richter
bd00ab93a4 move to test runner with multiple backends 2015-09-22 02:17:29 +02:00
Dominik Richter
cafa45e84e add local specinfra backend to integration tests 2015-09-22 02:17:29 +02:00
Dominik Richter
b0203127ab add all test boxes to kitchen 2015-09-22 02:17:29 +02:00
Dominik Richter
45df094004 complete backend run_command integration tests 2015-09-22 02:17:29 +02:00
Dominik Richter
1e7d365cad switch kitchen provisioner shell -> chef
Reason: Tempering around older ubuntu distros to get their ruby to work just right is error-prone and wasteful. Just install chef from omnibus, grab its ruby to run the tests and use chef to bootstrap the nodes.
2015-09-22 02:17:29 +02:00
Dominik Richter
ba1750e496 add simple localized test environment 2015-09-22 02:17:29 +02:00
Dominik Richter
1e43feef79 add bento boxes
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
8595aa402a print docker test errors
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:28 +02:00
Dominik Richter
cf6db59fc8 improve docker test runner structure
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:28 +02:00
Dominik Richter
54b37b0b96 unify reporting on concurrent tests
Take control of the rspec runner loop and make sure all of our concurrent tests are executed in one reporting chain. It goes: Start reporting, concurrently run container+test+kill, stop and publish reporting.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:28 +02:00
Dominik Richter
c6f896cad3 run full docker test in parallel
With just one more issue left: the formatter is going to report multiple time, including spitting out errors multiple times. Also need to remove some of the custom formatting around the current state of containers.

As a bonus: This further improved testing speed (30% on the current environment) and will allow us to grow the supported platforms for tests easily.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:27 +02:00
Dominik Richter
37ad8f9531 run test setup concurrently + only once
Instead of having RSpec re-run its world multiple times, run it only once with all tests.

Which leaves us with one more thing to solve: we want to start tests as soon as the container is up and they are set up. At the moment, the containers come up and are set up concurrently, including test registry, but the tests themselves are in simple sequence.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:27 +02:00
Dominik Richter
ee11a25f6e run docker tests start/stop concurrently
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:27 +02:00
Dominik Richter
92758ca732 use concurrent container start/stop in tests
As a limitation right now: We cannot yet run all tests concurrently with the current backend. Until this is done, at least speed up container creation and teardown for testing.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:27 +02:00
Christoph Hartmann
33f9dd8e87 add oneget resource 2015-09-22 02:17:21 +02:00
Dominik Richter
ddbaebae46 add mysql unit tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:42 +02:00
Christoph Hartmann
c2c46b3651 update test helper 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
Christoph Hartmann
0171b2e2f2 add gem resource to verify gem packages 2015-09-22 02:15:41 +02:00
Christoph Hartmann
02afd48576 add mock resources for package resource 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
ae44b904e1 use specinfra+docker for now
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:15:40 +02:00
Dominik Richter
8a79edb37e split up ssh client and server config
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:27 +02:00
Dominik Richter
557faf6905 add ssh config integration tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:27 +02:00
Dominik Richter
905f2a0a6f remove duplicate key in test
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
98fcbb5231 add simplecov
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:42:26 +02:00
Dominik Richter
72570aea01 list tests for integration at the beginning
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
90b56f069e fix lint warning on IO::File
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
383738add2 overhaul test helper for mock data
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 01:23:08 +02:00
Dominik Richter
305bb39668 add missing 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
9554a4ac32 add audit_daemon resource test cases 2015-09-21 14:12:11 +02:00
Christoph Hartmann
90935e75e1 add unit test for audit_policy resource 2015-09-21 14:09:16 +02:00
Christoph Hartmann
888f8588fb add unit test for registry_key resource 2015-09-21 14:08:27 +02:00
Christoph Hartmann
57ab2a816b fix rubocop issues for bond unit test 2015-09-21 14:08:20 +02:00
Christoph Hartmann
ca2e0ed6cb add unit tests for etc_group resource 2015-09-21 14:07:32 +02:00
Christoph Hartmann
fb3b4b1369 add unit test for inetd_conf 2015-09-21 14:05:42 +02:00
Christoph Hartmann
158e4ac1ab add unit test for limits.conf 2015-09-21 14:03:24 +02:00
Christoph Hartmann
797d24c14a add login_def resource unit test 2015-09-21 14:01:51 +02:00
Christoph Hartmann
faf7f44a42 add os_env unit test 2015-09-21 13:58:22 +02:00
Christoph Hartmann
0adf3314af add ntp unit test 2015-09-21 13:57:42 +02:00
Christoph Hartmann
413267c322 add passwd unit test 2015-09-21 13:55:51 +02:00
Christoph Hartmann
1b643ae1da implement security policy resource tests 2015-09-21 13:51:43 +02:00
Christoph Hartmann
08ad9704a7 move mock files to new sub-directory 2015-09-21 13:43:09 +02:00
Christoph Hartmann
03a7dd7176 implement unit test for processes resource 2015-09-21 13:43:09 +02:00
Christoph Hartmann
ae514959d2 add ssh unit tests 2015-09-21 13:38:54 +02:00
Christoph Hartmann
6a00ce8ebe add utf-8 header to tests 2015-09-03 18:04:13 +02:00
Christoph Hartmann
abae94ba4e improve test style 2015-09-03 18:03:51 +02:00
Christoph Hartmann
cf77e56118 add unit test for bond resource 2015-09-03 17:34:11 +02:00
Dominik Richter
d8cfd094ac extend integration tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 17:24:45 +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
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
d3d91c8c3f move test container handling to test/docker
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 14:06:43 +02:00
Dominik Richter
a005add5ae start integration tests + add test for resource/command
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 13:22:15 +02:00
Dominik Richter
5ae3b13b38 use let instead of before
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-03 10:25:27 +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
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