Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

At present the MettleCI automated unit test specification generator does not handle shared or local containers. The yaml specification it generates will have the inputs and outputs for the job modeled correctly but it will omit any inputs or outputs that are within containers. The unit test harness can handle containers, but we must modify the yaml by hand to include the inputs and outputs within containers. They go in the usual place (given: for inputs and then:for outputs) but with names that disambiguate the links and stages referenced.


A unit test specification’s input and output path names (csv file names) are formed from the stage and link names of the input/output being intercepted (stage-link.csv). For jobs that do not have containers, this is sufficient, but containers add potential ambiguity. This is resolved by dot prefixing the container name to the front to give container.stage-link.csv. In the case of nested containers the outer container is prepended in front of the inner, to as many levels as necessary. Container inputs and outputs themselves are not modeled or intercepted since they are really just connectors with no physically manifested input or output.

For example this container has a container input (not modeled) and 3 outputs

Here is a job using it

The resulting yaml looks like this

(get the job from the customer or maybe write a better container/ job that has easier to use names)

As can be seen the container outputs are present in the then: section

discard the below

  1. Spec generator does not currently support containers, you have to do the work by hand. It’s not hard but it is exacting.

  2. review what the automated test spec generation does, and how the path names are formed. (stage-link.csv)

  3. Shared containers add an extra name, the shared container itself, which is dot prefixed to the normal path name. This nests (as shared containers do). The names can be seen in a director log if sufficient detail (it is by default) is enabled.

  4. work the example the customer gave to add the outputs that are within the shared container.

  • No labels