test-kitchen
test-kitchen copied to clipboard
Provide a way to set default concurrency via .kitchen.yml
Description
Currently, in order to use concurrency > 1, you set it via -c option on the command line. I would like to have my concurrency default to a high number, but override it back to 1-2 in .kitchen.local.yml, in order to avoid over-loading the limited resources during local test runs, but have my more powerful integration testing server use many threads.
Currently, I'll just detect the situation and set -c via Makefile, but it seems like it would be a good thing to expose the concurrency setting via the config file anyway, to give users more options.
I imagine this working like:
.kitchen.yml:
#no concurrency setting
$ kitchen test
concurrency is 1 -- same as today
.kitchen.yml:
#no concurrency setting
$ kitchen test -c 999
concurrency is 999 -- same as today
.kitchen.yml:
concurrency: 10
$ kitchen test
concurrency is 10 -- new behavior (config file setting affects the concurrency default value, if not specified on commandline)
.kitchen.yml:
concurrency: 10
.kitchen.local.yml:
concurrency: 2
$ kitchen test
concurrency is 2 -- new behavior (kitchen.local.yml trumps .kitchen.yml)
.kitchen.yml:
concurrency: 10
.kitchen.local.yml:
concurrency: 2
$ kitchen test -c 999
concurrency is 999 -- new behavior (CLI trumps all)
Kitchen Version
Test Kitchen version 1.7.3
ChefDK Version
$ chef --version Chef Development Kit Version: 0.14.25 chef-client version: 12.10.24 berks version: 4.3.3 kitchen version: 1.7.3
FYI, this is an improvement request, if you can't tell :) Thanks much for the great product!
👍 i was looking for a way to do this as well
this coulld probably be resolved by #374
👍 This would be awesome.