Skip to content

Commit 2ee50af

Browse files
authored
Merge pull request #82 from cipherstash/bug/fix-test-contamination
bug: fix test contamination
2 parents 972ca20 + 918130d commit 2ee50af

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ This will trigger the [Release EQL](https://github.com/cipherstash/encrypt-query
398398
## Developing
399399

400400
> [!IMPORTANT]
401-
> **Before you follow the quickstart* you need to have this software installed:
401+
> **Before you follow the quickstart** you need to have this software installed:
402402
> - [mise](https://mise.jdx.dev/) — see the [installing mise](#installing-mise) instructions
403403
> - [Docker](https://www.docker.com/) — see Docker's [documentation for installing](https://docs.docker.com/get-started/get-docker/)
404404

tasks/reset.sh

+3
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ fail_if_postgres_not_running
2626
# Uninstall
2727
cat release/cipherstash-encrypt-uninstall.sql | docker exec -i ${container_name} psql ${connection_url} -f-
2828

29+
# Wipe test data
30+
cat tests/999-wipe-test-data.sql | docker exec -i ${container_name} psql ${connection_url} -f-
31+
2932
# Install
3033
cat release/cipherstash-encrypt.sql | docker exec -i ${container_name} psql ${connection_url} -f-

tests/999-wipe-test-data.sql

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- !!! Only used during tests !!
2+
-- Fully clean out the database between test runs
3+
4+
DROP SCHEMA public CASCADE;
5+
CREATE SCHEMA public;
6+
GRANT ALL ON SCHEMA public TO postgres;
7+
GRANT ALL ON SCHEMA public TO public;

0 commit comments

Comments
 (0)