packer-cn/post-processor
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
..
2020-01-03 12:17:34 +08:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00
2019-12-17 11:25:56 +01:00