Skip to content

Commit 797f8d2

Browse files
committed
refactor: remove inline pointer functions from test files
1 parent 22ad75e commit 797f8d2

6 files changed

Lines changed: 0 additions & 28 deletions

File tree

apps/workspace-engine/pkg/jobagents/testrunner/testrunner_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ func newTestJob(id string, config map[string]any) *oapi.Job {
8383
}
8484
}
8585

86-
//go:fix inline
87-
func ptr[T any](v T) *T { return new(v) }
88-
8986
// ---------- Type() ----------
9087

9188
func TestType(t *testing.T) {

apps/workspace-engine/pkg/workspace/releasemanager/policy/evaluator/deploymentwindow/deploymentwindow_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,6 @@ func (m *mockGetters) HasCurrentRelease(_ context.Context, _ *oapi.ReleaseTarget
2121
return m.hasRelease, m.err
2222
}
2323

24-
//go:fix inline
25-
func boolPtr(b bool) *bool {
26-
return new(b)
27-
}
28-
29-
//go:fix inline
30-
func stringPtr(s string) *string {
31-
return new(s)
32-
}
33-
3424
func newTestScope() (context.Context, evaluator.EvaluatorScope) {
3525
return context.Background(), evaluator.EvaluatorScope{
3626
Environment: &oapi.Environment{Id: "env-1"},

apps/workspace-engine/pkg/workspace/releasemanager/policy/evaluator/gradualrollout/gradualrollout_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,6 @@ func (m *mockGetters) GetJobsForEnvironmentAndVersion(
164164
// Test helpers
165165
// ---------------------------------------------------------------------------
166166

167-
//go:fix inline
168-
func boolPtr(b bool) *bool { return new(b) }
169-
170-
//go:fix inline
171-
func stringPtr(s string) *string { return new(s) }
172-
173167
func makeResources(n int) ([]*oapi.Resource, map[string]*oapi.Resource) {
174168
resources := make([]*oapi.Resource, n)
175169
resourceMap := make(map[string]*oapi.Resource, n)

apps/workspace-engine/svc/controllers/jobdispatch/verification/template_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import (
88
"workspace-engine/pkg/oapi"
99
)
1010

11-
//go:fix inline
12-
func ptr[T any](v T) *T { return new(v) }
13-
1411
func makeDispatchContext(resource, environment string) *oapi.DispatchContext {
1512
return &oapi.DispatchContext{
1613
Resource: &oapi.Resource{Name: resource},

apps/workspace-engine/svc/controllers/jobverificationmetric/metrics/provider/prometheus/prometheus_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import (
1212
"workspace-engine/svc/controllers/jobverificationmetric/metrics/provider"
1313
)
1414

15-
//go:fix inline
16-
func ptr[T any](v T) *T { return new(v) }
17-
1815
func TestNewPrometheusProvider(t *testing.T) {
1916
tests := []struct {
2017
name string

apps/workspace-engine/svc/http/server/openapi/workflows/workflows_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ func booleanInput(key string, def *bool) oapi.WorkflowInput {
3838
return input
3939
}
4040

41-
//go:fix inline
42-
func ptr[T any](v T) *T { return new(v) }
43-
4441
func TestResolveInputs_ProvidedInputsPassThrough(t *testing.T) {
4542
workflow := &oapi.Workflow{
4643
Inputs: []oapi.WorkflowInput{

0 commit comments

Comments
 (0)