This is a pre-release version. The functionality described below may change
before the final version is released.
Test runner
Added a new command, `ltools test` and a corresponding `test` configuration
section. The test settings are as follows:
yaml
functions:
my_function:
test:
source: path to source folder containing tests
requirements:
requirements.txt file(s) to include with tests.
syntax is the same as for requirements section in build.
runner:
The test runner to use to run the tests.
Currently only unittest is supported.
ignore:
Files to ignore when copying tests into the bundle.
syntax is the same as for ignore section in build.
`bundle` setting
Before creating the zip package, the files are copied into a "bundle"
directory. In previous releases of lambda-tools, this was created in a
temporary, randomly-named directory generated by the system, and the user had no
control over where it was saved. As of version 0.2.0, you can now specify where
the bundle will be created:
yaml
functions:
my_function:
build:
bundle: build/bundle
`ltools clean` command
This will remove the bundle folder after running your tests.
Note: if you have not declared a `tests` section, the bundle folder will be
removed automatically after `ltools build` has completed. This preserves the
behaviour of version 0.1.
Version 0.0 configuration is no longer supported.
The initial configuration format from version 0.0 is no longer supported.
Additionally, the version number tag at the start of the configuration file
is now optional.