tests for xorm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Lunny Xiao 9281cea66f
fix bug
2 years ago
mssql Add `-port' command line option to tests 3 years ago
mymysql Add `-port' command line option to tests 3 years ago
mysql Add `-port' command line option to tests 3 years ago
oci8 Add `-port' command line option to tests 3 years ago
pgx updated tests for xorm builder branch 3 years ago
postgres added comment on postgres connection string 3 years ago
sqlite3 Add `-port' command line option to tests 3 years ago
testdata resolved #9 3 years ago
.gitignore Add db journal to .gitignore 3 years ago
README.md Add `run_tests_docker.sh' and update README 3 years ago
base.go move some tests to xorm repo 2 years ago
benchmark.bat move tests from xorm to seperated repository 5 years ago
benchmark.go improved tests 5 years ago
benchmark.sh move tests from xorm to seperated repository 5 years ago
cmdline.go Add `-port' command line option to tests 3 years ago
dynamic_path_test.sh remove echo 5 years ago
mssql.sh add test scripts 5 years ago
mymysql.sh add test scripts 5 years ago
mysql.sh add test scripts 5 years ago
oci8.sh add oci8 tests 4 years ago
pgx.sh updated tests for xorm builder branch 3 years ago
postgres.sh add test scripts 5 years ago
run_tests.sh tidy up tests to per test per folder 5 years ago
run_tests_docker.sh Add `run_tests_docker.sh' and update README 3 years ago
sqlite3.sh add test scripts 5 years ago
testCache.go more tests for testJson 3 years ago
testCascade.go more tests structure improvements 4 years ago
testCount.go ILogger interface changed 3 years ago
testCustomTypes.go mssql support 2 years ago
testDelete.go more tests for insert 3 years ago
testExec.go more tests about json 4 years ago
testExtends.go disable new extends feature for incompitable 3 years ago
testFind.go add tests for mor Find support 2 years ago
testForUpdate.go mssql support 2 years ago
testGet.go add tests for mor Find support 2 years ago
testID.go add tests for ID 2 years ago
testIn.go add tests for Find ints 2 years ago
testInsert.go tests for created 3 years ago
testIterate.go add limit test & add more test files 4 years ago
testJoin.go join parameters support & many comments 3 years ago
testJson.go more tests for testJson 3 years ago
testMeta.go bug fixed for postgres compile 3 years ago
testNullStruct.go fix bug 2 years ago
testProcessors.go Merge branch 'master' of github.com:go-xorm/tests 2 years ago
testQuery.go more tests about json 4 years ago
testSums.go added testSum for Sums methods 3 years ago
testTransaction.go add json test & bug fixed 4 years ago
testTypes.go Add test for pointers to type aliases 3 years ago
testUpdate.go improved tests 3 years ago
testVersion.go improved tests 3 years ago

README.md

xorm tests

Xorm is a simple and powerful ORM for Go.

Build Status Go Walker Bitdeli Badge

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