Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.01 KB

README.md

File metadata and controls

50 lines (31 loc) · 2.01 KB

GORM Playground

GORM Playground can be used to play GORM and reports issues, if you encounter a bug in GORM, please report it at https://github.com/go-gorm/gorm/issues with the Playground Pull Request's link

test status

Quick Start

3. Setup test database
# install docker-compose https://docs.docker.com/compose/install/

# setup test databases
docker-compose up
4. Run tests with lastest GORM and all drivers
./test.sh

# Run tests with cached GORM and latest drivers
GORM_ENABLE_CACHE=true ./test.sh

# Run tests with specfied database
GORM_DIALECT=mysql go test
5. Modify tests and make it fail

Advanced Usage

We are using the following configuration run your code (GORM's latest master branch, latest database drivers: sqlite, mysql, postgres, sqlserver), you could change the configuration in file main_test.go

// GORM_REPO: https://github.com/go-gorm/gorm.git
// GORM_BRANCH: master
// TEST_DRIVERS: sqlite, mysql, postgres, sqlserver

We have prepared some structs with relationships in https://github.com/go-gorm/playground/blob/master/models.go that you can use for your tests

Happy Hacking!