Skip to content

Commit 5f0a49e

Browse files
authored
Merge pull request #3288 from fabriziopandini/remove-offensive-word
🌱 Remove use of word "dummy" from our codebase
2 parents efc818f + ac0f3d8 commit 5f0a49e

File tree

12 files changed

+257
-257
lines changed

12 files changed

+257
-257
lines changed

bootstrap/kubeadm/controllers/kubeadmconfig_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -953,10 +953,10 @@ func TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileBehaviors(t *testin
953953
remoteClientGetter: fakeremote.NewClusterClient,
954954
}
955955

956-
dummyCAHash := []string{"...."}
956+
caHash := []string{"...."}
957957
bootstrapToken := kubeadmv1beta1.Discovery{
958958
BootstrapToken: &kubeadmv1beta1.BootstrapTokenDiscovery{
959-
CACertHashes: dummyCAHash,
959+
CACertHashes: caHash,
960960
},
961961
}
962962
goodcluster := &clusterv1.Cluster{
@@ -1018,7 +1018,7 @@ func TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileBehaviors(t *testin
10181018
JoinConfiguration: &kubeadmv1beta1.JoinConfiguration{
10191019
Discovery: kubeadmv1beta1.Discovery{
10201020
BootstrapToken: &kubeadmv1beta1.BootstrapTokenDiscovery{
1021-
CACertHashes: dummyCAHash,
1021+
CACertHashes: caHash,
10221022
APIServerEndpoint: "bar.com:6443",
10231023
},
10241024
},
@@ -1039,7 +1039,7 @@ func TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileBehaviors(t *testin
10391039
JoinConfiguration: &kubeadmv1beta1.JoinConfiguration{
10401040
Discovery: kubeadmv1beta1.Discovery{
10411041
BootstrapToken: &kubeadmv1beta1.BootstrapTokenDiscovery{
1042-
CACertHashes: dummyCAHash,
1042+
CACertHashes: caHash,
10431043
Token: "abcdef.0123456789abcdef",
10441044
},
10451045
},
@@ -1060,15 +1060,15 @@ func TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileBehaviors(t *testin
10601060
JoinConfiguration: &kubeadmv1beta1.JoinConfiguration{
10611061
Discovery: kubeadmv1beta1.Discovery{
10621062
BootstrapToken: &kubeadmv1beta1.BootstrapTokenDiscovery{
1063-
CACertHashes: dummyCAHash,
1063+
CACertHashes: caHash,
10641064
},
10651065
},
10661066
},
10671067
},
10681068
},
10691069
validateDiscovery: func(g *WithT, c *bootstrapv1.KubeadmConfig) error {
10701070
d := c.Spec.JoinConfiguration.Discovery
1071-
g.Expect(reflect.DeepEqual(d.BootstrapToken.CACertHashes, dummyCAHash)).To(BeTrue())
1071+
g.Expect(reflect.DeepEqual(d.BootstrapToken.CACertHashes, caHash)).To(BeTrue())
10721072
return nil
10731073
},
10741074
},

cmd/clusterctl/client/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
"sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test"
3535
)
3636

37-
// dummy test to document fakeClient usage
37+
// TestNewFakeClient is a fake test to document fakeClient usage
3838
func TestNewFakeClient(t *testing.T) {
3939
// create a fake config with a provider named P1 and a variable named var
4040
repository1Config := config.NewProvider("p1", "url", clusterctlv1.CoreProviderType)

cmd/clusterctl/client/cluster/mover_test.go

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var moveTests = []struct {
5454
// owned by Clusters
5555
"/v1, Kind=Secret, ns1/foo-ca",
5656
"/v1, Kind=Secret, ns1/foo-kubeconfig",
57-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/foo",
57+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/foo",
5858
},
5959
},
6060
wantErr: false,
@@ -78,17 +78,17 @@ var moveTests = []struct {
7878
"/v1, Kind=Secret, ns1/cluster1-ca",
7979
"cluster.x-k8s.io/v1alpha3, Kind=Machine, ns1/m1",
8080
"cluster.x-k8s.io/v1alpha3, Kind=Machine, ns1/m2",
81-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
81+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
8282
},
8383
{ //group 3 (objects with ownerReferences in group 1,2)
8484
// owned by Machines
85-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m1",
86-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m2",
87-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m1",
88-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m2",
85+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m1",
86+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m2",
87+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m1",
88+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m2",
8989
},
9090
{ //group 4 (objects with ownerReferences in group 1,2,3)
91-
// owned by DummyBootstrapConfigs
91+
// owned by GenericBootstrapConfigs
9292
"/v1, Kind=Secret, ns1/cluster1-sa",
9393
"/v1, Kind=Secret, ns1/m1",
9494
"/v1, Kind=Secret, ns1/m2",
@@ -116,10 +116,10 @@ var moveTests = []struct {
116116
// owned by Clusters
117117
"/v1, Kind=Secret, ns1/cluster1-ca",
118118
"/v1, Kind=Secret, ns1/cluster1-kubeconfig",
119-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfigTemplate, ns1/ms1",
119+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfigTemplate, ns1/ms1",
120120
"cluster.x-k8s.io/v1alpha3, Kind=MachineSet, ns1/ms1",
121-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
122-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachineTemplate, ns1/ms1",
121+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
122+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachineTemplate, ns1/ms1",
123123
},
124124
{ //group 3 (objects with ownerReferences in group 1,2)
125125
// owned by MachineSets
@@ -128,13 +128,13 @@ var moveTests = []struct {
128128
},
129129
{ //group 4 (objects with ownerReferences in group 1,2,3)
130130
// owned by Machines
131-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m1",
132-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m2",
133-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m1",
134-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m2",
131+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m1",
132+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m2",
133+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m1",
134+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m2",
135135
},
136136
{ //group 5 (objects with ownerReferences in group 1,2,3,4)
137-
// owned by DummyBootstrapConfigs
137+
// owned by GenericBootstrapConfigs
138138
"/v1, Kind=Secret, ns1/m1",
139139
"/v1, Kind=Secret, ns1/m2",
140140
},
@@ -164,10 +164,10 @@ var moveTests = []struct {
164164
// owned by Clusters
165165
"/v1, Kind=Secret, ns1/cluster1-ca",
166166
"/v1, Kind=Secret, ns1/cluster1-kubeconfig",
167-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfigTemplate, ns1/md1",
167+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfigTemplate, ns1/md1",
168168
"cluster.x-k8s.io/v1alpha3, Kind=MachineDeployment, ns1/md1",
169-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
170-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachineTemplate, ns1/md1",
169+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
170+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachineTemplate, ns1/md1",
171171
},
172172
{ //group 3 (objects with ownerReferences in group 1,2)
173173
// owned by MachineDeployments
@@ -180,13 +180,13 @@ var moveTests = []struct {
180180
},
181181
{ //group 5 (objects with ownerReferences in group 1,2,3,4)
182182
// owned by Machines
183-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m1",
184-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m2",
185-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m1",
186-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m2",
183+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m1",
184+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m2",
185+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m1",
186+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m2",
187187
},
188188
{ //group 6 (objects with ownerReferences in group 1,2,3,5,6)
189-
// owned by DummyBootstrapConfigs
189+
// owned by GenericBootstrapConfigs
190190
"/v1, Kind=Secret, ns1/m1",
191191
"/v1, Kind=Secret, ns1/m2",
192192
},
@@ -212,9 +212,9 @@ var moveTests = []struct {
212212
{ //group 2 (objects with ownerReferences in group 1)
213213
// owned by Clusters
214214
"/v1, Kind=Secret, ns1/cluster1-ca",
215-
"controlplane.cluster.x-k8s.io/v1alpha3, Kind=DummyControlPlane, ns1/cp1",
216-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
217-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachineTemplate, ns1/cp1",
215+
"controlplane.cluster.x-k8s.io/v1alpha3, Kind=GenericControlPlane, ns1/cp1",
216+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
217+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachineTemplate, ns1/cp1",
218218
},
219219
{ //group 3 (objects with ownerReferences in group 1,2)
220220
"/v1, Kind=Secret, ns1/cluster1-kubeconfig",
@@ -224,13 +224,13 @@ var moveTests = []struct {
224224
},
225225
{ //group 4 (objects with ownerReferences in group 1,2,3)
226226
// owned by Machines
227-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m1",
228-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/m2",
229-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m1",
230-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/m2",
227+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m1",
228+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/m2",
229+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m1",
230+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/m2",
231231
},
232232
{ //group 5 (objects with ownerReferences in group 1,2,3,4)
233-
// owned by DummyBootstrapConfigs
233+
// owned by GenericBootstrapConfigs
234234
"/v1, Kind=Secret, ns1/m1",
235235
"/v1, Kind=Secret, ns1/m2",
236236
},
@@ -253,10 +253,10 @@ var moveTests = []struct {
253253
// owned by Clusters
254254
"/v1, Kind=Secret, ns1/cluster1-ca",
255255
"/v1, Kind=Secret, ns1/cluster1-kubeconfig",
256-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfigTemplate, ns1/mp1",
256+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfigTemplate, ns1/mp1",
257257
"exp.cluster.x-k8s.io/v1alpha3, Kind=MachinePool, ns1/mp1",
258-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
259-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachineTemplate, ns1/mp1",
258+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
259+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachineTemplate, ns1/mp1",
260260
},
261261
},
262262
wantErr: false,
@@ -280,10 +280,10 @@ var moveTests = []struct {
280280
// owned by Clusters
281281
"/v1, Kind=Secret, ns1/foo-ca",
282282
"/v1, Kind=Secret, ns1/foo-kubeconfig",
283-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/foo",
283+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/foo",
284284
"/v1, Kind=Secret, ns1/bar-ca",
285285
"/v1, Kind=Secret, ns1/bar-kubeconfig",
286-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/bar",
286+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/bar",
287287
},
288288
},
289289
},
@@ -327,15 +327,15 @@ var moveTests = []struct {
327327
// owned by Clusters
328328
"/v1, Kind=Secret, ns1/cluster1-ca",
329329
"/v1, Kind=Secret, ns1/cluster1-kubeconfig",
330-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfigTemplate, ns1/cluster1-ms1",
330+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfigTemplate, ns1/cluster1-ms1",
331331
"cluster.x-k8s.io/v1alpha3, Kind=MachineSet, ns1/cluster1-ms1",
332-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster1",
332+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster1",
333333
"/v1, Kind=Secret, ns1/cluster2-ca",
334334
"/v1, Kind=Secret, ns1/cluster2-kubeconfig",
335-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfigTemplate, ns1/cluster2-ms1",
335+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfigTemplate, ns1/cluster2-ms1",
336336
"cluster.x-k8s.io/v1alpha3, Kind=MachineSet, ns1/cluster2-ms1",
337-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureCluster, ns1/cluster2",
338-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachineTemplate, ns1/shared", //shared object
337+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureCluster, ns1/cluster2",
338+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachineTemplate, ns1/shared", //shared object
339339
},
340340
{ //group 3 (objects with ownerReferences in group 1,2)
341341
// owned by MachineSets
@@ -344,13 +344,13 @@ var moveTests = []struct {
344344
},
345345
{ //group 4 (objects with ownerReferences in group 1,2,3)
346346
// owned by Machines
347-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/cluster1-m1",
348-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/cluster1-m1",
349-
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=DummyBootstrapConfig, ns1/cluster2-m1",
350-
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=DummyInfrastructureMachine, ns1/cluster2-m1",
347+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/cluster1-m1",
348+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/cluster1-m1",
349+
"bootstrap.cluster.x-k8s.io/v1alpha3, Kind=GenericBootstrapConfig, ns1/cluster2-m1",
350+
"infrastructure.cluster.x-k8s.io/v1alpha3, Kind=GenericInfrastructureMachine, ns1/cluster2-m1",
351351
},
352352
{ //group 5 (objects with ownerReferences in group 1,2,3,4)
353-
// owned by DummyBootstrapConfigs
353+
// owned by GenericBootstrapConfigs
354354
"/v1, Kind=Secret, ns1/cluster1-m1",
355355
"/v1, Kind=Secret, ns1/cluster2-m1",
356356
},

0 commit comments

Comments
 (0)