use UpdateStepToStatusStarted instead of UpdateStepToStatusRunning

This commit is contained in:
pat-s 2025-01-11 00:18:39 +01:00
parent b804585b88
commit d60607e8d8
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
2 changed files with 6 additions and 6 deletions

View file

@ -9,10 +9,10 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/dummy"
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
"go.woodpecker-ci.org/woodpecker/v2/pipeline/rpc"
"go.woodpecker-ci.org/woodpecker/v2/pipeline/rpc/mocks"
"go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/dummy"
"go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/types"
"go.woodpecker-ci.org/woodpecker/v3/pipeline/rpc"
"go.woodpecker-ci.org/woodpecker/v3/pipeline/rpc/mocks"
)
type peery struct {
@ -88,6 +88,6 @@ func TestRunnerCanceledState(t *testing.T) {
cancel()
}()
err := r.Run(ctx)
err := r.Run(ctx, ctx)
assert.NoError(t, err)
}

View file

@ -185,7 +185,7 @@ func (s *RPC) Update(c context.Context, strWorkflowID string, state rpc.StepStat
}
if state.Finished == 0 {
if _, err := pipeline.UpdateStepStatusToRunning(s.store, *step, state); err != nil {
if _, err := pipeline.UpdateStepToStatusStarted(s.store, *step, state); err != nil {
log.Error().Err(err).Msg("rpc.update: cannot update step")
}
} else {