Cloudish-sql is a local mock for testing applications that use Google Cloud SQL. It partially implements the Cloud SQL Admin API and includes a mTLS proxy suitable for proxying requests to a local database backend.
Cloudish-sql will typically be used in conjunction with a PostgreSQL or MySQL container. This is best achieved with a tool such as docker-compose.
version: "3.6"
services:
postgres:
image: postgres:11-alpine
environment:
POSTGRES_PASSWORD: "test1234"
cloudish-sql:
build: .
ports:
- "127.0.0.1:3307:3307"
- "127.0.0.1:8080:8080"
environment:
LOG_LEVEL: "INFO"
command:
- --db-address=postgres:5432
cloudish-sql
will persist database information across requests in a filesystem based store. So between tests you
will have to use unique ids or remove and restart the service.
- Go 1.16+
- Make
- golangci-lint v1.40+
- Additional Go tools:
To build cloudish-sql
, simply run make without any arguments.
The resulting binary will be written to: ./target/cloudish-sql
.
make
Before committing any code you should always lint and test your changes.
make lint
make test