inputs = deDuplicate(inputs)
if len(inputs) < 1 {
- logger.Errorf("Error: no collections provided\n")
+ logger.Errorf("Error: no collections provided")
flags.Usage()
return 2, inputs
}
// Arvados Client setup
arv, err := arvadosclient.MakeArvadosClient()
if err != nil {
- logger.Errorf("Error creating Arvados object: %s\n", err)
+ logger.Errorf("Error creating Arvados object: %s", err)
exitcode = 1
return
}
uuid = input
}
if !strings.Contains(uuid, "-4zz18-") {
- logger.Errorf("Error: uuid must refer to collection object\n")
+ logger.Errorf("Error: uuid must refer to collection object")
exitcode = 1
return
}
var collection arvados.Collection
err = arv.Get("collections", uuid, nil, &collection)
if err != nil {
- logger.Errorf("Error: unable to retrieve collection: %s\n", err)
+ logger.Errorf("Error: unable to retrieve collection: %s", err)
exitcode = 1
return
}
blocks[uuid] = make(map[string]int)
blocks[uuid] = blockList(collection)
if pdh != "" && collection.PortableDataHash != pdh {
- logger.Errorf("Error: the collection with UUID %s has PDH %s, but a different PDH was provided in the arguments: %s\n", uuid, collection.PortableDataHash, pdh)
+ logger.Errorf("Error: the collection with UUID %s has PDH %s, but a different PDH was provided in the arguments: %s", uuid, collection.PortableDataHash, pdh)
exitcode = 1
return
}
// Run dedupreport with 2 identical uuids
exitcode := Command.RunCommand("deduplicationreport.test", []string{arvadostest.FooCollection, arvadostest.FooCollection}, &bytes.Buffer{}, &stdout, &stderr)
c.Check(exitcode, check.Equals, 0)
- //c.Check(stdout.String(), check.Equals, "")
c.Check(stdout.String(), check.Matches, "(?ms).*Collections:[[:space:]]+1.*")
c.Check(stdout.String(), check.Matches, "(?ms).*Nominal size of stored data:[[:space:]]+3 bytes \\(3 B\\).*")
c.Check(stdout.String(), check.Matches, "(?ms).*Actual size of stored data:[[:space:]]+3 bytes \\(3 B\\).*")