Test
testLicense
Test the license of a project using reuse.
Types:
- testLicense:
- enable (
bool
): Optional. Defaults tofalse
.
- enable (
Example:
testPython
Test Python code with pytest.
Types:
- testPython (
attrsOf targetType
): Optional. Mapping of names to pytest targets. Defaults to{ }
. -
targetType (
submodule
):- python (
enum ["3.9" "3.10" "3.11" "3.12"]
): Python interpreter version that your package/module is designed for. - src (
str
): Path to the file or directory that contains the tests code. - searchPaths (
asIn makeSearchPaths
): Optional. Arguments here will be passed as-is tomakeSearchPaths
. Defaults tomakeSearchPaths
's defaults. - extraFlags (
listOf str
): Optional. Extra command line arguments to propagate to pytest. Defaults to[ ]
. - extraSrcs (
attrsOf package
): Optional. Place extra sources at the same level of your project code so you can reference them via relative paths.
The final test structure looks like this:
And we will run pytest like this:
Defaults to
{ }
. - python (
Example:
testTerraform
Test Terraform code
by performing a terraform plan
over the specified Terraform modules.
Types:
- testTerraform:
- modules (
attrsOf moduleType
): Optional. Path to Terraform modules to lint. Defaults to{ }
.
- modules (
- moduleType (
submodule
):- setup (
listOf package
): Optional. Makes Environment or Makes Secrets tosource
(as in Bash'ssource
) before anything else. Defaults to[ ]
. - src (
str
): Path to the Terraform module. - version (
enum [ "0.14" "0.15" "1.0" ]
): Terraform version your module is built with. - debug (
bool
): Optional. Enable maximum level of debugging and remove parallelism so logs are clean. Defaults tofalse
.
- setup (
Example: