diff --git a/pkg/health/condition/builder_test.go b/pkg/health/condition/builder_test.go index 5918b2720..301bb9778 100644 --- a/pkg/health/condition/builder_test.go +++ b/pkg/health/condition/builder_test.go @@ -170,3 +170,26 @@ var _ = Describe("Builder", func() { }) }) }) + +type result struct { + ConType druidv1alpha1.ConditionType + ConStatus druidv1alpha1.ConditionStatus + ConReason string + ConMessage string +} + +func (r *result) ConditionType() druidv1alpha1.ConditionType { + return r.ConType +} + +func (r *result) Status() druidv1alpha1.ConditionStatus { + return r.ConStatus +} + +func (r *result) Reason() string { + return r.ConReason +} + +func (r *result) Message() string { + return r.ConMessage +} diff --git a/pkg/health/condition/check_ready.go b/pkg/health/condition/check_ready.go index 7453f610e..70a89661f 100644 --- a/pkg/health/condition/check_ready.go +++ b/pkg/health/condition/check_ready.go @@ -44,7 +44,7 @@ func (r *readyCheck) Check(status druidv1alpha1.EtcdStatus) Result { conType: druidv1alpha1.ConditionTypeReady, status: druidv1alpha1.ConditionFalse, reason: "QuorumLost", - message: "The majority of ETCD nodes are not ready", + message: "The majority of ETCD members is not ready", } } @@ -52,7 +52,7 @@ func (r *readyCheck) Check(status druidv1alpha1.EtcdStatus) Result { conType: druidv1alpha1.ConditionTypeReady, status: druidv1alpha1.ConditionTrue, reason: "Quorate", - message: "The majority of ETCD nodes is ready", + message: "The majority of ETCD members is ready", } } diff --git a/pkg/health/condition/condition_suite_test.go b/pkg/health/condition/condition_suite_test.go index b38480bb8..1624b2472 100644 --- a/pkg/health/condition/condition_suite_test.go +++ b/pkg/health/condition/condition_suite_test.go @@ -19,34 +19,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - - druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1" ) func TestCondition(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Condition Suite") } - -type result struct { - ConType druidv1alpha1.ConditionType - ConStatus druidv1alpha1.ConditionStatus - ConReason string - ConMessage string -} - -func (r *result) ConditionType() druidv1alpha1.ConditionType { - return r.ConType -} - -func (r *result) Status() druidv1alpha1.ConditionStatus { - return r.ConStatus -} - -func (r *result) Reason() string { - return r.ConReason -} - -func (r *result) Message() string { - return r.ConMessage -} diff --git a/pkg/health/etcdmember/builder_test.go b/pkg/health/etcdmember/builder_test.go index f1656431c..9a5bb3846 100644 --- a/pkg/health/etcdmember/builder_test.go +++ b/pkg/health/etcdmember/builder_test.go @@ -135,3 +135,21 @@ var _ = Describe("Builder", func() { }) }) }) + +type result struct { + MemberID string + MemberStatus druidv1alpha1.EtcdMemberConditionStatus + MemberReason string +} + +func (r *result) ID() string { + return r.MemberID +} + +func (r *result) Reason() string { + return r.MemberReason +} + +func (r *result) Status() druidv1alpha1.EtcdMemberConditionStatus { + return r.MemberStatus +} diff --git a/pkg/health/etcdmember/etcdmember_suite_test.go b/pkg/health/etcdmember/etcdmember_suite_test.go index 779118980..02df6ef0c 100644 --- a/pkg/health/etcdmember/etcdmember_suite_test.go +++ b/pkg/health/etcdmember/etcdmember_suite_test.go @@ -19,29 +19,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - - druidv1alpha1 "github.com/gardener/etcd-druid/api/v1alpha1" ) func TestEtcdMember(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Etcd Member Suite") } - -type result struct { - MemberID string - MemberStatus druidv1alpha1.EtcdMemberConditionStatus - MemberReason string -} - -func (r *result) ID() string { - return r.MemberID -} - -func (r *result) Reason() string { - return r.MemberReason -} - -func (r *result) Status() druidv1alpha1.EtcdMemberConditionStatus { - return r.MemberStatus -}