[ARVADOS] updated: 80689aac71f6e3e9b103f0f6b668bd173a76554f

Git user git at public.curoverse.com
Fri Feb 10 11:03:46 EST 2017


Summary of changes:
 sdk/go/arvados/collection.go               |   5 +-
 sdk/go/keepclient/collectionreader.go      |   6 +-
 sdk/go/keepclient/collectionreader_test.go |  10 +-
 sdk/go/manifest/manifest.go                | 340 +++++++++++++++++++++++++----
 sdk/go/manifest/manifest_test.go           | 126 ++++++++++-
 sdk/go/manifest/testdata/long_manifest     |   8 +-
 sdk/go/manifest/testdata/short_manifest    |   7 +-
 7 files changed, 434 insertions(+), 68 deletions(-)

       via  80689aac71f6e3e9b103f0f6b668bd173a76554f (commit)
       via  4ee34d218487d8b330147b185a2c9bcea8d68b09 (commit)
       via  d95e6df5184ab2ec137c8098b47caf9ebcf4e7d9 (commit)
       via  7b4c1b70b7d1ef4c977c57c89c4dc0f479e7e5ae (commit)
       via  4c081dd00f65f1e5a8e0cea34276d60ecbb49f40 (commit)
       via  2b297df85b61ac7f2ded512eca7c307d75b1cd8e (commit)
       via  5bf9312a5174f97f00db383836eb7666dc500293 (commit)
       via  2b7834020290b28d797333f90fcb87e5da67d616 (commit)
       via  ab6a70e86dd041f3b4da167c59e3e91309f14365 (commit)
      from  8e7c3b36efef6ef6590f4359eb48bf98826d71d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 80689aac71f6e3e9b103f0f6b668bd173a76554f
Merge: 8e7c3b3 4ee34d2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Feb 10 11:03:42 2017 -0500

    Merge branch '9397-go-manifest' refs #9397


commit 4ee34d218487d8b330147b185a2c9bcea8d68b09
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Feb 10 11:02:33 2017 -0500

    9397: Update comment & tests for CollectionFileReader to reflect it is more
    lenient in the paths it accepts as a result of updates to implementation of
    manifest.FileSegmentIterByName.

diff --git a/sdk/go/keepclient/collectionreader.go b/sdk/go/keepclient/collectionreader.go
index 61fabef..344a70c 100644
--- a/sdk/go/keepclient/collectionreader.go
+++ b/sdk/go/keepclient/collectionreader.go
@@ -35,9 +35,9 @@ const (
 // parameter when retrieving the collection record).
 var ErrNoManifest = errors.New("Collection has no manifest")
 
-// CollectionFileReader returns a Reader that reads file content from
-// a collection. The filename must be given relative to the root of
-// the collection, without a leading "./".
+// CollectionFileReader returns a Reader that reads content from a single file
+// in the collection. The filename must be relative to the root of the
+// collection.  A leading prefix of "/" or "./" in the filename is ignored.
 func (kc *KeepClient) CollectionFileReader(collection map[string]interface{}, filename string) (Reader, error) {
 	mText, ok := collection["manifest_text"].(string)
 	if !ok {
diff --git a/sdk/go/keepclient/collectionreader_test.go b/sdk/go/keepclient/collectionreader_test.go
index 7b2e94e..6e743f9 100644
--- a/sdk/go/keepclient/collectionreader_test.go
+++ b/sdk/go/keepclient/collectionreader_test.go
@@ -102,11 +102,11 @@ func (s *CollectionReaderUnit) TestCollectionReaderContent(c *check.C) {
 	for _, testCase := range []rdrTest{
 		{mt: mt, f: "zzzz", want: os.ErrNotExist},
 		{mt: mt, f: "frob", want: os.ErrNotExist},
-		{mt: mt, f: "/segmented/frob", want: os.ErrNotExist},
-		{mt: mt, f: "./segmented/frob", want: os.ErrNotExist},
-		{mt: mt, f: "/f", want: os.ErrNotExist},
-		{mt: mt, f: "./f", want: os.ErrNotExist},
-		{mt: mt, f: "foo bar//baz", want: os.ErrNotExist},
+		{mt: mt, f: "/segmented/frob", want: "frob"},
+		{mt: mt, f: "./segmented/frob", want: "frob"},
+		{mt: mt, f: "/f", want: "f"},
+		{mt: mt, f: "./f", want: "f"},
+		{mt: mt, f: "foo bar//baz", want: "foo"},
 		{mt: mt, f: "foo/zero", want: ""},
 		{mt: mt, f: "zero at 0", want: ""},
 		{mt: mt, f: "zero at 1", want: ""},

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list