forked from bradfitz/go-sql-test
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
34 lines (24 loc) · 1.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This project is an integration test, testing various Go database
drivers (for the database/sql package).
To run these tests, in this directory, run:
$ go test -v
or, most of the time, skipping the annoyingly long tests:
$ go test -v -short
****************************************************************************
For MySQL:
****************************************************************************
mysqladmin -uroot -proot create gosqltest
To 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