Test Kitchen: Purpose of 'platforms' Attribute


#1

What is the purpose of the platforms attribute in the .kitchen.yml file? Is this arbitrary, or does it have to match a platform value that a specific kitchen driver requires?

The only info I could find around this was from the docs.chef.io site:

platforms may define Chef server attributes that are common to the collection of test suites

Thanks in advance.


#2

Some drivers use the platform to decide with "Image" to load. For example, in dokken it is used for the docker image to load: https://hub.docker.com/u/dokken/ . If the driver you are using does not support this or you set the "Image" to use manually you can see it as purely cosmetic and descriptive parameter in for example kitchen status.


#3

Very specifically, kitchen requires at least ONE platform to exist under platforms because an instance, which is the permutation of each platform + suite, is the unit of manipulation in kitchen. That particular line from the docs is confusingly written but is likely because of how kitchen lets users set values like attributes on multiple top-levels objects.