Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: auto_merge not working properly with orchestrator backend #1871

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: backend test
  • Loading branch information
duy0611 committed Jan 15, 2025
commit da512e3dc066b3b5bf2904f4d82277577dc53cf6
8 changes: 4 additions & 4 deletions backend/controllers/projects_test.go
Original file line number Diff line number Diff line change
@@ -96,19 +96,19 @@ func TestAutomergeWhenBatchIsSuccessfulStatus(t *testing.T) {
" dir: dev\n" +
"auto_merge: true"
batch.BatchType = orchestrator_scheduler.DiggerCommandApply
batch.CoverAllImpactedProjects = false
err = AutomergePRforBatchIfEnabled(gh, &batch)
assert.NoError(t, err)
assert.True(t, isMergeCalled)
assert.False(t, isMergeCalled)

batch.DiggerConfig = "" +
"projects:\n" +
" - name: dev\n" +
" dir: dev\n" +
"auto_merge: true"
batch.BatchType = orchestrator_scheduler.DiggerCommandApply
batch.CoverAllImpactedProjects = false
batch.CoverAllImpactedProjects = true
err = AutomergePRforBatchIfEnabled(gh, &batch)
assert.NoError(t, err)
assert.False(t, isMergeCalled)

assert.True(t, isMergeCalled)
}