Closed t0mk closed 2 years ago
Let's see what happens in the CI test runs, I'm curious.
One relevant failure:
=== RUN TestAccMetalDevice_importBasic
2021/09/10 13:48:52 [DEBUG] POST https://api.equinix.com/metal/v1/projects
2021/09/10 13:48:52 [DEBUG] GET https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272
2021/09/10 13:48:53 [DEBUG] GET https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272/bgp-config
2021/09/10 13:48:53 [DEBUG] POST https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272/devices
2021/09/10 13:49:05 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:09 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:15 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:26 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:36 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:46 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:49:57 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:07 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:17 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:27 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:37 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:48 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:50:58 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:51:09 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:51:19 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:51:29 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:51:39 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cfacility
2021/09/10 13:51:40 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cmetro%2Cfacility%2Chardware_reservation
2021/09/10 13:51:41 [DEBUG] GET https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272
2021/09/10 13:51:41 [DEBUG] GET https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272/bgp-config
2021/09/10 13:51:41 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cmetro%2Cfacility%2Chardware_reservation
2021/09/10 13:51:42 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=project%2Cmetro%2Cfacility%2Chardware_reservation
resource_metal_device_test.go:445: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
(map[string]string) (len=1) {
(string) (len=16) "termination_time": (string) ""
}
(map[string]string) (len=1) {
(string) (len=16) "termination_time": (string) (len=20) "2021-09-10T14:48:50Z"
}
2021/09/10 13:51:42 [DEBUG] DELETE https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba
2021/09/10 13:51:45 [DEBUG] DELETE https://api.equinix.com/metal/v1/projects/62857f08-deab-496a-a0a4-8eaaf40b4272
2021/09/10 13:51:45 [DEBUG] GET https://api.equinix.com/metal/v1/devices/b442e7b8-6a53-4d22-855c-2e416c81a5ba?include=facility
--- FAIL: TestAccMetalDevice_importBasic (174.69s)
@displague thanks for pointing it out, I should have sanitize the import better. I'll take a look later today.
@displague I had to remove the termination_time
from the import test. There's no way it can be imported, it's not present in the API resource.
PR transferred to https://github.com/equinix/terraform-provider-equinix/pull/204
This PR adds termination_time to all the relevant metal_device resources in provider acceptance tests. Fixes equinix/terraform-provider-equinix#166
Signed-off-by: Tomas Karasek tom.to.the.k@gmail.com