Skip to content

Commit

Permalink
remove old workflow mode that is not platform (pr)
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Jul 19, 2024
1 parent 0e37879 commit ea8d935
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions server/legacy/events/project_command_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,33 +487,6 @@ func TestDefaultProjectCommandRunner_ForceOverridesApplyReqs(t *testing.T) {
Equals(t, "", firstRes.Failure)
}

// Test that if mergeable is required and the PR isn't mergeable we give an error.
func TestDefaultProjectCommandRunner_ApplyNotMergeable(t *testing.T) {
RegisterMockTestingT(t)
mockWorkingDir := mocks.NewMockWorkingDir()
runner := &events.DefaultProjectCommandRunner{
WorkingDir: mockWorkingDir,
WorkingDirLocker: events.NewDefaultWorkingDirLocker(),
StepsRunner: smocks.NewMockStepsRunner(),
AggregateApplyRequirements: &events.AggregateApplyRequirements{
WorkingDir: mockWorkingDir,
},
}
prjCtx := command.ProjectContext{
PullReqStatus: models.PullReqStatus{
Mergeable: false,
},
ApplyRequirements: []string{"mergeable"},
WorkflowModeType: valid.PlatformWorkflowMode,
}
tmp, cleanup := TempDir(t)
defer cleanup()
When(mockWorkingDir.GetWorkingDir(prjCtx.BaseRepo, prjCtx.Pull, prjCtx.Workspace)).ThenReturn(tmp, nil)

firstRes := runner.Apply(prjCtx)
Equals(t, "Pull request must be mergeable before running apply.", firstRes.Failure)
}

// Test that if undiverged is required and the PR is diverged we give an error.
func TestDefaultProjectCommandRunner_ApplyDiverged(t *testing.T) {
RegisterMockTestingT(t)
Expand Down

0 comments on commit ea8d935

Please sign in to comment.