You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-06-03 16:35:37 +02:00
refactor move state.State.Workflow into own type (#6338)
This commit is contained in:
@@ -204,10 +204,7 @@ func TestWorkflowWithServiceStep(t *testing.T) {
|
||||
|
||||
assert.Greater(t, traces[4].Workflow.Started, int64(0))
|
||||
assert.EqualValues(t, state.State{
|
||||
Workflow: struct {
|
||||
Started int64 `json:"time"`
|
||||
Error error `json:"error"`
|
||||
}{
|
||||
Workflow: state.Workflow{
|
||||
Started: traces[4].Workflow.Started,
|
||||
},
|
||||
CurrStep: &backend.Step{
|
||||
|
||||
@@ -23,14 +23,16 @@ import (
|
||||
// And the workflow is updated alongside it.
|
||||
type State struct {
|
||||
// Global state of the currently running Workflow.
|
||||
Workflow struct {
|
||||
// Workflow start time
|
||||
Started int64 `json:"time"`
|
||||
// Current workflow error state
|
||||
Error error `json:"error"`
|
||||
}
|
||||
Workflow Workflow
|
||||
// Current step that updates the step and workflow state
|
||||
CurrStep *backend.Step `json:"step"`
|
||||
// Current step state
|
||||
CurrStepState backend.State
|
||||
}
|
||||
|
||||
type Workflow struct {
|
||||
// Workflow start time
|
||||
Started int64 `json:"time"`
|
||||
// Current workflow error state
|
||||
Error error `json:"error"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user