14812: First pass migrating tests.
[arvados.git] / lib / dispatchcloud / driver.go
index 8d09d6a530aae987b2c9d1b8dc34ff15d17fc40c..f1ae68c001b24e7c8c613db9680105b57889edb1 100644 (file)
@@ -153,7 +153,11 @@ func (is instrumentedInstanceSet) Create(it arvados.InstanceType, image cloud.Im
 func (is instrumentedInstanceSet) Instances(tags cloud.InstanceTags) ([]cloud.Instance, error) {
        instances, err := is.InstanceSet.Instances(tags)
        is.cv.WithLabelValues("List", boolLabelValue(err != nil)).Inc()
-       return instances, err
+       var instrumented []cloud.Instance
+       for _, i := range instances {
+               instrumented = append(instrumented, instrumentedInstance{i, is.cv})
+       }
+       return instrumented, err
 }
 
 type instrumentedInstance struct {