From 65d509943c0158370166cd5b2e3420356d501a76 Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Tue, 26 Sep 2017 17:03:27 +0100 Subject: [PATCH] Added postgres flags for testing and deps for cpanfile --- README.md | 17 +++++++++++++++++ cpanfile | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e5b7851..61360c8 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,20 @@ *Master:* [![Build Status](https://travis-ci.org/Pear-Trading/Foodloop-Server.svg?branch=master)](https://travis-ci.org/Pear-Trading/Foodloop-Server) *Development:* [![Build Status](https://travis-ci.org/Pear-Trading/Foodloop-Server.svg?branch=development)](https://travis-ci.org/Pear-Trading/Foodloop-Server) + +# Testing + +To run the main test framework, first install all the dependencies, then run the tests: + +``` +cpanm --installdeps . +prove -lr +``` + +To run the main framework against a PostgreSQL backend, assuming you have postgres installed, you will need some extra dependencies first: + +``` +cpanm --installdeps . --with-feature postgres +PEAR_TEST_PG=1 prove -lr +``` + diff --git a/cpanfile b/cpanfile index e38cdc8..1354e62 100644 --- a/cpanfile +++ b/cpanfile @@ -22,7 +22,13 @@ requires 'Module::Runtime'; requires 'DBIx::Class::DeploymentHandler'; requires 'DBIx::Class::Fixtures'; -on 'schema-graph' => sub { +feature 'schema-graph', 'Draw diagrams of Schema' => sub { requires 'GraphViz'; requires 'SQL::Translator'; }; + +feature 'postgres', 'PostgreSQL Support' => sub { + requires 'DBD::Pg'; + requires 'Test::PostgreSQL'; +}; +