test-kitchen / kitchen-vra

A Test Kitchen driver for VMware vRealize Automation
Apache License 2.0
13 stars 22 forks source link

"kitchen destroy" should remove deployment from vRA #18

Closed bdiringer closed 5 years ago

bdiringer commented 7 years ago

Running "kitchen test" or "kitchen destroy" removes the machine that was created by "kitchen create". However, the deployment (which is the parent resource which contains the machine) still remains in vRA.

Since kitchen can only use deployments that contain a single machine, kitchen should make sure to destroy the deployment in addition to destroying the machine.

I think there's a couple of ways to address this:

Implement all of the logic to destroy the deployment in kitchen-vra and add a configuration option in the driver section of the .kitchen.yml file to toggle the behavior. OR Implement the logic in vmware-vra-gem and expose a parameter to kitchen-vra when it calls "destroy".

Or some other combination of the above suggestions.

Thoughts?

jjasghar commented 7 years ago

Implement the logic in vmware-vra-gem and expose a parameter to kitchen-vra when it calls "destroy".

This feels like the correct way to do it. Can you open an issue describing this in the vmware-vra-gem and reference this issue?

We can start mapping out what needs to happen off that issue too.

newatlantis commented 7 years ago

Does this issue still exist in the current version of the kitchen-vra gem (kitchen-vra-2.2.0)?

I think this is a bug -- the whole vRA deployment needs to be destroyed, not just the machine.

I would love to switch from kitchen-vro to kitchen-vra plugin (mainly in order to get our Test Kitchen requests logged onto the vRA Requests tab). But I can't see making that switch until this is issue is fixed.

stuartpreston commented 5 years ago

@newatlantis This issue is... old! I have retested today extensively whilst preparing for an update and the deployment is destroyed too. Tested against vRA 7.5. I will close this issue now.