Commit graph

1107 commits

Author SHA1 Message Date
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
2c00423c3e read symlink destination file types
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
6f4f0b570c inject specinfra backend helper into file
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
5f472d9735 use lstat for local backend to read symlinks
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
3e16407454 rename file link_target -> link_path
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
60f9e643aa api: specinfra mtime returns unix seconds
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:30 +02:00
Dominik Richter
04a8cfddf4 ignore exit code on linux stat
For now: Since stat throws exit code 1 on selinux label checks if no selinux label (or system) is present, it would signal us to disregard results. However, the results are actually complete and can be fully used, with selinux_label becoming "?".

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
526518fabd api: set specinfra product_version + file_version to nil
whenever the label is empty (typically on all *nix systems) set it to nil instead of ""

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
55bd535599 api: specinfra set selinux label to nil
Whenever the selinux label is empty, set it to nil instead of '?' or ''.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +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
534a9ce57a bugfix: always return file stat 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
e03d567b58 ignore test kitchen files 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
1dbcac33f5 bugfix: gemspec should be able to run without git 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
b3896a77a2 lint Rakefile
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
867242eb25 rename test:integration -> test:resources
make room for backend tests

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
c86a68950a improvement: add optimized local file module
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:29 +02:00
Dominik Richter
491378b73b Merge pull request #17 from chef/readme
improve readme
2015-09-22 02:17:28 +02:00
Dominik Richter
ce27506be6 Merge pull request #18 from chef/specinfra-ssh-fix
bugfix: set host for ssh config in specinfra
2015-09-22 02:17:28 +02:00
Christoph Hartmann
733c12aa30 improve readme 2015-09-22 02:17:28 +02:00
Christoph Hartmann
e72f8721fc Merge pull request #15 from chef/fix-osdetection
Fix specinfra OS detection
2015-09-22 02:17:28 +02:00
Christoph Hartmann
6e76dd689e bugfix: set host for ssh config in specinfra 2015-09-22 02:17:28 +02:00
Dominik Richter
d7e0f98ace Merge pull request #14 from chef/os-detection
Os detection
2015-09-22 02:17:28 +02:00
Dominik Richter
8f45afffcd move up specinfra property detection
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:28 +02:00
Dominik Richter
fdc67bb02c Merge pull request #13 from chef/specinfra-winrm
bugfix: require specinfra backend
2015-09-22 02:17:28 +02:00
Christoph Hartmann
dfb330e7e8 use backend os detection in resources 2015-09-22 02:17:28 +02:00
Dominik Richter
48b25e893d bugfix: specinfra re-detect backend os
By default it uses the currently running OS on initialization, instead of the OS configured via backend. Force its reinitialization by resetting all properties.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:28 +02:00
Christoph Hartmann
b6d812dda9 Merge pull request #12 from chef/test-structure
improve docker test runner structure
2015-09-22 02:17:28 +02:00
Christoph Hartmann
1bf94016a7 rename Command to Cmd 2015-09-22 02:17:28 +02:00
Christoph Hartmann
7b5bbc8a5f patch specinfra os detection 2015-09-22 02:17:28 +02:00
Christoph Hartmann
80f421e67e Merge pull request #11 from chef/concurrent-integrationtest
Concurrent integrationtest
2015-09-22 02:17:28 +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
Christoph Hartmann
43d49a348f bugfix: require specinfra backend 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
945dee74cc Merge pull request #10 from chef/oneget
add oneget resource
2015-09-22 02:17:27 +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
eb2e18b75d remove leftover includes
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-09-22 02:17:27 +02:00