summaryrefslogtreecommitdiff
path: root/sysvinit/freebsd
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2017-02-10 22:08:03 -0500
committerScott Moser <smoser@brickies.net>2017-05-10 10:43:09 -0400
commit370a04e8d7b530c1ef8280e15eb628ff6880c736 (patch)
tree4c94b8064391ffde56ea908cd049a9c745440026 /sysvinit/freebsd
parent4f0f171c29bb9abb5cbb6f9adbe68015089aeed9 (diff)
downloadvyos-cloud-init-370a04e8d7b530c1ef8280e15eb628ff6880c736.tar.gz
vyos-cloud-init-370a04e8d7b530c1ef8280e15eb628ff6880c736.zip
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.
Diffstat (limited to 'sysvinit/freebsd')
0 files changed, 0 insertions, 0 deletions