Fix regression test file. Add Makefile and README

This commit is contained in:
Rob Kiefer 2016-11-02 14:38:01 -04:00
parent 29c4556402
commit 416cc1c041
5 changed files with 48 additions and 19 deletions

15
Makefile Normal file
View File

@ -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

19
README.md Normal file
View File

@ -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
```

View File

@ -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
\ir ../../setup/sql/load_common.sql
\ir ../../setup/sql/load_main.sql

View File

@ -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
\ir ../../setup/sql/load_common.sql
\ir ../../setup/sql/load_main.sql

View File

@ -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;