5a54c99e98
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) ``` |
||
---|---|---|
.. | ||
artifact.go | ||
artifact_test.go | ||
client.go | ||
client_test.go | ||
post-processor.go | ||
post-processor.hcl2spec.go | ||
post-processor_test.go | ||
step_create_provider.go | ||
step_create_version.go | ||
step_prepare_upload.go | ||
step_release_version.go | ||
step_upload.go | ||
step_verify_box.go |