Xorm is a simple and powerful ORM for Go.
This is the tests project for xorm.
Please add your test codes here if you want to pull request to xorm.
- 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
You can also use run_tests.sh
script:
./run_tests.sh <db> # e.g. mysql
Run all tests:
./run_tests.sh
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