vatesfr / terraform-provider-xenorchestra

Xen Orchestra provider for Terraform
MIT License
150 stars 33 forks source link

Prevent vm acceptance test failures from causing test suite flakiness #148

Closed ddelnano closed 3 years ago

ddelnano commented 3 years ago

The suite of acceptance tests has grown significantly since the project has started. The majority of these tests are for the vm resource, which is inherently slow since it requires creating and destroying VMs. One of the major pain points with the test suite is that every VM is created with the same name. When a given test fails, it can sometimes leaves a dangling VM. Since tests are run sequentially, this causes future VM tests to fail because the next test will think there are two matching resources and will return an error.

Instead these tests should create VMs with unique names so that an individual test failure has no impact on future tests.