Skip to content

Commit 9b89692

Browse files
committed
test
1 parent b6a426d commit 9b89692

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.github/workflows/pull-db-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
TAGS: bindata
4343
- name: run tests
44-
run: make test-mssql
44+
run: TEST_LOGGER=console,test,file make test-mssql
4545
timeout-minutes: 50
4646
env:
4747
TAGS: bindata
@@ -77,7 +77,7 @@ jobs:
7777
env:
7878
TAGS: bindata
7979
- name: run tests
80-
run: make test-mssql
80+
run: TEST_LOGGER=console,test,file make test-mssql
8181
timeout-minutes: 50
8282
env:
8383
TAGS: bindata
@@ -109,7 +109,7 @@ jobs:
109109
- name: Add hosts to /etc/hosts
110110
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql devstoreaccount1.azurite.local" | sudo tee -a /etc/hosts'
111111
- run: make deps-backend
112-
- run: make backend
112+
- run: TEST_LOGGER=console,test,file make backend
113113
env:
114114
TAGS: bindata
115115
- name: run tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ generate-ini-mssql:
581581

582582
.PHONY: test-mssql
583583
test-mssql: integrations.mssql.test generate-ini-mssql
584-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test
584+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./integrations.mssql.test -test.v
585585

586586
.PHONY: test-mssql\#%
587587
test-mssql\#%: integrations.mssql.test generate-ini-mssql

services/mailer/incoming/incoming_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (h *ReplyHandler) Handle(ctx context.Context, content *MailContent, doer *u
127127
_, err := pull_service.CreateCodeComment(
128128
ctx,
129129
doer,
130-
nil,
130+
nil, // FIXME: INCOMING-MAIL-GIT-REPO: it doesn't seem right to use nil for git repo
131131
issue,
132132
comment.Line,
133133
content.Content,

services/pull/review.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ func SubmitReview(ctx context.Context, doer *user_model.User, gitRepo *git.Repos
325325
return nil, nil, ErrSubmitReviewOnClosedPR
326326
}
327327

328+
// FIXME: INCOMING-MAIL-GIT-REPO: the gitRepo can be nil when it is from incoming mail
328329
headCommitID, err := gitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
329330
if err != nil {
330331
return nil, nil, err

services/repository/branch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func loadOneBranch(ctx context.Context, repo *repo_model.Repository, dbBranch *g
230230
return nil, fmt.Errorf("OpenRepository: %v", err)
231231
}
232232
defer baseGitRepo.Close()
233-
repoIDToGitRepo[pr.BaseRepoID] = baseGitRepo
233+
repoIDToGitRepo[pr.BaseRepoID] = baseGitRepo // FIXME: it's not right to update the caller's map and inserted a closed git repo into it
234234
}
235235
pullCommit, err := baseGitRepo.GetRefCommitIDNew(pr.GetGitHeadRefName())
236236
if err != nil && !git.IsErrNotExist(err) {

0 commit comments

Comments
 (0)