postgres-operator/pkg/util
Jonathan Juares Beber 4b440e59de
Fix test flakiness on TestSameService (#833)
The code added on #818 depends on map sorting to return a static reason
for service annotation changes. To avoid tests flakiness and map sorting
the tests include a `strings.HasPrefix` instead of comparing the whole
string. One of the test cases,
`service_removes_a_custom_annotation,_adds_a_new_one_and_change_another`,
is trying to test the whole reason string.

This commit replaces the test case reason, for only the reason prefix.
It removes the flakiness from the tests. As all the cases (annotation
adding, removing and value changing) are tested before, it's safe to
test only prefixes.

Also, it renames the test name from `TestServiceAnnotations` to
`TestSameService` and introduces a better description in case of test
failure, describing that only prefixes are tested.
2020-02-18 16:45:44 +01:00
..
config Add region setting for logical backups to non-AWS storage (#813) 2020-02-10 11:48:24 +01:00
constants fix errors when changing service type (#716) 2019-11-26 10:28:32 +01:00
filesystems Fix golint warnings 2017-08-01 16:08:56 +02:00
k8sutil Fix test flakiness on TestSameService (#833) 2020-02-18 16:45:44 +01:00
patroni Handle IPv6 k8s pods in Patroni URLs (#671) 2019-09-30 10:14:27 +02:00
retryutil Fix golint failures 2019-01-08 13:04:48 +01:00
ringlog fix comments for ringlogger 2017-09-26 13:12:38 +02:00
teams extend docs and polish manifest examples (#762) 2019-12-12 17:55:41 +01:00
users reflect change in github url (#496) 2019-02-25 11:26:55 +01:00
volumes reflect change in github url (#496) 2019-02-25 11:26:55 +01:00
util.go Enforce minimum cpu and memory limits (#731) 2019-12-12 16:43:55 +01:00
util_test.go Enforce minimum cpu and memory limits (#731) 2019-12-12 16:43:55 +01:00