packer-cn/post-processor/vagrant-cloud
nywilken 5a54c99e98 post-processor/vagrant-cloud: Update error handling for VagrantCloud API responses
This change updates the underlying type of VagrantCloudErrors.Errors to match the expected errors response type and adds a simple test to verify the parsing of various error responses.
Tests before change

```
--- FAIL: TestVagranCloudErrors (0.00s)
    client_test.go:23: failed to decode error response: json: cannot unmarshal array into Go struct field VagrantCloudErrors.errors of type map[string][]string
    client_test.go:23: failed to decode error response: json: cannot unmarshal array into Go struct field VagrantCloudErrors.errors of type map[string][]string
    client_test.go:26: failed to get expected response; expected "", got "error1. error2"
    client_test.go:23: failed to decode error response: json: cannot unmarshal array into Go struct field VagrantCloudErrors.errors of type map[string][]string
    client_test.go:26: failed to get expected response; expected "", got "message Bad credentials"

```

Test after change
```
--- PASS: TestVagranCloudErrors (0.00s)

```
2020-01-13 11:55:53 -05:00
..
artifact.go Expand Artifact API to expose build state 2014-09-22 11:15:47 +01:00
artifact_test.go run goimports 2018-01-22 17:21:10 -08:00
client.go post-processor/vagrant-cloud: Update error handling for VagrantCloud API responses 2020-01-13 11:55:53 -05:00
client_test.go post-processor/vagrant-cloud: Update error handling for VagrantCloud API responses 2020-01-13 11:55:53 -05:00
post-processor.go use pointer to config rather than config 2019-12-19 11:27:21 -08:00
post-processor.hcl2spec.go build using HCL2 (#8423) 2019-12-17 11:25:56 +01:00
post-processor_test.go post-processor/vagrant-cloud: fix dropped test errors 2019-11-15 11:44:33 +01:00
step_create_provider.go post-processor/vagrant-cloud: fix dropped errors 2019-09-26 09:23:09 -07:00
step_create_version.go use pointer to config rather than config 2019-12-19 11:27:21 -08:00
step_prepare_upload.go post-processor/vagrant-cloud: fix dropped errors 2019-09-26 09:23:09 -07:00
step_release_version.go use pointer to config rather than config 2019-12-19 11:27:21 -08:00
step_upload.go move retry code into the common/retry pkg and make retry context aware 2019-04-09 17:46:38 +02:00
step_verify_box.go use pointer to config rather than config 2019-12-19 11:27:21 -08:00