https://github.com/bradfitz/go-sql-test
test ALL the databases
https://github.com/bradfitz/go-sql-test
Last synced: 3 months ago
JSON representation
test ALL the databases
- Host: GitHub
- URL: https://github.com/bradfitz/go-sql-test
- Owner: bradfitz
- Created: 2012-01-11T21:39:49.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2019-04-01T16:47:29.000Z (about 6 years ago)
- Last Synced: 2025-03-08T22:42:48.456Z (3 months ago)
- Language: Go
- Homepage: http://code.google.com/p/go-sql-test/
- Size: 350 KB
- Stars: 132
- Watchers: 8
- Forks: 28
- Open Issues: 5
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This project is an integration test, testing various Go database
drivers (for the database/sql package).To run these tests, in this directory, run:
$ export GOPATH=$PWD
... ignoring your existing GOPATH. (This project imports all the 3rd
party drivers here, to make things easier to track, and to enable
local fixes while waiting for upstream.)Then:
$ cd src/sqltest
$ go test -vor, most of the time, skipping the annoyingly long tests:
$ go test -v -short
****************************************************************************
For MySQL:
****************************************************************************
mysqladmin -uroot -proot create gosqltestTo set set your MySQL user / password run:
$ export GOSQLTEST_MYSQL_USER=user
$ export GOSQLTEST_MYSQL_PASS=password****************************************************************************
For Postgres: (replacing "bradfitz" with $USER)
****************************************************************************
root@bradfitzlap:/home/bradfitz# su - postgres
postgres@bradfitzlap:~$ psql
postgres=# create database gosqltest;
CREATE DATABASE
postgres=# CREATE USER bradfitz WITH ENCRYPTED PASSWORD 'gosqltest';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE gosqltest to bradfitz;
GRANT****************************************************************************
For Oracle: (replacing "bradfitz" with $USER)
****************************************************************************
root@bradfitzlap:/home/bradfitz# service oracle-xe start
Iff you don't have a nice test database, then i.e.:
sqlplus /nolog <