tests for xorm
This repository has been archived on 2020-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2020-04-12 23:09:41 +08:00
mssql update dependency packages 2019-11-13 14:22:08 +08:00
mymysql update dependency packages 2019-11-13 14:22:08 +08:00
mysql upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
oci8 upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
pgx upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
postgres upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
sqlite3 upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testdata resolved #9 2016-03-22 13:43:22 +08:00
.gitignore Add db journal to .gitignore 2016-04-28 13:25:19 +03:00
base.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
benchmark.bat move tests from xorm to seperated repository 2014-04-11 17:08:01 +08:00
benchmark.go update dependency packages 2019-11-13 14:22:08 +08:00
benchmark.sh move tests from xorm to seperated repository 2014-04-11 17:08:01 +08:00
cmdline.go Add `-port' command line option to tests 2016-05-12 22:06:16 +03:00
dynamic_path_test.sh remove echo 2014-08-11 20:03:58 +08:00
go.mod upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
go.sum upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
mssql.sh add test scripts 2014-08-07 01:51:59 +08:00
mymysql.sh add test scripts 2014-08-07 01:51:59 +08:00
mysql.sh add test scripts 2014-08-07 01:51:59 +08:00
oci8.sh add oci8 tests 2015-02-28 15:46:51 +08:00
pgx.sh updated tests for xorm builder branch 2016-09-17 20:14:22 +08:00
postgres.sh add test scripts 2014-08-07 01:51:59 +08:00
README.md update dependency packages 2019-11-13 14:22:08 +08:00
run_tests_docker.sh Add `run_tests_docker.sh' and update README 2016-05-12 23:09:34 +03:00
run_tests.sh tidy up tests to per test per folder 2014-04-17 18:14:20 +08:00
sqlite3.sh add test scripts 2014-08-07 01:51:59 +08:00
testCache.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testCascade.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testCount.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testCustomTypes.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testDelete.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testExec.go update dependency packages 2019-11-13 14:22:08 +08:00
testExtends.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testFind.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testForUpdate.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testGet.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testID.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testIn.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testInsert.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testIterate.go update dependency packages 2019-11-13 14:22:08 +08:00
testJoin.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testJson.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testMeta.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testNullStruct.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testProcessors.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testQuery.go update dependency packages 2019-11-13 14:22:08 +08:00
testSums.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testTransaction.go update dependency packages 2019-11-13 14:22:08 +08:00
testTypes.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testUpdate.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00
testVersion.go upgrade to xorm v1.0.1 2020-04-12 23:09:41 +08:00

xorm tests

Xorm is a simple and powerful ORM for Go.

Build Status Go Doc

This is the tests project for xorm.

Please add your test codes here if you want to pull request to xorm.

How to run the tests

  • test sqlite
./sqlite3.sh
  • test mysql or mymysql

Create empty databases xorm_test, xorm_test1, xorm_test2, xorm_test3 on your mysql server and make an account root, and let passwd empty on localhost, and then run:

./mysql.sh
./mymysql.sh
  • test postgres

Create empty database xorm_test on your postgres and and let passwd empty for default account on localhost, and then run:

./postgres.sh

Running tests by name

You can also use run_tests.sh script:

./run_tests.sh <db>  # e.g. mysql

Run all tests:

./run_tests.sh

Running tests using docker

You can also use run_tests_docker.sh script that will pull and run preconfigured images with database engines, and run tests on them. With this approach, you don't need to configure anything, just install docker and run the script.

Run specific test:

./run_tests_docker.sh <db>  # e.g. mysql

Run specific test with given database version:

./run_tests_docker.sh <db>:<version>  # e.g. mysql:5.5

Run all tests:

./run_tests_docker.sh