cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #02095
[Merge] ~smoser/cloud-init:feature/ds-identify-test into cloud-init:master
The proposal to merge ~smoser/cloud-init:feature/ds-identify-test into cloud-init:master has been updated.
Commit Message changed to:
Add unit tests for ds-identify, fix Ec2 bug found.
This adds several unit tests for ds-identify, and fixes a bug
in Ec2 detection that I found while writing these tests.
The method of testing is to use the ds-identify code as a shell
library. The TestDsIdentify:call basically does:
* populate a (temp) directory with files that represent what
ds-identify would see in /sys or other locations it reads.
* create a file '_shwrap' that replaces the 3 programs that are executed
in ds-identify code path. It supports setting their stdout, stderr,
and exit code.
* set the default policies explicitly (DI_DEFAULT_POLICY) so we can
support testing different builtins. This is necessary because the
Ubuntu branches patch the builtin value. If we did not explicilty set
it, then testing there would fail.
* execute sh to source the script and call its main.
For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/323059
--
Your team cloud init development team is requested to review the proposed merge of ~smoser/cloud-init:feature/ds-identify-test into cloud-init:master.
References