Skip to content

Commit

Permalink
remove unused functions (#4824)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaikas authored Feb 1, 2021
1 parent 6edcbdd commit 39d7a9e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
19 changes: 0 additions & 19 deletions pkg/reconciler/testing/v1/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"context"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/eventing/pkg/apis/eventing"
v1 "knative.dev/eventing/pkg/apis/eventing/v1"
Expand Down Expand Up @@ -107,24 +106,6 @@ func WithBrokerReady(b *v1.Broker) {
b.Status = *v1.TestHelper.ReadyBrokerStatus()
}

func WithDeprecatedStatus(b *v1.Broker) {
dc := apis.Condition{
Type: "Deprecated",
Reason: "SingleTenantChannelBrokerDeprecated",
Status: corev1.ConditionTrue,
Severity: apis.ConditionSeverityWarning,
Message: "Single Tenant Channel Brokers are deprecated and will be removed in release 0.16. Use Multi Tenant Channel Brokers instead.",
}

for i, c := range b.Status.Status.Conditions {
if c.Type == dc.Type {
b.Status.Status.Conditions[i] = dc
return
}
}
b.Status.Status.Conditions = append(b.Status.Status.Conditions, dc)
}

// WithTriggerChannelFailed calls .Status.MarkTriggerChannelFailed on the Broker.
func WithTriggerChannelFailed(reason, msg string) BrokerOption {
return func(b *v1.Broker) {
Expand Down
19 changes: 0 additions & 19 deletions pkg/reconciler/testing/v1beta1/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"context"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/eventing/pkg/apis/eventing/v1beta1"
"knative.dev/eventing/pkg/client/injection/reconciler/eventing/v1beta1/broker"
Expand Down Expand Up @@ -106,24 +105,6 @@ func WithBrokerReady(b *v1beta1.Broker) {
b.Status = *v1beta1.TestHelper.ReadyBrokerStatus()
}

func WithDeprecatedStatus(b *v1beta1.Broker) {
dc := apis.Condition{
Type: "Deprecated",
Reason: "SingleTenantChannelBrokerDeprecated",
Status: corev1.ConditionTrue,
Severity: apis.ConditionSeverityWarning,
Message: "Single Tenant Channel Brokers are deprecated and will be removed in release 0.16. Use Multi Tenant Channel Brokers instead.",
}

for i, c := range b.Status.Status.Conditions {
if c.Type == dc.Type {
b.Status.Status.Conditions[i] = dc
return
}
}
b.Status.Status.Conditions = append(b.Status.Status.Conditions, dc)
}

// WithTriggerChannelFailed calls .Status.MarkTriggerChannelFailed on the Broker.
func WithTriggerChannelFailed(reason, msg string) BrokerOption {
return func(b *v1beta1.Broker) {
Expand Down

0 comments on commit 39d7a9e

Please sign in to comment.