Skip to content
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

resource/ovirt_disk_attachment: testAccCheckDiskAttachmentDestroy function won't work as expected #161

Closed
imjoey opened this issue Jul 11, 2019 · 0 comments · Fixed by #162
Assignees
Labels
bug Something isn't working tests

Comments

@imjoey
Copy link
Member

imjoey commented Jul 11, 2019

There are two bugs in current testAccCheckDiskAttachmentDestroy function:

  1. It's using rs.Primary.ID as the disk ID to fetch a disk through oVirt engine API. But in this case, the rs.Primary.ID is combined with vmID and diskID, in the format of df736600-b8be-4029-be98-4b0611be6be4:5bd12e84-025a-0171-03aa-0000000003d6, so the code logic will always treat this resource as already removed, regardless of whether it exists in reality.
  2. Actually, the destroy of a disk attachment indicates it has been detached from a VM and the relevant disk probably still exist in oVirt. While current code uses the result of the existence of the disk and it will surely be incorrect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests
Projects
None yet
1 participant