@@ -129,6 +129,7 @@ func TestCollector_Collect(t *testing.T) {
129129 Engine : aws .String ("postgres" ),
130130 DBInstanceIdentifier : aws .String ("test-db" ),
131131 MultiAZ : aws .Bool (false ),
132+ DbiResourceId : aws .String ("test-db" ),
132133 }},
133134 pricingKey : createPricingKey ("us-east-1" , "db.t3.medium" , "postgres" , "Single-AZ" , "AWS Region" ),
134135 },
@@ -149,6 +150,7 @@ func TestCollector_Collect(t *testing.T) {
149150 Engine : aws .String ("mysql" ),
150151 DBInstanceIdentifier : aws .String ("test-db-2" ),
151152 MultiAZ : aws .Bool (false ),
153+ DbiResourceId : aws .String ("test-db-2" ),
152154 }},
153155 pricingKey : cacheKey ,
154156 },
@@ -203,7 +205,7 @@ func TestCollector_Collect(t *testing.T) {
203205 labels := metricResult .Labels
204206 hourlyPrice , _ := c .pricingMap .Get (tt .pricingKey )
205207 assert .Equal (t , * tt .ListRDSInstances [0 ].DBInstanceClass , labels ["tier" ])
206- assert .Equal (t , * tt .ListRDSInstances [0 ].DBInstanceIdentifier , labels ["name " ])
208+ assert .Equal (t , * tt .ListRDSInstances [0 ].DBInstanceIdentifier , labels ["id " ])
207209 assert .Equal (t , hourlyPrice , metricResult .Value )
208210 default :
209211 t .Fatal ("expected a metric to be collected" )
0 commit comments