Skip to content

Commit

Permalink
Soothe linter
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkaseman committed Jan 22, 2025
1 parent 8aeb0e0 commit 8ab9214
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions core/services/workflows/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
)

const (
testWorkflowId = "<workflow-id>"
testWorkflowID = "<workflow-id>"
testWorkflowOwner = "testowner"
testWorkflowName = "testworkflow"
)
Expand Down Expand Up @@ -110,7 +110,7 @@ func newTestDBStore(t *testing.T, clock clockwork.Clock) store.Store {
RETURNING id;`
var wfSpec job.WorkflowSpec
wfSpec.Workflow = simpleWorkflow
wfSpec.WorkflowID = testWorkflowId
wfSpec.WorkflowID = testWorkflowID
wfSpec.WorkflowOwner = testWorkflowOwner
wfSpec.WorkflowName = testWorkflowName
_, err := db.NamedExec(sql, wfSpec)
Expand Down Expand Up @@ -178,7 +178,7 @@ func newTestEngine(t *testing.T, reg *coreCap.Registry, sdkSpec sdk.WorkflowSpec

reg.SetLocalRegistry(&testConfigProvider{})
cfg := Config{
WorkflowID: testWorkflowId,
WorkflowID: testWorkflowID,
WorkflowOwner: testWorkflowOwner,
Lggr: logger.TestLogger(t),
Registry: reg,
Expand Down Expand Up @@ -216,7 +216,7 @@ func newTestEngine(t *testing.T, reg *coreCap.Registry, sdkSpec sdk.WorkflowSpec
//
// If the engine fails to initialize, the test will fail rather
// than blocking indefinitely.
func getExecutionId(t *testing.T, eng *Engine, hooks *testHooks) (string, error) {
func getExecutionID(t *testing.T, eng *Engine, hooks *testHooks) (string, error) {
var eid string
select {
case <-hooks.initFailed:
Expand Down Expand Up @@ -316,7 +316,7 @@ func TestEngineWithHardcodedWorkflow(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)
resp1 := <-target1.response
assert.Equal(t, cr.Event.Outputs, resp1.Value)
Expand Down Expand Up @@ -539,7 +539,7 @@ func TestEngine_RateLimit(t *testing.T) {
require.True(t, globalAllow)
servicetest.Run(t, eng)

_, err := getExecutionId(t, eng, testHooks)
_, err := getExecutionID(t, eng, testHooks)
require.Error(t, err)
})

Expand Down Expand Up @@ -592,7 +592,7 @@ func TestEngine_RateLimit(t *testing.T) {
require.True(t, globalAllow)
servicetest.Run(t, eng)

_, err := getExecutionId(t, eng, testHooks)
_, err := getExecutionID(t, eng, testHooks)
require.Error(t, err)
})
}
Expand All @@ -612,7 +612,7 @@ func TestEngine_ErrorsTheWorkflowIfAStepErrors(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, hooks)
eid, err := getExecutionID(t, eng, hooks)
require.NoError(t, err)
state, err := eng.executionStates.Get(ctx, eid)
require.NoError(t, err)
Expand All @@ -636,7 +636,7 @@ func TestEngine_GracefulEarlyTermination(t *testing.T) {
eng, hooks := newTestEngineWithYAMLSpec(t, reg, simpleWorkflow)
servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, hooks)
eid, err := getExecutionID(t, eng, hooks)
require.NoError(t, err)
state, err := eng.executionStates.Get(ctx, eid)
require.NoError(t, err)
Expand Down Expand Up @@ -731,7 +731,7 @@ func TestEngine_MultiStepDependencies(t *testing.T) {
eng, hooks := newTestEngineWithYAMLSpec(t, reg, multiStepWorkflow)
servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, hooks)
eid, err := getExecutionID(t, eng, hooks)
require.NoError(t, err)
state, err := eng.executionStates.Get(ctx, eid)
require.NoError(t, err)
Expand Down Expand Up @@ -788,7 +788,7 @@ func TestEngine_ResumesPendingExecutions(t *testing.T) {
Ref: workflows.KeywordTrigger,
},
},
WorkflowID: testWorkflowId,
WorkflowID: testWorkflowID,
ExecutionID: "<execution-ID>",
Status: store.StatusStarted,
}
Expand All @@ -803,7 +803,7 @@ func TestEngine_ResumesPendingExecutions(t *testing.T) {
)
servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, hooks)
eid, err := getExecutionID(t, eng, hooks)
require.NoError(t, err)
gotEx, err := dbstore.Get(ctx, eid)
require.NoError(t, err)
Expand Down Expand Up @@ -843,7 +843,7 @@ func TestEngine_TimesOutOldExecutions(t *testing.T) {
Ref: workflows.KeywordTrigger,
},
},
WorkflowID: testWorkflowId,
WorkflowID: testWorkflowID,
ExecutionID: "<execution-ID>",
Status: store.StatusStarted,
}
Expand All @@ -862,7 +862,7 @@ func TestEngine_TimesOutOldExecutions(t *testing.T) {
clock.Advance(15 * time.Minute)
servicetest.Run(t, eng)

_, _ = getExecutionId(t, eng, hooks)
_, _ = getExecutionID(t, eng, hooks)
gotEx, err := dbstore.Get(ctx, "<execution-ID>")
require.NoError(t, err)
assert.Equal(t, store.StatusTimeout, gotEx.Status)
Expand Down Expand Up @@ -1083,7 +1083,7 @@ func TestEngine_PassthroughInterpolation(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1231,7 +1231,7 @@ func TestEngine_MergesWorkflowConfigAndCRConfig(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1373,7 +1373,7 @@ func TestEngine_MergesWorkflowConfigAndCRConfig_CRConfigPrecedence(t *testing.T)

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1428,7 +1428,7 @@ func TestEngine_HandlesNilConfigOnchain(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1526,7 +1526,7 @@ targets:
eng, hooks := newTestEngineWithYAMLSpec(t, reg, workflowSpec)
servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, hooks)
eid, err := getExecutionID(t, eng, hooks)
require.NoError(t, err)
state, err := eng.executionStates.Get(ctx, eid)
require.NoError(t, err)
Expand Down Expand Up @@ -1615,7 +1615,7 @@ func TestEngine_WithCustomComputeStep(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1682,7 +1682,7 @@ func TestEngine_CustomComputePropagatesBreaks(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down Expand Up @@ -1795,7 +1795,7 @@ func TestEngine_FetchesSecrets(t *testing.T) {

servicetest.Run(t, eng)

eid, err := getExecutionId(t, eng, testHooks)
eid, err := getExecutionID(t, eng, testHooks)
require.NoError(t, err)

state, err := eng.executionStates.Get(ctx, eid)
Expand Down

0 comments on commit 8ab9214

Please sign in to comment.