-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check if volume backing store format is present before creating #569 #639
check if volume backing store format is present before creating #569 #639
Conversation
thx lot for PR ! I will have look once I have free time. Looks promising thx!! 😍 |
@cyril-s so looked at this pr. I think we can do a Here some pointers for you: and
let me know if you have any other question, and thx lot for fixing the issue. great job sofar |
@MalloZup so I was thinking how to implement acceptance tests for this and realized that currently there is no way to create lvm pool using this plugin. Which is clearly stated in the doc actually (and to which I didn't pay enough attention apparently). It's possible to implement testcase by creating pool without help of this plugin but it seems to me that PR that kind of fixes unsupported functionality is not very relevant. So it seems to me that this fix should go in PR which implements lvm pool support (that is something I'd like to help with). What do you think? |
Hi.! Sorry for delay. So I personally think we don't need to test. If we add 10 lines tests for 1 line I think we can accept your pr without mocking. I don't like mocking in general and a'so introducing interfaces or coding for mocking isn't good'. So feel free to remove the mock part and preserve the code without interfaces. Thx |
I'm saying this in context of the llvm pool, because if it is difficult to create all this isn't worth to have complex automation |
…icar#569 cover case when backing volume xml doesn't contain format element
7683f75
to
be29b79
Compare
Ok. Removed everything except fix itself |
@cyril-s great job, just in case. I assume you tested it manually? After that lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just waiting for manual tests confirmation before merging
Yes, and I've been using the plugin with this fix for a week. No problems so far |
@cyril-s thx for pr merging |
add test for NewDefBackingStoreFromLibvirtinterface StorageVol introduced to allow mockinglibvirt.StorageVol is mocked using github.com/golang/mockNewDefBackingStoreFromLibvirt now accepts StorageVol interface on inputI used github.com/golang/mock for mocking since it seemed to me as a better option rather than writing mocking implementations of interfaces like it's done in libvirt/libvirt_domain_mock_test.goCloses #569