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 3f7773b930
update dependency packages
6 days ago
mssql update dependency packages 6 days ago
mymysql update dependency packages 6 days ago
mysql update dependency packages 6 days ago
oci8 update dependency packages 6 days ago
pgx update dependency packages 6 days ago
postgres update dependency packages 6 days ago
sqlite3 update dependency packages 6 days ago
testdata resolved #9 3 years ago
.gitignore Add db journal to .gitignore 3 years ago
README.md update dependency packages 6 days ago
base.go update dependency packages 6 days ago
benchmark.bat move tests from xorm to seperated repository 5 years ago
benchmark.go update dependency packages 6 days 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
go.mod update dependency packages 6 days ago
go.sum update dependency packages 6 days 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 update dependency packages 6 days ago
testCascade.go update dependency packages 6 days ago
testCount.go update dependency packages 6 days ago
testCustomTypes.go update dependency packages 6 days ago
testDelete.go update dependency packages 6 days ago
testExec.go update dependency packages 6 days ago
testExtends.go update dependency packages 6 days ago
testFind.go update dependency packages 6 days ago
testForUpdate.go update dependency packages 6 days ago
testGet.go update dependency packages 6 days ago
testID.go update dependency packages 6 days ago
testIn.go update dependency packages 6 days ago
testInsert.go update dependency packages 6 days ago
testIterate.go update dependency packages 6 days ago
testJoin.go update dependency packages 6 days ago
testJson.go update dependency packages 6 days ago
testMeta.go update dependency packages 6 days ago
testNullStruct.go update dependency packages 6 days ago
testProcessors.go update dependency packages 6 days ago
testQuery.go update dependency packages 6 days ago
testSums.go update dependency packages 6 days ago
testTransaction.go update dependency packages 6 days ago
testTypes.go update dependency packages 6 days ago
testUpdate.go update dependency packages 6 days ago
testVersion.go update dependency packages 6 days ago

README.md

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