Skip to content

Commit

Permalink
NE-1183: Rename unit tests for specific functions
Browse files Browse the repository at this point in the history
For each unit test "TestFoo" that specifically tests a function name "Foo"
or "foo", rename "TestFoo" to "Test_Foo" or "Test_foo", respectively.

* pkg/dns/alibaba/dns_test.go (TestGetRR): Rename from this...
(Test_getRR): ...to this.
(TestParseZone): Rename from this...
(Test_parseZone): ...to this.
* pkg/dns/alibaba/util/numbers_test.go (TestClamp): Rename from this...
(Test_Clamp): ...to this.
* pkg/dns/aws/dns_test.go (TestZoneMatchesTags): Rename from this...
(Test_zoneMatchesTags): ...to this.
(TestZoneIDFromResource): Rename from this...
(Test_zoneIDFromResource): ...to this.
* pkg/dns/azure/dns_test.go (TestEnsureDNS): Rename from this...
(Test_Ensure): ...to this.
(TestDeleteDNS): Rename from this...
(Test_Delete): ...to this.
* pkg/dns/ibm/private/dnssvcs_provider_test.go (TestDelete): Rename from
this...
(Test_Delete): ...to this.
(TestCreateOrUpdate): Rename from this...
(Test_createOrUpdateDNSRecord): ...to this.
* pkg/dns/ibm/public/cis_provider_test.go (TestDelete): Rename from this...
(Test_Delete): ...to this.
(TestCreateOrUpdate): Rename from this...
(Test_createOrUpdateDNSRecord): ...to this.
* pkg/operator/controller/canary/controller_test.go
(TestCycleServicePort): Rename from this...
(Test_cycleServicePort): ...to this.
* pkg/operator/controller/canary/daemonset_test.go
(TestDesiredCanaryService): Rename from this...
(Test_desiredCanaryService): ...to this.
* pkg/operator/controller/canary/namespace_test.go
(TestCanaryNamespaceChanged): Rename from this...
(Test_canaryNamespaceChanged): ...to this.
* pkg/operator/controller/canary/route_test.go (TestDesiredCanaryRoute):
Rename from this...
(Test_desiredCanaryRoute): ...to this.
(TestCanaryRouteChanged): Rename from this...
(Test_canaryRouteChanged): ...to this.
* pkg/operator/controller/canary/service_test.go
(TestDesiredCanaryService): Rename from this...
(Test_desiredCanaryService): ...to this.
* pkg/operator/controller/certificate-publisher/publish_certs_test.go
(TestDesiredRouterCertsGlobalSecret): Rename from this...
(Test_desiredRouterCertsGlobalSecret): ...to this.
* pkg/operator/controller/certificate/default_cert_test.go
(TestDesiredRouterDefaultCertificateSecret): Rename from this...
(Test_desiredRouterDefaultCertificateSecret): ...to this.
* pkg/operator/controller/dns/controller_test.go
(TestPublishRecordToZones): Rename from this...
(Test_publishRecordToZones): ...to this.
(TestMigrateDNSRecordStatus): Rename from this...
(Test_migrateRecordStatusConditions): ...to this.
(TestDnsZoneStatusSlicesEqual): Rename from this...
(Test_dnsZoneStatusSlicesEqual): ...to this.
(TestRecordIsAlreadyPublishedToZone): Rename from this...
(Test_recordIsAlreadyPublishedToZone): ...to this.
(TestCustomCABundle): Rename from this...
(Test_customCABundle): ...to this.
* pkg/operator/controller/ingress/controller_test.go
(TestSetDefaultDomain): Rename from this...
(Test_setDefaultDomain): ...to this.
(TestTLSProfileSpecForSecurityProfile): Rename from this...
(Test_tlsProfileSpecForSecurityProfile): ...to this.
(TestTLSProfileSpecForIngressController): Rename from this...
(Test_tlsProfileSpecForIngressController): ...to this.
(TestValidateHTTPHeaderBufferValues): Rename from this...
(Test_validateHTTPHeaderBufferValues): ...to this.
(TestValidateClientTLS): Rename from this...
(Test_validateClientTLS): ...to this.
(TestIsProxyProtocolNeeded): Rename from this...
(Test_IsProxyProtocolNeeded): ...to this.
* pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeployment): Rename from this...
(Test_desiredRouterDeployment): ...to this.
(TestInferTLSProfileSpecFromDeployment): Rename from this...
(Test_inferTLSProfileSpecFromDeployment): ...to this.
(TestDeploymentConfigChanged): Rename from this...
(Test_deploymentConfigChanged): ...to this.
(TestDurationToHAProxyTimespec): Rename from this...
(Test_durationToHAProxyTimespec): ...to this.
(TestCapReloadIntervalValue): Rename from this...
(Test_capReloadIntervalValue): ...to this.
(TestGetMIMETypes): Rename from this...
(Test_GetMIMETypes): ...to this.
* pkg/operator/controller/ingress/dns_test.go
(TestDesiredWildcardDNSRecord): Rename from this...
(Test_desiredWildcardDNSRecord): ...to this.
(TestManageDNSForDomain): Rename from this...
(Test_manageDNSForDomain): ...to this.
* pkg/operator/controller/ingress/load_balancer_service_test.go
(TestDesiredLoadBalancerService): Rename from this...
(Test_desiredLoadBalancerService): ... to this.
(TestShouldUseLocalWithFallback): Rename from this...
(Test_shouldUseLocalWithFallback): ...to this.
(TestLoadBalancerServiceChanged): Rename from this...
(Test_loadBalancerServiceChanged): ...to this.
(TestLoadBalancerServiceAnnotationsChanged): Rename from this...
(Test_loadBalancerServiceAnnotationsChanged): ...to this.
(TestServiceIngressOwner): Rename from this...
(Test_isServiceOwnedByIngressController): ... to this.
* pkg/operator/controller/ingress/metrics_test.go
(TestDeleteIngressControllerConditionsMetric): Rename from this...
(Test_DeleteIngressControllerConditionsMetric): ...to this.
(TestIngressControllerNLBMetric): Rename from this...
(Test_SetIngressControllerNLBMetric): ...to this.
* pkg/operator/controller/ingress/monitoring_test.go
(TestServiceMonitorChanged): Rename from this...
(Test_serviceMonitorChanged): ...to this.
* pkg/operator/controller/ingress/namespace_test.go
(TestRouterNamespaceChanged): Rename from this...
(Test_routerNamespaceChanged): ...to this.
* pkg/operator/controller/ingress/nodeport_service_test.go
(TestDesiredNodePortService): Rename from this...
(Test_desiredNodePortService): ...to this.
(TestNodePortServiceChanged): Rename from this...
(Test_nodePortServiceChanged): ...to this.
* pkg/operator/controller/ingress/poddisruptionbudget_test.go
(TestDesiredPodDisruptionBudget): Rename from this...
(Test_desiredRouterPodDisruptionBudget): ...to this.
* pkg/operator/controller/ingress/status_test.go
(TestComputePodsScheduledCondition): Rename from this...
(Test_computeDeploymentPodsScheduledCondition): ...to this.
(TestComputeIngressDegradedCondition): Rename from this...
(Test_computeIngressDegradedCondition): ...to this.
(TestComputeDeploymentRollingOutCondition): Rename from this...
(Test_computeDeploymentRollingOutCondition): ...to this.
(TestComputeLoadBalancerProgressingStatus): Rename from this...
(Test_computeLoadBalancerProgressingStatus): ...to this.
(TestComputeDeploymentAvailableCondition): Rename from this...
(Test_computeDeploymentAvailableCondition): ...to this.
(TestComputeDeploymentReplicasMinAvailableCondition): Rename from this...
(Test_computeDeploymentReplicasMinAvailableCondition): ...to this.
(TestComputeDeploymentReplicasAllAvailableCondition): Rename from this...
(Test_computeDeploymentReplicasAllAvailableCondition): ...to this.
(TestComputeLoadBalancerStatus): Rename from this...
(Test_computeLoadBalancerStatus): ...to this.
(TestComputeIngressProgressingCondition): Rename from this...
(Test_computeIngressProgressingCondition): ...to this.
(TestComputeIngressAvailableCondition): Rename from this...
(Test_computeIngressAvailableCondition): ...to this.
(TestIngressStatusesEqual): Rename from this...
(Test_ingressStatusesEqual): ...to this.
(TestComputeDNSStatus): Rename from this...
(Test_computeDNSStatus): ...to this.
(TestMergeConditions): Rename from this...
(Test_MergeConditions): ...to this.
(TestZoneInConfig): Rename from this...
(Test_checkZoneInConfig): ...to this.
(TestComputeIngressUpgradeableCondition): Rename from this...
(Test_computeIngressUpgradeableCondition): ...to this.
(TestComputeIngressEvaluationConditionsDetectedCondition): Rename from
this...
(Test_computeIngressEvaluationConditionsDetectedCondition): ...to this.
* pkg/operator/controller/ingressclass/ingressclass_test.go
(TestDesiredIngressClass): Rename from this...
(Test_desiredIngressClass): ...to this.
(TestIngressClassChanged): Rename from this...
(Test_ingressClassChanged): ...to this.
* pkg/operator/controller/status/controller_test.go
(TestComputeOperatorProgressingCondition): Rename from this...
(Test_computeOperatorProgressingCondition): ...to this.
(TestOperatorStatusesEqual): Rename from this...
(Test_operatorStatusesEqual): ...to this.
(TestComputeOperatorStatusVersions): Rename from this...
(Test_computeOperatorStatusVersions): ...to this.
(TestComputeOperatorUpgradeableCondition): Rename from this...
(Test_computeOperatorUpgradeableCondition): ...to this.
* pkg/operator/controller/sync-http-error-code-configmap/controller_test.go
(TestDesiredHttpErrorCodeConfigMap): Rename from this...
(Test_desiredHttpErrorCodeConfigMap): ...to this.
* pkg/util/aws/shared_credentials_file_test.go
(TestSharedCredentialsFileFromSecret): Rename from this...
(Test_SharedCredentialsFileFromSecret): ...to this.
* pkg/util/hash_test.go (TestHash): Rename from this...
(Test_Hash): ...to this.
* pkg/util/network_test.go (TestURI): Rename from this...
(Test_URI): ...to this.
  • Loading branch information
Miciah authored and gcs278 committed Feb 22, 2023
1 parent ed7b2cc commit 4614f29
Show file tree
Hide file tree
Showing 30 changed files with 89 additions and 88 deletions.
4 changes: 2 additions & 2 deletions pkg/dns/alibaba/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func newFakeProvider(public, private Service) dns.Provider {
}
}

func TestGetRR(t *testing.T) {
func Test_getRR(t *testing.T) {
cases := []struct {
dnsName string
domainName string
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestGetRR(t *testing.T) {
}
}

func TestParseZone(t *testing.T) {
func Test_parseZone(t *testing.T) {
cases := []struct {
id string
tags map[string]string
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/alibaba/util/numbers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
)

func TestClamp(t *testing.T) {
func Test_Clamp(t *testing.T) {
cases := []struct {
val int64
min int64
Expand Down
4 changes: 2 additions & 2 deletions pkg/dns/aws/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
configv1 "github.com/openshift/api/config/v1"
)

func TestZoneMatchesTags(t *testing.T) {
func Test_zoneMatchesTags(t *testing.T) {
cases := []struct {
name string
tagsForZone map[string]string
Expand Down Expand Up @@ -90,7 +90,7 @@ func TestZoneMatchesTags(t *testing.T) {
}
}

func TestZoneIDFromResource(t *testing.T) {
func Test_zoneIDFromResource(t *testing.T) {
cases := []struct {
resource string
expectedZoneID string
Expand Down
4 changes: 2 additions & 2 deletions pkg/dns/azure/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func fakeManager(fc *client.FakeDNSClient) (dns.Provider, error) {
return mgr, nil
}

func TestEnsureDNS(t *testing.T) {
func Test_Ensure(t *testing.T) {
c := client.Config{}
fc, _ := client.NewFake(c)
mgr, err := fakeManager(fc)
Expand Down Expand Up @@ -58,7 +58,7 @@ func TestEnsureDNS(t *testing.T) {
}
}

func TestDeleteDNS(t *testing.T) {
func Test_Delete(t *testing.T) {
c := client.Config{}
fc, err := client.NewFake(c)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions pkg/dns/ibm/private/dnssvcs_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert"
)

func TestDelete(t *testing.T) {
func Test_Delete(t *testing.T) {
zone := configv1.DNSZone{
ID: "zoneID",
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestDelete(t *testing.T) {
}
}

func TestCreateOrUpdate(t *testing.T) {
func Test_createOrUpdateDNSRecord(t *testing.T) {
zone := configv1.DNSZone{
ID: "zoneID",
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/dns/ibm/public/cis_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
dnsclient "github.com/openshift/cluster-ingress-operator/pkg/dns/ibm/public/client"
)

func TestDelete(t *testing.T) {
func Test_Delete(t *testing.T) {
zone := configv1.DNSZone{
ID: "zoneID",
}
Expand Down Expand Up @@ -150,7 +150,7 @@ func TestDelete(t *testing.T) {
}
}

func TestCreateOrUpdate(t *testing.T) {
func Test_createOrUpdateDNSRecord(t *testing.T) {
zone := configv1.DNSZone{
ID: "zoneID",
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/controller/canary/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)

func TestCycleServicePort(t *testing.T) {
func Test_cycleServicePort(t *testing.T) {
tPort1 := intstr.IntOrString{
StrVal: "80",
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/controller/canary/daemonset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestDesiredCanaryDaemonSet(t *testing.T) {
func Test_desiredCanaryDaemonSet(t *testing.T) {
// canaryImageName is the ingress-operator image
canaryImageName := "openshift/origin-cluster-ingress-operator:latest"
daemonset := desiredCanaryDaemonSet(canaryImageName)
Expand Down Expand Up @@ -86,7 +86,7 @@ func TestDesiredCanaryDaemonSet(t *testing.T) {
}
}

func TestCanaryDaemonsetChanged(t *testing.T) {
func Test_canaryDaemonsetChanged(t *testing.T) {
testCases := []struct {
description string
mutate func(*appsv1.DaemonSet)
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/controller/canary/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
projectv1 "github.com/openshift/api/project/v1"
)

func TestCanaryNamespaceChanged(t *testing.T) {
func Test_canaryNamespaceChanged(t *testing.T) {
testCases := []struct {
description string
mutate func(*corev1.Namespace)
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/controller/canary/route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)

func TestDesiredCanaryRoute(t *testing.T) {
func Test_desiredCanaryRoute(t *testing.T) {
daemonsetRef := metav1.OwnerReference{
Name: "test",
}
Expand Down Expand Up @@ -85,7 +85,7 @@ func TestDesiredCanaryRoute(t *testing.T) {
}
}

func TestCanaryRouteChanged(t *testing.T) {
func Test_canaryRouteChanged(t *testing.T) {
testCases := []struct {
description string
mutate func(*routev1.Route)
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/controller/canary/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"k8s.io/apimachinery/pkg/types"
)

func TestDesiredCanaryService(t *testing.T) {
func Test_desiredCanaryService(t *testing.T) {
daemonsetRef := metav1.OwnerReference{
Name: "test",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func newIngressController(name, defaultCertificateSecretName, domain string, adm
return ingresscontroller
}

// TestDesiredRouterCertsGlobalSecret verifies that we get the expected global
// Test_desiredRouterCertsGlobalSecret verifies that we get the expected global
// secret for the default ingresscontroller and for various combinations of
// ingresscontrollers and default certificate secrets.
func TestDesiredRouterCertsGlobalSecret(t *testing.T) {
func Test_desiredRouterCertsGlobalSecret(t *testing.T) {
type testInputs struct {
ingresses []operatorv1.IngressController
secrets []corev1.Secret
Expand Down
2 changes: 1 addition & 1 deletion pkg/operator/controller/certificate/default_cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ u3YLAbyW/lHhOCiZu2iAI8AbmXem9lW6Tr7p/97s0w==
`
)

func TestDesiredRouterDefaultCertificateSecret(t *testing.T) {
func Test_desiredRouterDefaultCertificateSecret(t *testing.T) {
ca, err := crypto.GetCAFromBytes([]byte(cert), []byte(key))
if err != nil {
t.Fatalf("failed to create CA")
Expand Down
10 changes: 5 additions & 5 deletions pkg/operator/controller/dns/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)

func TestPublishRecordToZones(t *testing.T) {
func Test_publishRecordToZones(t *testing.T) {
tests := []struct {
name string
zones []configv1.DNSZone
Expand Down Expand Up @@ -225,7 +225,7 @@ func TestPublishRecordToZonesMergesStatus(t *testing.T) {
}
}

func TestMigrateDNSRecordStatus(t *testing.T) {
func Test_migrateRecordStatusConditions(t *testing.T) {
tests := []struct {
name string
conditions []iov1.DNSZoneCondition
Expand Down Expand Up @@ -361,7 +361,7 @@ func TestMigrateDNSRecordStatus(t *testing.T) {
}
}

func TestDnsZoneStatusSlicesEqual(t *testing.T) {
func Test_dnsZoneStatusSlicesEqual(t *testing.T) {
testCases := []struct {
description string
expected bool
Expand Down Expand Up @@ -617,7 +617,7 @@ func TestDnsZoneStatusSlicesEqual(t *testing.T) {
}
}

func TestRecordIsAlreadyPublishedToZone(t *testing.T) {
func Test_recordIsAlreadyPublishedToZone(t *testing.T) {
var (
zoneWithId = configv1.DNSZone{ID: "foo"}
zoneWithTag = configv1.DNSZone{Tags: map[string]string{"foo": "bar"}}
Expand Down Expand Up @@ -772,7 +772,7 @@ func TestRecordIsAlreadyPublishedToZone(t *testing.T) {
}
}

func TestCustomCABundle(t *testing.T) {
func Test_customCABundle(t *testing.T) {
cases := []struct {
name string
cm *corev1.ConfigMap
Expand Down
16 changes: 8 additions & 8 deletions pkg/operator/controller/ingress/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// TestSetDefaultDomain verifies that setDefaultDomain behaves correctly.
func TestSetDefaultDomain(t *testing.T) {
// Test_setDefaultDomain verifies that setDefaultDomain behaves correctly.
func Test_setDefaultDomain(t *testing.T) {
ingressConfig := &configv1.Ingress{
Spec: configv1.IngressSpec{
Domain: "apps.mycluster.com",
Expand Down Expand Up @@ -854,7 +854,7 @@ func TestSetDefaultPublishingStrategyHandlesUpdates(t *testing.T) {
}
}

func TestTLSProfileSpecForSecurityProfile(t *testing.T) {
func Test_tlsProfileSpecForSecurityProfile(t *testing.T) {
invalidTLSVersion := configv1.TLSProtocolVersion("abc")
invalidCiphers := []string{"ECDHE-ECDSA-AES256-GCM-SHA384", "invalid cipher"}
validCiphers := []string{"ECDHE-ECDSA-AES256-GCM-SHA384"}
Expand Down Expand Up @@ -1016,7 +1016,7 @@ func TestTLSProfileSpecForSecurityProfile(t *testing.T) {
}
}

func TestTLSProfileSpecForIngressController(t *testing.T) {
func Test_tlsProfileSpecForIngressController(t *testing.T) {
testCases := []struct {
description string
icProfile *configv1.TLSSecurityProfile
Expand Down Expand Up @@ -1160,7 +1160,7 @@ func TestTLSProfileSpecForIngressController(t *testing.T) {
}
}

func TestValidateHTTPHeaderBufferValues(t *testing.T) {
func Test_validateHTTPHeaderBufferValues(t *testing.T) {
testCases := []struct {
description string
tuningOptions operatorv1.IngressControllerTuningOptions
Expand Down Expand Up @@ -1219,7 +1219,7 @@ func TestValidateHTTPHeaderBufferValues(t *testing.T) {

// TestValidateClientTLS verifies the validateClientTLS accepts PCRE-compliant
// patterns and rejects invalid patterns.
func TestValidateClientTLS(t *testing.T) {
func Test_validateClientTLS(t *testing.T) {
testCases := []struct {
description string
pattern string
Expand Down Expand Up @@ -1264,10 +1264,10 @@ func TestValidateClientTLS(t *testing.T) {
}
}

// TestIsProxyProtocolNeeded verifies that IsProxyProtocolNeeded returns the
// Test_IsProxyProtocolNeeded verifies that IsProxyProtocolNeeded returns the
// expected values for various platforms and endpoint publishing strategy
// parameters.
func TestIsProxyProtocolNeeded(t *testing.T) {
func Test_IsProxyProtocolNeeded(t *testing.T) {
var (
awsPlatform = configv1.PlatformStatus{
Type: configv1.AWSPlatformType,
Expand Down
12 changes: 6 additions & 6 deletions pkg/operator/controller/ingress/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func getRouterDeploymentComponents(t *testing.T) (*operatorv1.IngressController,
return ic, ingressConfig, infraConfig, apiConfig, networkConfig, proxyNeeded
}

func TestDesiredRouterDeployment(t *testing.T) {
func Test_desiredRouterDeployment(t *testing.T) {
ic, ingressConfig, infraConfig, apiConfig, networkConfig, proxyNeeded := getRouterDeploymentComponents(t)

deployment, err := desiredRouterDeployment(ic, ingressControllerImage, ingressConfig, infraConfig, apiConfig, networkConfig, proxyNeeded, false, nil)
Expand Down Expand Up @@ -846,7 +846,7 @@ func checkContainerPort(t *testing.T, d *appsv1.Deployment, portName string, por
t.Errorf("deployment %s container does not have port with name %s and number %d", d.Name, portName, port)
}

func TestInferTLSProfileSpecFromDeployment(t *testing.T) {
func Test_inferTLSProfileSpecFromDeployment(t *testing.T) {
testCases := []struct {
description string
containers []corev1.Container
Expand Down Expand Up @@ -1056,7 +1056,7 @@ func TestDeploymentHash(t *testing.T) {
}
}

func TestDeploymentConfigChanged(t *testing.T) {
func Test_deploymentConfigChanged(t *testing.T) {
pointerTo := func(ios intstr.IntOrString) *intstr.IntOrString { return &ios }
testCases := []struct {
description string
Expand Down Expand Up @@ -1698,7 +1698,7 @@ func TestDeploymentConfigChanged(t *testing.T) {
}
}

func TestDurationToHAProxyTimespec(t *testing.T) {
func Test_durationToHAProxyTimespec(t *testing.T) {
testCases := []struct {
inputDuration time.Duration
expectedOutput string
Expand Down Expand Up @@ -1744,7 +1744,7 @@ func TestDurationToHAProxyTimespec(t *testing.T) {
}
}

func TestCapReloadIntervalValue(t *testing.T) {
func Test_capReloadIntervalValue(t *testing.T) {
testCases := []struct {
inputDuration time.Duration
expectedOutput time.Duration
Expand Down Expand Up @@ -1777,7 +1777,7 @@ func TestCapReloadIntervalValue(t *testing.T) {
}
}

func TestGetMIMETypes(t *testing.T) {
func Test_GetMIMETypes(t *testing.T) {
testCases := []struct {
mimeArrayInput []operatorv1.CompressionMIMEType
expectedOutput string
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/controller/ingress/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestDesiredWildcardDNSRecord(t *testing.T) {
func Test_desiredWildcardDNSRecord(t *testing.T) {
tests := []struct {
description string
domain string
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestDesiredWildcardDNSRecord(t *testing.T) {
}
}

func TestManageDNSForDomain(t *testing.T) {
func Test_manageDNSForDomain(t *testing.T) {
tests := []struct {
name string
domain string
Expand Down
Loading

0 comments on commit 4614f29

Please sign in to comment.