Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-01-29 | Replace mock library with unittest.mock (#186) | Daniel Watkins | |
* cloudinit: replace "import mock" with "from unittest import mock" * test-requirements.txt: drop mock Co-authored-by: Chad Smith <chad.smith@canonical.com> | |||
2018-12-03 | dhclient-hook: cleanups, tests and fix a bug on 'down' event. | Scott Moser | |
I noticed a bug in dhclient_hook on the 'down' event, using 'is' operator rather than '==' (if self.net_action is 'down'). This refactors/simplifies the code a bit for easier testing and adds tests. The reason for the rename of 'action' to 'event' is to just be internally consistent. The word and Namespace 'action' is used by cloud-init main, so it was not really usable here. Also adds a main which can easily be debugged with: CI_DHCP_HOOK_DATA_D=./my.d python -m cloudinit.dhclient_hook up eth0 |