Skip to content

Commit

Permalink
remove Deprecated StringPtr/Int32Ptr to String/Int32
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchangyan committed Dec 12, 2022
1 parent e942ada commit 1fa7225
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/apis/eventing/v1/broker_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ var (
APIVersion: "serving.knative.dev/v1",
},
},
Retry: pointer.Int32Ptr(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.StringPtr("exponential")),
BackoffDelay: pointer.StringPtr("5s"),
Retry: pointer.Int32(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.String("exponential")),
BackoffDelay: pointer.String("5s"),
},
},
},
Expand Down Expand Up @@ -531,7 +531,7 @@ func TestBrokerSetDefaults(t *testing.T) {
},
},
},
"no config, uses namespace broker class and config": {
"no config, uses namespace4's broker class and config": {
initial: Broker{
ObjectMeta: metav1.ObjectMeta{Namespace: "mynamespace4"},
},
Expand All @@ -558,14 +558,14 @@ func TestBrokerSetDefaults(t *testing.T) {
APIVersion: "serving.knative.dev/v1",
},
},
Retry: pointer.Int32Ptr(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.StringPtr("exponential")),
BackoffDelay: pointer.StringPtr("5s"),
Retry: pointer.Int32(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.String("exponential")),
BackoffDelay: pointer.String("5s"),
},
},
},
},
"no config, uses mynamespace2's broker class and corresponding config, cluster class": {
"no config, uses mynamespace5's broker class and corresponding config, cluster class": {
initial: Broker{
ObjectMeta: metav1.ObjectMeta{Namespace: "mynamespace5"},
},
Expand All @@ -587,7 +587,7 @@ func TestBrokerSetDefaults(t *testing.T) {
},
},
},
"no config, uses mynamespace3's broker class and corresponding config, cluster class": {
"no config, uses mynamespace6's broker class and corresponding config, cluster class": {
initial: Broker{
ObjectMeta: metav1.ObjectMeta{Namespace: "mynamespace6"},
},
Expand All @@ -614,9 +614,9 @@ func TestBrokerSetDefaults(t *testing.T) {
APIVersion: "serving.knative.dev/v1",
},
},
Retry: pointer.Int32Ptr(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.StringPtr("exponential")),
BackoffDelay: pointer.StringPtr("5s"),
Retry: pointer.Int32(5),
BackoffPolicy: (*eventingduckv1.BackoffPolicyType)(pointer.String("exponential")),
BackoffDelay: pointer.String("5s"),
},
},
},
Expand Down

0 comments on commit 1fa7225

Please sign in to comment.