10383: Added 2 tests to check that no resuming take place when using either --no...
[arvados.git] / services / datamanager / collection / collection.go
index c392ded35dc70968a8a844de0181cfc41457b120..05e7a5f2313d6b5a9138a90d7b1f9f7bfd2ad88c 100644 (file)
@@ -42,18 +42,18 @@ type ReadCollections struct {
 
 // GetCollectionsParams params
 type GetCollectionsParams struct {
-       Client    arvadosclient.ArvadosClient
+       Client    *arvadosclient.ArvadosClient
        Logger    *logger.Logger
        BatchSize int
 }
 
 // SdkCollectionInfo holds collection info from api
 type SdkCollectionInfo struct {
-       UUID         string    `json:"uuid"`
-       OwnerUUID    string    `json:"owner_uuid"`
-       Redundancy   int       `json:"redundancy"`
-       ModifiedAt   time.Time `json:"modified_at"`
-       ManifestText string    `json:"manifest_text"`
+       UUID               string    `json:"uuid"`
+       OwnerUUID          string    `json:"owner_uuid"`
+       ReplicationDesired int       `json:"replication_desired"`
+       ModifiedAt         time.Time `json:"modified_at"`
+       ManifestText       string    `json:"manifest_text"`
 }
 
 // SdkCollectionList lists collections from api
@@ -125,13 +125,13 @@ func GetCollections(params GetCollectionsParams) (results ReadCollections, err e
        fieldsWanted := []string{"manifest_text",
                "owner_uuid",
                "uuid",
-               "redundancy",
+               "replication_desired",
                "modified_at"}
 
        sdkParams := arvadosclient.Dict{
                "select":  fieldsWanted,
                "order":   []string{"modified_at ASC", "uuid ASC"},
-               "filters": [][]string{[]string{"modified_at", ">=", "1900-01-01T00:00:00Z"}},
+               "filters": [][]string{{"modified_at", ">=", "1900-01-01T00:00:00Z"}},
                "offset":  0}
 
        if params.BatchSize > 0 {
@@ -297,7 +297,7 @@ func ProcessCollections(arvLogger *logger.Logger,
        for _, sdkCollection := range receivedCollections {
                collection := Collection{UUID: StrCopy(sdkCollection.UUID),
                        OwnerUUID:         StrCopy(sdkCollection.OwnerUUID),
-                       ReplicationLevel:  sdkCollection.Redundancy,
+                       ReplicationLevel:  sdkCollection.ReplicationDesired,
                        BlockDigestToSize: make(map[blockdigest.BlockDigest]int)}
 
                if sdkCollection.ModifiedAt.IsZero() {