| * Change error computation on JSON Unmarshall The [Unmarshall function][1] on the encoding/JSON default library returns different errors for different go versions. On Go 1.12, the version used currently on the CI system it returns `json: cannot unmarshal number into Go struct field PostgresSpec.teamId of type string`. On Go 1.13.5 it returns `json: cannot unmarshal number into Go struct field PostgresSpec.spec.teamId of type string`. The new version includes more details of the whole structure being unmarshelled. This commit introduces the same error but one level deeper on the JSON structure. It creates consistency across different Go versions. [1]: https://godoc.org/encoding/json#Unmarshal * Create subtests on table test scenarios The Run method of T allows defining subtests creating hierarchical tests. It provides better visibility of tests in case of failure. More details on https://golang.org/pkg/testing/. This commit converts each test scenario on pkg/apis/acid.zalan.do/v1/util_test.go to subtests, providing a better visibility and the debugging environment when working with tests. The following code snippet shows an error during test execution with subtests: ``` --- FAIL: TestUnmarshalMaintenanceWindow (0.00s) --- FAIL: TestUnmarshalMaintenanceWindow/expect_error_as_'From'_is_later_than_'To' (0.00s) ``` It included a `about` field on test scenarios describing the test purpose and/or it expected output. When a description was provided with comments it was moved to the about field. | ||
|---|---|---|
| .. | ||
| const.go | ||
| crds.go | ||
| doc.go | ||
| marshal.go | ||
| operator_configuration_type.go | ||
| postgresql_type.go | ||
| register.go | ||
| util.go | ||
| util_test.go | ||
| zz_generated.deepcopy.go | ||