Add docker containers to test services.

This commit initializes the needed services which are not mocked
so tests can be executed in any environment with docker.

Some default modifications (i.e: connection strings) were also made to
current tests to accomodate them for this setup.

A docker-compose.yml file is provided with all the necessary parameters
for this services to be initialized. Future services can be added
easily by extending this configuration file

In addition a makefile has been introduced to simplify command execution
This commit is contained in:
Marcos Lilljedahl
2015-07-06 01:46:43 -03:00
parent 1d8e6473c6
commit d545b197ea
7 changed files with 54 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ func TestPostgresqlGeneratesMetrics(t *testing.T) {
p := &Postgresql{
Servers: []*Server{
{
Address: "sslmode=disable",
Address: "host=localhost user=postgres sslmode=disable",
Databases: []string{"postgres"},
},
},
@@ -57,7 +57,7 @@ func TestPostgresqlTagsMetricsWithDatabaseName(t *testing.T) {
p := &Postgresql{
Servers: []*Server{
{
Address: "sslmode=disable",
Address: "host=localhost user=postgres sslmode=disable",
Databases: []string{"postgres"},
},
},
@@ -78,7 +78,7 @@ func TestPostgresqlDefaultsToAllDatabases(t *testing.T) {
p := &Postgresql{
Servers: []*Server{
{
Address: "sslmode=disable",
Address: "host=localhost user=postgres sslmode=disable",
},
},
}