Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deleting DBs in test for PSQL and document setup #40

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions go-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Once the proving keys and verification keys are generated, set the following env
- `CIRCUITS_ROOT`: the folder that contains the WASM runtime for the circuits that are generated by the circom compiler. If you do not want to compile the circtuis yourself, a copy of them are included in the `js/lib` folder
- `PROVING_KEYS_ROOT`: the folder that contains the proving keys and verification keys

Note: you need to be running a postgres database locally before running the tests, you can run it in Docker with:
```console
docker run -d --name postgres -e POSTGRES_PASSWORD=my-secret -p 5432:5432 postgres
```

```console
$ go test -v ./integration-test/
=== RUN TestZeto_1_SuccessfulProving
Expand Down
5 changes: 3 additions & 2 deletions go-sdk/integration-test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,9 @@ func TestPostgresStorage(t *testing.T) {
assert.NoError(t, err)

defer func() {
db.Exec("DROP TABLE " + core.TreeRootsTable)
db.Exec("DROP TABLE " + core.NodesTablePrefix + "test_1")
// Table name needs to be wrapped in quotes if not it will be lowercased
db.Exec("DROP TABLE " + "\"" + core.TreeRootsTable + "\"")
db.Exec("DROP TABLE " + "\"" + core.NodesTablePrefix + "test_1\"")
EnriqueL8 marked this conversation as resolved.
Show resolved Hide resolved
}()

provider := &testSqlProvider{db: db}
Expand Down
Loading