summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@chef.io>2016-01-19 16:54:12 -0800
committerdanielsdeleo <dan@chef.io>2016-01-19 16:54:12 -0800
commit8bfa8ff825277d76cb3aca8777481a45a0ab0d77 (patch)
tree4f12543f8e4ad0496ed741670974bef662681d6e
parent5833691383fd6522a6f9e5da48735d62c0f76ffe (diff)
downloadchef-zero-8bfa8ff825277d76cb3aca8777481a45a0ab0d77.tar.gz
Enable pedant knife tests via ENV var
Setting `PEDANT_KNIFE_TESTS` will pass `--focus-knife` to pedant, running _only_ the knife tests. This will let us add them to the travis matrix without running them all the time (they are slow; take about the same time as the rest of the test suite).
-rw-r--r--spec/run_oc_pedant.rb22
1 files changed, 18 insertions, 4 deletions
diff --git a/spec/run_oc_pedant.rb b/spec/run_oc_pedant.rb
index c587530..e26cabb 100644
--- a/spec/run_oc_pedant.rb
+++ b/spec/run_oc_pedant.rb
@@ -94,9 +94,12 @@ begin
[]
end
- # "the goal is that only authorization, authentication and validation tests are turned off" - @jkeiser
- Pedant.setup([
- '--skip-knife',
+ # These things aren't supported by Chef Zero in any mode of operation:
+ default_skips = [
+ # "the goal is that only authorization, authentication and validation tests
+ # are turned off" - @jkeiser
+ #
+ # ...but we're not there yet
'--skip-keys',
'--skip-controls',
'--skip-acl',
@@ -129,7 +132,18 @@ begin
# The universe endpoint is unlikely to ever make sense for Chef Zero
'--skip-universe'
- ] + chef_fs_skips)
+ ]
+
+ # The knife tests are very slow and don't give us a lot of extra coverage,
+ # so we run them in a different entry in the travis test matrix.
+ pedant_args =
+ if ENV["PEDANT_KNIFE_TESTS"]
+ default_skips + %w{ --focus-knife }
+ else
+ default_skips + chef_fs_skips + %w{ --skip-knife }
+ end
+
+ Pedant.setup(pedant_args)
fail_fast = []
# fail_fast = ["--fail-fast"]