Skip to content

Commit 7e7d17e

Browse files
committed
refactor: Improved all testcases naming convention conformity to camel case standard
1 parent 6799fef commit 7e7d17e

24 files changed

+46
-46
lines changed

api/v1beta1/network_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
. "github.com/onsi/gomega"
2323
)
2424

25-
func TestSG_Difference(t *testing.T) {
25+
func TestSGDifference(t *testing.T) {
2626
tests := []struct {
2727
name string
2828
self IngressRules

api/v1beta1/tags_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"k8s.io/apimachinery/pkg/util/validation/field"
2626
)
2727

28-
func TestTags_Merge(t *testing.T) {
28+
func TestTagsMerge(t *testing.T) {
2929
tests := []struct {
3030
name string
3131
other Tags
@@ -90,7 +90,7 @@ func TestTags_Merge(t *testing.T) {
9090
}
9191
}
9292

93-
func TestTags_Difference(t *testing.T) {
93+
func TestTagsDifference(t *testing.T) {
9494
tests := []struct {
9595
name string
9696
self Tags
@@ -166,7 +166,7 @@ func TestTags_Difference(t *testing.T) {
166166
}
167167
}
168168

169-
func TestTags_Validate(t *testing.T) {
169+
func TestTagsValidate(t *testing.T) {
170170
tests := []struct {
171171
name string
172172
self Tags

api/v1beta2/awscluster_webhook_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func TestAWSClusterDefault(t *testing.T) {
4141
g.Expect(cluster.Spec.IdentityRef).NotTo(BeNil())
4242
}
4343

44-
func TestAWSCluster_ValidateCreate(t *testing.T) {
44+
func TestAWSClusterValidateCreate(t *testing.T) {
4545
unsupportedIncorrectScheme := ELBScheme("any-other-scheme")
4646

4747
tests := []struct {
@@ -289,7 +289,7 @@ func TestAWSCluster_ValidateCreate(t *testing.T) {
289289
}
290290
}
291291

292-
func TestAWSCluster_ValidateUpdate(t *testing.T) {
292+
func TestAWSClusterValidateUpdate(t *testing.T) {
293293
tests := []struct {
294294
name string
295295
oldCluster *AWSCluster
@@ -592,7 +592,7 @@ func TestAWSCluster_ValidateUpdate(t *testing.T) {
592592
}
593593
}
594594

595-
func TestAWSCluster_DefaultCNIIngressRules(t *testing.T) {
595+
func TestAWSClusterDefaultCNIIngressRules(t *testing.T) {
596596
AZUsageLimit := 3
597597
defaultVPCSpec := VPCSpec{
598598
AvailabilityZoneUsageLimit: &AZUsageLimit,
@@ -705,7 +705,7 @@ func TestAWSCluster_DefaultCNIIngressRules(t *testing.T) {
705705
}
706706
}
707707

708-
func TestAWSCluster_ValidateAllowedCIDRBlocks(t *testing.T) {
708+
func TestAWSClusterValidateAllowedCIDRBlocks(t *testing.T) {
709709
tests := []struct {
710710
name string
711711
awsc *AWSCluster
@@ -794,7 +794,7 @@ func TestAWSCluster_ValidateAllowedCIDRBlocks(t *testing.T) {
794794
}
795795
}
796796

797-
func TestAWSCluster_DefaultAllowedCIDRBlocks(t *testing.T) {
797+
func TestAWSClusterDefaultAllowedCIDRBlocks(t *testing.T) {
798798
g := NewWithT(t)
799799
tests := []struct {
800800
name string

api/v1beta2/awsclustercontrolleridentity_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ func TestAWSClusterControllerIdentityUpdateValidation(t *testing.T) {
248248
}
249249
}
250250

251-
func TestAWSClusterControllerIdentity_Default(t *testing.T) {
251+
func TestAWSClusterControllerIdentityDefault(t *testing.T) {
252252
g := NewWithT(t)
253253
tests := []struct {
254254
name string

api/v1beta2/awsclusterroleidentity_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func TestAWSClusterRoleIdentityUpdateValidation(t *testing.T) {
225225
}
226226
}
227227

228-
func TestAWSClusterRoleIdentity_Default(t *testing.T) {
228+
func TestAWSClusterRoleIdentityDefault(t *testing.T) {
229229
g := NewWithT(t)
230230
tests := []struct {
231231
name string

api/v1beta2/awsclusterstaticidentity_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func TestAWSClusterStaticIdentityUpdateLabelSelectorValidation(t *testing.T) {
199199
}
200200
}
201201

202-
func TestAWSClusterStaticIdentity_Default(t *testing.T) {
202+
func TestAWSClusterStaticIdentityDefault(t *testing.T) {
203203
g := NewWithT(t)
204204
tests := []struct {
205205
name string

api/v1beta2/awsmachine_webhook_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestMachineDefault(t *testing.T) {
3737
g.Expect(machine.Spec.CloudInit.SecureSecretsBackend).To(Equal(SecretBackendSecretsManager))
3838
}
3939

40-
func TestAWSMachine_Create(t *testing.T) {
40+
func TestAWSMachineCreate(t *testing.T) {
4141
tests := []struct {
4242
name string
4343
machine *AWSMachine
@@ -265,7 +265,7 @@ func TestAWSMachine_Create(t *testing.T) {
265265
}
266266
}
267267

268-
func TestAWSMachine_Update(t *testing.T) {
268+
func TestAWSMachineUpdate(t *testing.T) {
269269
tests := []struct {
270270
name string
271271
oldMachine *AWSMachine
@@ -376,7 +376,7 @@ func TestAWSMachine_Update(t *testing.T) {
376376
}
377377
}
378378

379-
func TestAWSMachine_SecretsBackend(t *testing.T) {
379+
func TestAWSMachineSecretsBackend(t *testing.T) {
380380
baseMachine := &AWSMachine{
381381
Spec: AWSMachineSpec{
382382
ProviderID: nil,

api/v1beta2/network_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
. "github.com/onsi/gomega"
2323
)
2424

25-
func TestSG_Difference(t *testing.T) {
25+
func TestSGDifference(t *testing.T) {
2626
tests := []struct {
2727
name string
2828
self IngressRules

api/v1beta2/sshkeyname_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"sigs.k8s.io/controller-runtime/pkg/client"
2626
)
2727

28-
func Test_SSHKeyName(t *testing.T) {
28+
func TestSSHKeyName(t *testing.T) {
2929
tests := []struct {
3030
name string
3131
sshKeyName *string

api/v1beta2/tags_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"k8s.io/apimachinery/pkg/util/validation/field"
2626
)
2727

28-
func TestTags_Merge(t *testing.T) {
28+
func TestTagsMerge(t *testing.T) {
2929
tests := []struct {
3030
name string
3131
other Tags
@@ -90,7 +90,7 @@ func TestTags_Merge(t *testing.T) {
9090
}
9191
}
9292

93-
func TestTags_Difference(t *testing.T) {
93+
func TestTagsDifference(t *testing.T) {
9494
tests := []struct {
9595
name string
9696
self Tags
@@ -166,7 +166,7 @@ func TestTags_Difference(t *testing.T) {
166166
}
167167
}
168168

169-
func TestTags_Validate(t *testing.T) {
169+
func TestTagsValidate(t *testing.T) {
170170
tests := []struct {
171171
name string
172172
self Tags

0 commit comments

Comments
 (0)