@@ -20,10 +20,10 @@ import (
2020
2121const (
2222 // docker-compose service names
23- serviceNameNRI = "nri-postgresql"
24- serviceNamePostgres90 = "postgres-9-0"
25- serviceNamePostgres91 = "postgres-9-1"
26- serviceNamePostgres92Onwards = "postgres-9-2-onwards "
23+ serviceNameNRI = "nri-postgresql"
24+ serviceNamePostgres90 = "postgres-9-0"
25+ serviceNamePostgres91 = "postgres-9-1"
26+ serviceNamePostgresLatest = "postgres-latest-supported "
2727)
2828
2929func executeDockerCompose (serviceName string , envVars []string ) (string , string , error ) {
@@ -66,27 +66,27 @@ func TestSuccessConnection(t *testing.T) {
6666 EnvVars []string
6767 }{
6868 {
69- Name : "Testing Metrics for Postgres v9.0x" ,
69+ Name : "Testing Metrics and inventory for Postgres v9.0x" ,
7070 Hostname : serviceNamePostgres90 ,
7171 Schema : "jsonschema90.json" ,
72- EnvVars : []string {"METRIC=true" },
72+ EnvVars : []string {},
7373 },
7474 {
75- Name : "Testing Metrics for Postgres v9.1x" ,
75+ Name : "Testing Metrics and inventory for Postgres v9.1x" ,
7676 Hostname : serviceNamePostgres91 ,
7777 Schema : "jsonschema91.json" ,
78- EnvVars : []string {"METRIC=true" },
78+ EnvVars : []string {},
7979 },
8080 {
81- Name : "Testing Metrics for Postgres v9.2x + " ,
82- Hostname : serviceNamePostgres92Onwards ,
83- Schema : "jsonschema92 .json" ,
84- EnvVars : []string {"METRIC=true" },
81+ Name : "Testing Metrics and inventory for latest Postgres supported version " ,
82+ Hostname : serviceNamePostgresLatest ,
83+ Schema : "jsonschema-latest .json" ,
84+ EnvVars : []string {},
8585 },
8686 {
87- Name : "Testing Postgres Inventory " ,
88- Hostname : serviceNamePostgres92Onwards ,
89- Schema : "jsonschema-inventory.json" ,
87+ Name : "Inventory only for latest Postgres supported version " ,
88+ Hostname : serviceNamePostgresLatest ,
89+ Schema : "jsonschema-inventory-latest .json" ,
9090 EnvVars : []string {"INVENTORY=true" },
9191 },
9292 }
@@ -111,7 +111,7 @@ func TestSuccessConnection(t *testing.T) {
111111
112112func TestMissingRequiredVars (t * testing.T ) {
113113 envVars := []string {
114- "HOSTNAME=" + serviceNamePostgres92Onwards ,
114+ "HOSTNAME=" + serviceNamePostgresLatest ,
115115 "DATABASE=demo" ,
116116 }
117117 _ , stderr , err := executeDockerCompose (serviceNameNRI , envVars )
@@ -121,7 +121,7 @@ func TestMissingRequiredVars(t *testing.T) {
121121
122122func TestIgnoringDB (t * testing.T ) {
123123 envVars := []string {
124- "HOSTNAME=" + serviceNamePostgres92Onwards ,
124+ "HOSTNAME=" + serviceNamePostgresLatest ,
125125 "USERNAME=postgres" ,
126126 "PASSWORD=example" ,
127127 "DATABASE=demo" ,
0 commit comments