• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando / postgres-operator / 2380
44%

Build:
DEFAULT BRANCH: master
Ran 27 Jan 2020 01:48PM UTC
Jobs 1
Files 9
Run time 42s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jan 2020 01:43PM UTC coverage: 22.716%. Remained the same
2380

push

travis-ci

Jan-M
Change error computation on JSON Unmarshal and create subtests on table test scenarios (#801)

* 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.

276 of 1215 relevant lines covered (22.72%)

1.63 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2380.1 27 Jan 2020 01:48PM UTC 0
22.72
Travis Job 2380.1
Source Files on build 2380
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2380
  • fddaf0fb on github
  • Prev Build on master (#2354)
  • Next Build on master (#2398)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc