Skip to content

Commit f8a1ee2

Browse files
committed
fmt-imports
1 parent 64c98d5 commit f8a1ee2

5 files changed

Lines changed: 21 additions & 21 deletions

File tree

api/v1alpha1/workerresourcetemplate_webhook_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func makeWRTForWebhook(name, ns, workerDeploymentRef string, embeddedObj map[str
5656
},
5757
Spec: WorkerResourceTemplateSpec{
5858
TemporalWorkerDeploymentRef: TemporalWorkerDeploymentReference{Name: workerDeploymentRef},
59-
Template: runtime.RawExtension{Raw: raw},
59+
Template: runtime.RawExtension{Raw: raw},
6060
},
6161
}
6262
}

api/v1alpha1/workerresourcetemplate_webhook_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestWorkerResourceTemplate_ValidateCreate(t *testing.T) {
7272
ObjectMeta: metav1.ObjectMeta{Name: "empty", Namespace: "default"},
7373
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
7474
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: "my-worker"},
75-
Template: runtime.RawExtension{Raw: nil},
75+
Template: runtime.RawExtension{Raw: nil},
7676
},
7777
},
7878
errorMsg: "object must be specified",
@@ -319,7 +319,7 @@ func TestWorkerResourceTemplate_ValidateDelete_NilRaw(t *testing.T) {
319319
ObjectMeta: metav1.ObjectMeta{Name: "empty", Namespace: "default"},
320320
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
321321
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: "my-worker"},
322-
Template: runtime.RawExtension{Raw: nil},
322+
Template: runtime.RawExtension{Raw: nil},
323323
},
324324
}
325325
_, err := v.ValidateDelete(ctx, wrt)

internal/planner/planner.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222

2323
// OwnedResourceApply holds a rendered worker resource template to apply via Server-Side Apply.
2424
type OwnedResourceApply struct {
25-
Resource *unstructured.Unstructured
26-
FieldManager string
25+
Resource *unstructured.Unstructured
26+
FieldManager string
2727
WRTName string
2828
WRTNamespace string
29-
BuildID string
29+
BuildID string
3030
}
3131

3232
// Plan holds the actions to execute during reconciliation
@@ -178,11 +178,11 @@ func getOwnedResourceApplies(
178178
continue
179179
}
180180
applies = append(applies, OwnedResourceApply{
181-
Resource: rendered,
182-
FieldManager: k8s.WorkerResourceTemplateFieldManager,
181+
Resource: rendered,
182+
FieldManager: k8s.WorkerResourceTemplateFieldManager,
183183
WRTName: wrt.Name,
184184
WRTNamespace: wrt.Namespace,
185-
BuildID: buildID,
185+
BuildID: buildID,
186186
})
187187
}
188188
}

internal/planner/planner_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ func TestGeneratePlan(t *testing.T) {
4141
expectUpdate int
4242
expectWorkflow int
4343
expectConfig bool
44-
expectConfigSetCurrent *bool // pointer so we can test nil
45-
expectConfigRampPercent *int32 // pointer so we can test nil, in percentage (0-100)
44+
expectConfigSetCurrent *bool // pointer so we can test nil
45+
expectConfigRampPercent *int32 // pointer so we can test nil, in percentage (0-100)
4646
expectManagerIdentity *string // pointer so nil means "don't assert"
47-
maxVersionsIneligibleForDeletion *int32 // set by env if non-nil, else default 75
48-
wrts []temporaliov1alpha1.WorkerResourceTemplate
47+
maxVersionsIneligibleForDeletion *int32 // set by env if non-nil, else default 75
48+
wrts []temporaliov1alpha1.WorkerResourceTemplate
4949
expectOwnedResourceApplies int
5050
}{
5151
{
@@ -2994,12 +2994,12 @@ func TestResolveGateInput(t *testing.T) {
29942994
func TestGetOwnedResourceApplies(t *testing.T) {
29952995
testCases := []struct {
29962996
name string
2997-
wrts []temporaliov1alpha1.WorkerResourceTemplate
2997+
wrts []temporaliov1alpha1.WorkerResourceTemplate
29982998
k8sState *k8s.DeploymentState
29992999
expectCount int
30003000
}{
30013001
{
3002-
name: "no WRTs produces no applies",
3002+
name: "no WRTs produces no applies",
30033003
wrts: nil,
30043004
k8sState: &k8s.DeploymentState{
30053005
Deployments: map[string]*appsv1.Deployment{
@@ -3077,7 +3077,7 @@ func TestGetOwnedResourceApplies(t *testing.T) {
30773077
ObjectMeta: metav1.ObjectMeta{Name: "nil-raw", Namespace: "default"},
30783078
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
30793079
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: "my-worker"},
3080-
Template: runtime.RawExtension{Raw: nil},
3080+
Template: runtime.RawExtension{Raw: nil},
30813081
},
30823082
},
30833083
createTestWRT("my-hpa", "my-worker"),
@@ -3181,7 +3181,7 @@ func createTestWRT(name, workerDeploymentRefName string) temporaliov1alpha1.Work
31813181
},
31823182
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
31833183
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: workerDeploymentRefName},
3184-
Template: runtime.RawExtension{Raw: raw},
3184+
Template: runtime.RawExtension{Raw: raw},
31853185
},
31863186
}
31873187
}
@@ -3224,7 +3224,7 @@ func TestGetOwnedResourceApplies_MatchLabelsInjection(t *testing.T) {
32243224
ObjectMeta: metav1.ObjectMeta{Name: "my-pdb", Namespace: "default"},
32253225
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
32263226
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: "my-worker"},
3227-
Template: runtime.RawExtension{Raw: raw},
3227+
Template: runtime.RawExtension{Raw: raw},
32283228
},
32293229
}
32303230

@@ -3267,7 +3267,7 @@ func TestGetOwnedResourceApplies_GoTemplateRendering(t *testing.T) {
32673267
ObjectMeta: metav1.ObjectMeta{Name: "my-monitor", Namespace: "k8s-production"},
32683268
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
32693269
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: "my-worker"},
3270-
Template: runtime.RawExtension{Raw: raw},
3270+
Template: runtime.RawExtension{Raw: raw},
32713271
},
32723272
}
32733273

@@ -3304,7 +3304,7 @@ func createTestWRTWithInvalidTemplate(name, workerDeploymentRefName string) temp
33043304
},
33053305
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
33063306
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: workerDeploymentRefName},
3307-
Template: runtime.RawExtension{Raw: raw},
3307+
Template: runtime.RawExtension{Raw: raw},
33083308
},
33093309
}
33103310
}

internal/tests/internal/wrt_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ func makeWRTWithRaw(name, namespace, workerDeploymentRefName string, raw []byte)
413413
},
414414
Spec: temporaliov1alpha1.WorkerResourceTemplateSpec{
415415
TemporalWorkerDeploymentRef: temporaliov1alpha1.TemporalWorkerDeploymentReference{Name: workerDeploymentRefName},
416-
Object: runtime.RawExtension{Raw: raw},
416+
Object: runtime.RawExtension{Raw: raw},
417417
},
418418
}
419419
}

0 commit comments

Comments
 (0)