Skip to content

Commit 32e3961

Browse files
committed
add initial support for running specific tests
1 parent fab88ea commit 32e3961

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ test-e2e-sqlite: e2e.sqlite.test generate-ini-sqlite
530530
.PHONY: test-e2e-sqlite\#%
531531
test-e2e-sqlite\#%: e2e.sqlite.test generate-ini-sqlite
532532
npx playwright install $(PLAYWRIGHT_FLAGS)
533-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run
533+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$*
534534

535535
.PHONY: test-e2e-mysql
536536
test-e2e-mysql: e2e.mysql.test generate-ini-mysql
@@ -540,7 +540,7 @@ test-e2e-mysql: e2e.mysql.test generate-ini-mysql
540540
.PHONY: test-e2e-mysql\#%
541541
test-e2e-mysql\#%: e2e.mysql.test generate-ini-mysql
542542
npx playwright install $(PLAYWRIGHT_FLAGS)
543-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run
543+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e/$*
544544

545545
.PHONY: test-e2e-mysql8
546546
test-e2e-mysql8: e2e.mysql8.test generate-ini-mysql8
@@ -550,7 +550,7 @@ test-e2e-mysql8: e2e.mysql8.test generate-ini-mysql8
550550
.PHONY: test-e2e-mysql8\#%
551551
test-e2e-mysql8\#%: e2e.mysql8.test generate-ini-mysql8
552552
npx playwright install $(PLAYWRIGHT_FLAGS)
553-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run
553+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test -test.run TestE2e/$*
554554

555555
.PHONY: test-e2e-pgsql
556556
test-e2e-pgsql: e2e.pgsql.test generate-ini-pgsql
@@ -560,7 +560,7 @@ test-e2e-pgsql: e2e.pgsql.test generate-ini-pgsql
560560
.PHONY: test-e2e-pgsql\#%
561561
test-e2e-pgsql\#%: e2e.pgsql.test generate-ini-pgsql
562562
npx playwright install $(PLAYWRIGHT_FLAGS)
563-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run
563+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test -test.run TestE2e/$*
564564

565565
.PHONY: test-e2e-mssql
566566
test-e2e-mssql: e2e.mssql.test generate-ini-mssql
@@ -570,7 +570,7 @@ test-e2e-mssql: e2e.mssql.test generate-ini-mssql
570570
.PHONY: test-e2e-mssql\#%
571571
test-e2e-mssql\#%: e2e.mssql.test generate-ini-mssql
572572
npx playwright install $(PLAYWRIGHT_FLAGS)
573-
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run
573+
GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mssql.ini ./e2e.mssql.test -test.run TestE2e/$*
574574

575575
.PHONY: bench-sqlite
576576
bench-sqlite: integrations.sqlite.test generate-ini-sqlite

tests/e2e/e2e_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ func TestMain(m *testing.M) {
6666
os.Exit(exitVal)
6767
}
6868

69+
// This should be the only test e2e necessary. It will collect all "*.test.e2e.js"
70+
// files in this directory and build a test for each.
6971
func TestE2e(t *testing.T) {
7072
// Find the paths of all e2e test files in test test directory.
7173
searchGlob := filepath.Join(filepath.Dir(setting.AppPath), "tests", "e2e", "*.test.e2e.js")

0 commit comments

Comments
 (0)