@@ -20,10 +20,10 @@ import (
20
20
21
21
const (
22
22
// 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 "
27
27
)
28
28
29
29
func executeDockerCompose (serviceName string , envVars []string ) (string , string , error ) {
@@ -66,27 +66,27 @@ func TestSuccessConnection(t *testing.T) {
66
66
EnvVars []string
67
67
}{
68
68
{
69
- Name : "Testing Metrics for Postgres v9.0x" ,
69
+ Name : "Testing Metrics and inventory for Postgres v9.0x" ,
70
70
Hostname : serviceNamePostgres90 ,
71
71
Schema : "jsonschema90.json" ,
72
- EnvVars : []string {"METRIC=true" },
72
+ EnvVars : []string {},
73
73
},
74
74
{
75
- Name : "Testing Metrics for Postgres v9.1x" ,
75
+ Name : "Testing Metrics and inventory for Postgres v9.1x" ,
76
76
Hostname : serviceNamePostgres91 ,
77
77
Schema : "jsonschema91.json" ,
78
- EnvVars : []string {"METRIC=true" },
78
+ EnvVars : []string {},
79
79
},
80
80
{
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 {},
85
85
},
86
86
{
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" ,
90
90
EnvVars : []string {"INVENTORY=true" },
91
91
},
92
92
}
@@ -111,7 +111,7 @@ func TestSuccessConnection(t *testing.T) {
111
111
112
112
func TestMissingRequiredVars (t * testing.T ) {
113
113
envVars := []string {
114
- "HOSTNAME=" + serviceNamePostgres92Onwards ,
114
+ "HOSTNAME=" + serviceNamePostgresLatest ,
115
115
"DATABASE=demo" ,
116
116
}
117
117
_ , stderr , err := executeDockerCompose (serviceNameNRI , envVars )
@@ -121,7 +121,7 @@ func TestMissingRequiredVars(t *testing.T) {
121
121
122
122
func TestIgnoringDB (t * testing.T ) {
123
123
envVars := []string {
124
- "HOSTNAME=" + serviceNamePostgres92Onwards ,
124
+ "HOSTNAME=" + serviceNamePostgresLatest ,
125
125
"USERNAME=postgres" ,
126
126
"PASSWORD=example" ,
127
127
"DATABASE=demo" ,
0 commit comments