Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

r/opc_compute_image_list_entry: Fix resource imports #66

Merged
merged 1 commit into from
Aug 14, 2017

Conversation

grubernaut
Copy link
Contributor

Fixes opc_compute_image_list_entry imports. Previously, importing
an image list entry would panic if the resource ID was not specified with
the correct delimiter |. This adds protection for the panic in two places,
once during the Read, and once during the Import function.

Also updates documentation for importing image list entry resources,
and adds an acceptance test for importing image list entries.

$ make testacc TEST=./opc TESTARGS="-run=TestAccOPCImageListEntry_importBasic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./opc -v -run=TestAccOPCImageListEntry_importBasic -timeout 120m
=== RUN   TestAccOPCImageListEntry_importBasic
--- PASS: TestAccOPCImageListEntry_importBasic (15.28s)
PASS
ok      github.com/terraform-providers/terraform-provider-opc/opc       15.289s

Fixes: #26

Fixes `opc_compute_image_list_entry` imports. Previously, importing
an image list entry would panic if the resource ID was not specified with
the correct delimiter `|`. This adds protection for the panic in two places,
once during the Read, and once during the Import function.

Also updates documentation for importing image list entry resources,
and adds an acceptance test for importing image list entries.

```
$ make testacc TEST=./opc TESTARGS="-run=TestAccOPCImageListEntry_importBasic"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./opc -v -run=TestAccOPCImageListEntry_importBasic -timeout 120m
=== RUN   TestAccOPCImageListEntry_importBasic
--- PASS: TestAccOPCImageListEntry_importBasic (15.28s)
PASS
ok      github.com/terraform-providers/terraform-provider-opc/opc       15.289s
```
Copy link
Contributor

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@grubernaut grubernaut merged commit f22779a into master Aug 14, 2017
@grubernaut grubernaut deleted the b-catch-panic-image-list-entry-import branch August 14, 2017 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants