diff options
author | kolaente <konrad@kola-entertainments.de> | 2018-12-12 02:01:41 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-12-12 09:01:41 +0800 |
commit | 6db7dbd333204bcff50716e4840deee28e09c2f9 (patch) | |
tree | b68ee709873a91738b586fa57b367b2b217b0a4a /Makefile | |
parent | b1f3685015246d3458f6d8c1d892eab076b3ed4a (diff) | |
download | gitea-6db7dbd333204bcff50716e4840deee28e09c2f9.tar.gz gitea-6db7dbd333204bcff50716e4840deee28e09c2f9.zip |
Added test environment for mssql (#4282)
* Added test environment for m$sql
* Added template for test environment for m$sql
* Fix password
* Fix password (again)
* Fix password (again again)
* Fix db
* Ci trigger (Looking at you drone....)
* Ci trigger (Looking at you drone....)
* Ci trigger (Looking at you drone....)
* Ci trigger (Looking at you drone....)
* Create master database for mssql integration tests
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Create database only if master do not exist
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix mssql integration tests by using custom database "gitea"
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Moved defer
* bump xorm
* updated xorm
* Fixed build
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -54,6 +54,10 @@ TEST_PGSQL_HOST ?= pgsql:5432 TEST_PGSQL_DBNAME ?= testgitea TEST_PGSQL_USERNAME ?= postgres TEST_PGSQL_PASSWORD ?= postgres +TEST_MSSQL_HOST ?= mssql:1433 +TEST_MSSQL_DBNAME ?= gitea +TEST_MSSQL_USERNAME ?= sa +TEST_MSSQL_PASSWORD ?= MwantsaSecurePassword1 ifeq ($(OS), Windows_NT) EXECUTABLE := gitea.exe @@ -74,9 +78,9 @@ clean: $(GO) clean -i ./... rm -rf $(EXECUTABLE) $(DIST) $(BINDATA) \ integrations*.test \ - integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-sqlite/ \ - integrations/indexers-mysql/ integrations/indexers-pgsql integrations/indexers-sqlite \ - integrations/mysql.ini integrations/pgsql.ini + integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-sqlite/ integrations/gitea-integration-mssql/ \ + integrations/indexers-mysql/ integrations/indexers-pgsql integrations/indexers-sqlite integrations/indexers-mssql \ + integrations/mysql.ini integrations/pgsql.ini integrations/mssql.ini .PHONY: fmt fmt: @@ -204,6 +208,11 @@ generate-ini: -e 's|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \ -e 's|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \ integrations/pgsql.ini.tmpl > integrations/pgsql.ini + sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \ + -e 's|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \ + -e 's|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \ + -e 's|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \ + integrations/mssql.ini.tmpl > integrations/mssql.ini .PHONY: test-mysql test-mysql: integrations.test generate-ini @@ -213,6 +222,10 @@ test-mysql: integrations.test generate-ini test-pgsql: integrations.test generate-ini GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test +.PHONY: test-mssql +test-mssql: integrations.test generate-ini + GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test + .PHONY: bench-sqlite bench-sqlite: integrations.sqlite.test GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench . |