# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

PYTHONPATH := ../../

.PHONY: test test-setup

test-setup:
	dropdb dbsamizdat_test
	createdb dbsamizdat_test
	psql --quiet --single-transaction --file fruit_and_pets.sql dbsamizdat_test

test:
	./dbsamizdat-cli.py sync postgresql:///dbsamizdat_test fruit_and_pets.test_samizdats
	./dbsamizdat-cli.py diff postgresql:///dbsamizdat_test fruit_and_pets/test_samizdats.py
