Skip to content

Commit

Permalink
replace pointer func calls with library function
Browse files Browse the repository at this point in the history
  • Loading branch information
Maliz committed Sep 13, 2022
1 parent 1e60674 commit 3f28286
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions control-plane/api/v1alpha1/servicedefaults_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestServiceDefaults_ToConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(20),
EnforcingConsecutive5xx: uint32Pointer(100),
EnforcingConsecutive5xx: pointer.Uint32(100),
},
MeshGateway: MeshGateway{
Mode: "local",
Expand All @@ -108,7 +108,7 @@ func TestServiceDefaults_ToConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: MeshGateway{
Mode: "remote",
Expand All @@ -132,7 +132,7 @@ func TestServiceDefaults_ToConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: MeshGateway{
Mode: "remote",
Expand Down Expand Up @@ -216,7 +216,7 @@ func TestServiceDefaults_ToConsul(t *testing.T) {
PassiveHealthCheck: &capi.PassiveHealthCheck{
Interval: 2 * time.Second,
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: capi.MeshGatewayConfig{
Mode: "remote",
Expand All @@ -238,7 +238,7 @@ func TestServiceDefaults_ToConsul(t *testing.T) {
PassiveHealthCheck: &capi.PassiveHealthCheck{
Interval: 2 * time.Second,
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: capi.MeshGatewayConfig{
Mode: "remote",
Expand Down Expand Up @@ -342,7 +342,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(20),
EnforcingConsecutive5xx: uint32Pointer(100),
EnforcingConsecutive5xx: pointer.Uint32(100),
},
MeshGateway: MeshGateway{
Mode: "local",
Expand All @@ -366,7 +366,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: MeshGateway{
Mode: "remote",
Expand All @@ -389,7 +389,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
Duration: 2 * time.Second,
},
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: MeshGateway{
Mode: "remote",
Expand Down Expand Up @@ -447,7 +447,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
PassiveHealthCheck: &capi.PassiveHealthCheck{
Interval: 2 * time.Second,
MaxFailures: uint32(20),
EnforcingConsecutive5xx: uint32Pointer(100),
EnforcingConsecutive5xx: pointer.Uint32(100),
},
MeshGateway: capi.MeshGatewayConfig{
Mode: "local",
Expand All @@ -469,7 +469,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
PassiveHealthCheck: &capi.PassiveHealthCheck{
Interval: 2 * time.Second,
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: capi.MeshGatewayConfig{
Mode: "remote",
Expand All @@ -490,7 +490,7 @@ func TestServiceDefaults_MatchesConsul(t *testing.T) {
PassiveHealthCheck: &capi.PassiveHealthCheck{
Interval: 2 * time.Second,
MaxFailures: uint32(10),
EnforcingConsecutive5xx: uint32Pointer(60),
EnforcingConsecutive5xx: pointer.Uint32(60),
},
MeshGateway: capi.MeshGatewayConfig{
Mode: "remote",
Expand Down Expand Up @@ -1039,7 +1039,3 @@ func TestServiceDefaults_ObjectMeta(t *testing.T) {
func intPointer(i int) *int {
return &i
}

func uint32Pointer(i uint32) *uint32 {
return &i
}

0 comments on commit 3f28286

Please sign in to comment.