mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-20 22:08:05 +02:00
switch to metav1.Duration for timeout options (#3121)
* switch to metav1.Duration for timeout options * fix custom config parsing and use safe coalesce
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"github.com/zalando/postgres-operator/pkg/util/k8sutil"
|
||||
"github.com/zalando/postgres-operator/pkg/util/patroni"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
func TestGetSwitchoverCandidate(t *testing.T) {
|
||||
@@ -28,8 +29,8 @@ func TestGetSwitchoverCandidate(t *testing.T) {
|
||||
var cluster = New(
|
||||
Config{
|
||||
OpConfig: config.Config{
|
||||
PatroniAPICheckInterval: time.Duration(1),
|
||||
PatroniAPICheckTimeout: time.Duration(5),
|
||||
PatroniAPICheckInterval: &metav1.Duration{Duration: 1 * time.Second},
|
||||
PatroniAPICheckTimeout: &metav1.Duration{Duration: 5 * time.Second},
|
||||
},
|
||||
}, k8sutil.KubernetesClient{}, acidv1.Postgresql{}, logger, eventRecorder)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user