2

For example if my kitchen.yml contains these three suites (example is abbreviated):

suites:
  - name: dogs
  - name: cats
  - name: horse

I would like to be able to run:

kitchen converge -c 2 dogs cats

Is this possible?

thun
  • 478
  • 3
  • 12

1 Answers1

4

test-kitchen supports running multiple suites concurrently. You can use a regular expression "REGEXP" pattern to match on the suites you want to run.

$ kitchen help converge
  Usage:
    kitchen converge [INSTANCE|REGEXP|all]

  Options:
    -c, [--concurrency=N]                        # Run a converge against all matching instances concurrently. Only N instances will run at the same time if a number is given.
    -p, [--parallel], [--no-parallel]            # [Future DEPRECATION, use --concurrency] Run a converge against all matching instances concurrently.
    -t, [--test-base-path=TEST_BASE_PATH]        # Set the base path of the tests
    -l, [--log-level=LOG_LEVEL]                  # Set the log level (debug, info, warn, error, fatal)
        [--log-overwrite], [--no-log-overwrite]  # Set to false to prevent log overwriting each time Test Kitchen runs
        [--color], [--no-color]                  # Toggle color output for STDOUT logger

  Description:
    The instance states are in order: destroy, create, converge, setup, verify, destroy. Change one or more instances
    from the current state to the converge state. Actions for all intermediate states will be executed. See
    http://kitchen.ci for further explanation.

So you could use the following regex pattern to match on the "dogs" and "cats" suites and have kitchen run them. The "-c" option without a number following it will run all the suites that match the regex concurrently.

kitchen converge 'dogs|cats' -c

A "-p" option would also have the same behavior as "-c" without any number following it.

Hope that helps.