diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..ad081f172 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +start-pg-docker: + @./start-pg-docker.sh + +stop-pg-docker: + @docker rm -f postgres || : + +test-regression: + @cd sql/tests/regression; ./run.sh + +test-unit: + @cd sql/tests/unit; ./run.sh + +test: test-regression test-unit + +.PHONY: start-pg-docker stop-pg-docker test test-regression test-unit diff --git a/README.md b/README.md new file mode 100644 index 000000000..e74ee05f4 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +### Running docker image + +To start the database, simply: +```bash +make start-pg-docker +``` +This will allow you to run the tests. When finished, +```bash +make stop-pg-docker +``` + +### Testing +There are three commands to run tests: (1) all tests, (2) regression tests, and +(3) unit tests. They are: +```bash +make test +make test-regression +make tests-unit +``` diff --git a/sql/tests/regression/create_clustered_db.sql b/sql/tests/regression/create_clustered_db.sql index 6f06987ee..b256ffa77 100644 --- a/sql/tests/regression/create_clustered_db.sql +++ b/sql/tests/regression/create_clustered_db.sql @@ -6,13 +6,13 @@ CREATE DATABASE "Test1"; CREATE DATABASE test2; \c meta -\ir ../../setup/load_common.sql -\ir ../../setup/load_meta.sql +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_meta.sql \c Test1 -\ir ../../setup/load_common.sql -\ir ../../setup/load_main.sql +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_main.sql \c test2 -\ir ../../setup/load_common.sql -\ir ../../setup/load_main.sql \ No newline at end of file +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_main.sql diff --git a/sql/tests/regression/idempotent_include.sql b/sql/tests/regression/idempotent_include.sql index e86f4380a..7ce07adc8 100644 --- a/sql/tests/regression/idempotent_include.sql +++ b/sql/tests/regression/idempotent_include.sql @@ -3,13 +3,13 @@ \ir create_clustered_db.sql \c meta -\ir ../../setup/load_common.sql -\ir ../../setup/load_meta.sql +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_meta.sql \c Test1 -\ir ../../setup/load_common.sql -\ir ../../setup/load_main.sql +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_main.sql \c test2 -\ir ../../setup/load_common.sql -\ir ../../setup/load_main.sql \ No newline at end of file +\ir ../../setup/sql/load_common.sql +\ir ../../setup/sql/load_main.sql diff --git a/sql/tests/regression/kafka.sql b/sql/tests/regression/kafka.sql index 17af10b8f..1915e2d6a 100644 --- a/sql/tests/regression/kafka.sql +++ b/sql/tests/regression/kafka.sql @@ -2,9 +2,9 @@ \ir create_clustered_db.sql \c Test1 -\ir ../../setup/load_kafka.sql +\ir ../../setup/sql/load_kafka.sql \c test2 -\ir ../../setup/load_kafka.sql +\ir ../../setup/sql/load_kafka.sql \set ECHO ALL \c meta @@ -34,8 +34,3 @@ SELECT * FROM kafka_set_next_offset('topic', 0::SMALLINT, 100, 101); \c Test1 SELECT * FROM kafka_get_start_and_next_offset('topic', 0::SMALLINT, 0); SELECT * FROM kafka_offset_local; - - - - -