diff --git a/README.md b/README.md index 82d23dc5..ee77efda 100644 --- a/README.md +++ b/README.md @@ -398,7 +398,7 @@ This will trigger the [Release EQL](https://github.com/cipherstash/encrypt-query ## Developing > [!IMPORTANT] -> **Before you follow the quickstart* you need to have this software installed: +> **Before you follow the quickstart** you need to have this software installed: > - [mise](https://mise.jdx.dev/) — see the [installing mise](#installing-mise) instructions > - [Docker](https://www.docker.com/) — see Docker's [documentation for installing](https://docs.docker.com/get-started/get-docker/) diff --git a/tasks/reset.sh b/tasks/reset.sh index e128801c..2d6257e5 100755 --- a/tasks/reset.sh +++ b/tasks/reset.sh @@ -26,5 +26,8 @@ fail_if_postgres_not_running # Uninstall cat release/cipherstash-encrypt-uninstall.sql | docker exec -i ${container_name} psql ${connection_url} -f- +# Wipe test data +cat tests/999-wipe-test-data.sql | docker exec -i ${container_name} psql ${connection_url} -f- + # Install cat release/cipherstash-encrypt.sql | docker exec -i ${container_name} psql ${connection_url} -f- diff --git a/tests/999-wipe-test-data.sql b/tests/999-wipe-test-data.sql new file mode 100644 index 00000000..3fdf7003 --- /dev/null +++ b/tests/999-wipe-test-data.sql @@ -0,0 +1,7 @@ +-- !!! Only used during tests !! +-- Fully clean out the database between test runs + +DROP SCHEMA public CASCADE; +CREATE SCHEMA public; +GRANT ALL ON SCHEMA public TO postgres; +GRANT ALL ON SCHEMA public TO public;