mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-06-05 08:58:50 +00:00
use UpdateStepToStatusStarted instead of UpdateStepToStatusRunning
This commit is contained in:
parent
b804585b88
commit
d60607e8d8
2 changed files with 6 additions and 6 deletions
|
@ -9,10 +9,10 @@ import (
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/mock"
|
"github.com/stretchr/testify/mock"
|
||||||
|
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/dummy"
|
"go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/dummy"
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
"go.woodpecker-ci.org/woodpecker/v3/pipeline/backend/types"
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/rpc"
|
"go.woodpecker-ci.org/woodpecker/v3/pipeline/rpc"
|
||||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/rpc/mocks"
|
"go.woodpecker-ci.org/woodpecker/v3/pipeline/rpc/mocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
type peery struct {
|
type peery struct {
|
||||||
|
@ -88,6 +88,6 @@ func TestRunnerCanceledState(t *testing.T) {
|
||||||
cancel()
|
cancel()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
err := r.Run(ctx)
|
err := r.Run(ctx, ctx)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,7 +185,7 @@ func (s *RPC) Update(c context.Context, strWorkflowID string, state rpc.StepStat
|
||||||
}
|
}
|
||||||
|
|
||||||
if state.Finished == 0 {
|
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")
|
log.Error().Err(err).Msg("rpc.update: cannot update step")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue