Conversation
a-dubs
left a comment
There was a problem hiding this comment.
could you add a super quick unit test to each lxd and qemu cloud unit test files?
| cloud.image_serial(image_id) | ||
|
|
||
| version = cloud.version() | ||
| assert isinstance(version, str) or version is None |
There was a problem hiding this comment.
| assert isinstance(version, str) or version is None | |
| assert isinstance(version, str) or version is None |
|
|
||
| def version(self) -> Optional[str]: | ||
| """Version string of the platform.""" | ||
| return None |
There was a problem hiding this comment.
Is there a lot of value in us returning None here instead of just an empty string ""? We can then avoid the Optional[str] handling for typing validation.
There was a problem hiding this comment.
I agree with chad. I don't think there is much benefit to returning a None instead of a falsey/empty string.
|
|
||
| return exceptions | ||
|
|
||
| def version(self): |
There was a problem hiding this comment.
@holmanb We should probably lru_cache this as it's unlikely to change mid integration test run, but it's something we don't want to recalculate any time we call it.
| exceptions.append(e) | ||
| return exceptions | ||
|
|
||
| def version(self): |
There was a problem hiding this comment.
Same, I'd cache this value somehow as it's unlikely to change on the host mid-test.
No description provided.