Skip to content

Commit

Permalink
chore: clean up README with docs folder
Browse files Browse the repository at this point in the history
This commit cleans up the project README and cleans up the message
printed by the `-help` flag.

Fixes #362.
Fixes #599.
Fixes #498.
Fixes #401.
  • Loading branch information
enocom committed Feb 26, 2021
1 parent d01d7eb commit 532675a
Show file tree
Hide file tree
Showing 5 changed files with 477 additions and 167 deletions.
16 changes: 16 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export GOOGLE_CLOUD_PROJECT="project-name"

export MYSQL_CONNECTION_NAME="project:region:instance"
export MYSQL_USER="mysql-user"
export MYSQL_PASS="mysql-password"
export MYSQL_DB="mysql-db-name"

export POSTGRES_CONNECTION_NAME="project:region:instance"
export POSTGRES_USER="postgres-user"
export POSTGRES_PASS="postgres-password"
export POSTGRES_DB="postgres-db-name"

export SQLSERVER_CONNECTION_NAME="project:region:instance"
export SQLSERVER_USER="sqlserver-user"
export SQLSERVER_PASS="sqlserver-password"
export SQLSERVER_DB="sqlserver-db-name"
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

## Table of contents
* [Opening an issue](#opening-an-issue)
* [How to run tests](#how-to-run-tests)
* [Contributor License Agreements](#contributor-license-agreements)
* [Contributor Code of Conduct](#contributor-code-of-conduct)

Expand Down Expand Up @@ -72,6 +73,50 @@ expect to be impacted, as well as its severity. As a rule of thumb:
</tr>
</table>

## How to run tests

The test suite includes both unit and integration tests. For macOS and Linux,
there is a depenency on [FUSE][] that must be present on the system.

### Test Dependencies

When running tests on macOS and Linux, users will need to first install
[FUSE][]. Windows users may skip this step.

On Debian, use:

```
sudo apt-get install fuse
```

On macOS, use:

```
brew install --cask osxfuse
```

### How to run just unit tests

```
go test -tags=skip_sqlserver,skip_mysql,skip_postgres ./...
```

### How to run all tests

To run all integration tests, users will need a Google Cloud project with a
MySQL, PostgreSQL, and SQL Server database. Note: Pull Requests will run these
tests and as a result may be skipped locally if necessary.

A sample `.envrc.example` file is included in the root directory which documents
which environment variables must be set to run the integration tests. Copy this
example file to `.envrc` at the root of the project, supply all the correct
values for each variable, source the file (`source .envrc`, or consider using
[direnv][]), and then run:

```
go test ./...
```

## Contributor License Agreements

Open-source software licensing is a wonderful arrangement that benefits
Expand Down Expand Up @@ -142,3 +187,6 @@ maintainers.
This Code of Conduct is adapted from the [Contributor
Covenant](http://contributor-covenant.org), version 1.2.0, available at
[http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

[FUSE]: https://www.kernel.org/doc/html/latest/filesystems/fuse.html
[direnv]: https://direnv.net/
Loading

0 comments on commit 532675a

Please sign in to comment.