1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-15 05:58:16 +00:00
forgejo/models/migrations/v1_16
Lunny Xiao 97c8dbf332
Fix bug hidden on CI and make ci failed if tests failure ()
The tests on migration tests failed but CI reports successfully

https://github.com/go-gitea/gitea/actions/runs/7364373807/job/20044685969#step:8:141

This PR will fix the bug on migration v283 and also the CI hidden
behaviour.

The reason is on the Makefile

`GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags='$(TEST_TAGS)' $(MIGRATE_TEST_PACKAGES)` will
return the error exit code.

But

`for pkg in $(shell $(GO) list
code.gitea.io/gitea/models/migrations/...); do \
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini $(GO) test
$(GOTESTFLAGS) -tags '$(TEST_TAGS)' $$pkg; \
	done`

will not work.

This also fix 

(cherry picked from commit 45277486c2c6213b7766b1da708a991cdb1f3565)

Conflicts:
	.github/workflows/pull-db-tests.yml
	Makefile
	models/migrations/v1_22/v283.go
	models/migrations/v1_22/v286_test.go
	models/migrations/v1_22/v287_test.go
	already in Forgejo for the Makefile & CI logic but Gitea changes
	otherwise rule
2024-03-11 23:36:59 +07:00
..
main_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v189.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v189_test.go Replace interface{} with any () 2023-07-04 18:36:08 +00:00
v190.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v191.go Refactor setting.Database.UseXXX to methods () 2023-03-07 18:51:06 +08:00
v192.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v193.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v193_test.go Fix bug hidden on CI and make ci failed if tests failure () 2024-03-11 23:36:59 +07:00
v194.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v195.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v195_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v196.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v197.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v198.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v199.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v200.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v201.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v202.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v203.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v204.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v205.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v206.go Rename Sync2 -> Sync () 2023-08-13 21:17:21 +02:00
v207.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v208.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v209.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
v210.go Replace deprecated elliptic.Marshal () 2023-08-29 22:19:40 +02:00
v210_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00