Added postgres flags for testing and deps for cpanfile

This commit is contained in:
Tom Bloor 2017-09-26 17:03:27 +01:00
parent 5334d88a81
commit 65d509943c
2 changed files with 24 additions and 1 deletions

View file

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

View file

@ -22,7 +22,13 @@ requires 'Module::Runtime';
requires 'DBIx::Class::DeploymentHandler'; requires 'DBIx::Class::DeploymentHandler';
requires 'DBIx::Class::Fixtures'; requires 'DBIx::Class::Fixtures';
on 'schema-graph' => sub { feature 'schema-graph', 'Draw diagrams of Schema' => sub {
requires 'GraphViz'; requires 'GraphViz';
requires 'SQL::Translator'; requires 'SQL::Translator';
}; };
feature 'postgres', 'PostgreSQL Support' => sub {
requires 'DBD::Pg';
requires 'Test::PostgreSQL';
};