8236: Add comment to BogusActor.ping()
[arvados.git] / services / datamanager / collection / testing.go
index ac6e9cbfe9302f46151418ac34f72ccf92944083..223843372290f91cd58655f44eb1e404afe2127d 100644 (file)
@@ -17,22 +17,22 @@ type TestCollectionSpec struct {
 }
 
 // MakeTestReadCollections creates a ReadCollections object for testing
-// based on the give specs. Only the ReadAllCollections and UuidToCollection
+// based on the give specs. Only the ReadAllCollections and UUIDToCollection
 // fields are populated. To populate other fields call rc.Summarize().
 func MakeTestReadCollections(specs []TestCollectionSpec) (rc ReadCollections) {
        rc = ReadCollections{
                ReadAllCollections: true,
-               UuidToCollection:   map[string]Collection{},
+               UUIDToCollection:   map[string]Collection{},
        }
 
        for i, spec := range specs {
                c := Collection{
-                       Uuid:              fmt.Sprintf("col%d", i),
-                       OwnerUuid:         fmt.Sprintf("owner%d", i),
+                       UUID:              fmt.Sprintf("col%d", i),
+                       OwnerUUID:         fmt.Sprintf("owner%d", i),
                        ReplicationLevel:  spec.ReplicationLevel,
                        BlockDigestToSize: map[blockdigest.BlockDigest]int{},
                }
-               rc.UuidToCollection[c.Uuid] = c
+               rc.UUIDToCollection[c.UUID] = c
                for _, j := range spec.Blocks {
                        c.BlockDigestToSize[blockdigest.MakeTestBlockDigest(j)] = j
                }
@@ -52,10 +52,10 @@ func MakeTestReadCollections(specs []TestCollectionSpec) (rc ReadCollections) {
 // assigns an index to each collection.
 func (rc ReadCollections) CollectionIndicesForTesting() (indices []int) {
        // TODO(misha): Assert that rc.Summarize() has been called.
-       numCollections := len(rc.CollectionIndexToUuid)
+       numCollections := len(rc.CollectionIndexToUUID)
        indices = make([]int, numCollections)
        for i := 0; i < numCollections; i++ {
-               indices[i] = rc.CollectionUuidToIndex[fmt.Sprintf("col%d", i)]
+               indices[i] = rc.CollectionUUIDToIndex[fmt.Sprintf("col%d", i)]
        }
        return
 }