/srv/irclogs.ubuntu.com/2020/10/07/#cloud-init.txt

amansi26blackboxsw: Is it mandatory to add test cases when we add a new module ?14:30
Odd_Blokeamansi26: If by "test cases" you mean unit testing, yes.14:32
amansi26Odd_Bloke: Is it possible that we can contribute the unit tests for the Power specific modules after sometime and modules can go in now. It will be very helpful for us14:36
amansi26we found UTs for some modules at https://github.com/canonical/cloud-init/tree/master/cloudinit/config/tests and for some other modules at https://github.com/canonical/cloud-init/tree/master/tests/unittests/test_handler, we found some modules don't have unit tests associated with them.14:37
amansi26If it will be possible to contribute the UTs once modules gets in the cloud init14:38
Odd_Blokeamansi26: Right, it wasn't the case that unit tests were required when those modules were added, but it is now required.14:39
amansi26Odd_Bloke: Ok.. I can understand that. But as there is very short runway ahead for us. I would request for an exception here and I will make sure I will contribute the UTs as soon as possible .14:42
amansi26Odd_Bloke: In one of my module I am searching for platform value under '/run/cloud-init/instance-data.json' . As this is generated by cloud init. Is there any other way I can access the content of this file?17:04
Odd_Blokeamansi26: Sorry, have been in meetings all morning.  cloud-init's codebase is used across many distros and cloud platforms and runs on almost every boot in clouds: it's not appropriate for us to allow untested code into our codebase without very good reason, and an internal deadline for you does not meet that criteria, I'm afraid.  Our unit testing requirements are clearly laid out in the code review17:04
Odd_Blokeprocess documentation (https://cloudinit.readthedocs.io/en/latest/topics/code_review.html#prerequisites-for-landing-pull-requests).17:04
Odd_BlokeAnd while there is room for discretion by committers, that is really intended for one-line or minor changes to existing parts of the codebase without testing: we don't want to reject bugfixes because of a lack of test coverage.17:06
Odd_BlokeFor entirely new code, there's no compelling reason to not have it unit tested from day one.17:07
Odd_Blokeamansi26: As for that specific question, let me take a look around the code and come back to you.17:08
Odd_Blokeamansi26: I've responded with what I found in the comment thread: https://github.com/canonical/cloud-init/pull/584/files#r501191971 :)17:36
amansi26Odd_Bloke: Thanks. I will a look to it17:41
=== powersj_ is now known as powersj

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!