[ARVADOS] updated: dd58da4e1b02dc85fead55f7a51736b300fff541

Git user git at public.curoverse.com
Tue Sep 26 13:58:13 EDT 2017


Summary of changes:
 services/crunch-run/crunchrun_test.go | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

       via  dd58da4e1b02dc85fead55f7a51736b300fff541 (commit)
      from  4076bfd8a058ad48e6f034dadb1d4876cefbf96a (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 dd58da4e1b02dc85fead55f7a51736b300fff541
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Sep 26 13:56:04 2017 -0400

    12287: Add number round-trip test.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/crunch-run/crunchrun_test.go b/services/crunch-run/crunchrun_test.go
index 37b9ae2..935c61a 100644
--- a/services/crunch-run/crunchrun_test.go
+++ b/services/crunch-run/crunchrun_test.go
@@ -54,6 +54,7 @@ type ArvTestClient struct {
 	Logs map[string]*bytes.Buffer
 	sync.Mutex
 	WasSetRunning bool
+	callraw       bool
 }
 
 type KeepTestClient struct {
@@ -221,7 +222,7 @@ func (client *ArvTestClient) Call(method, resourceType, uuid, action string, par
 func (client *ArvTestClient) CallRaw(method, resourceType, uuid, action string,
 	parameters arvadosclient.Dict) (reader io.ReadCloser, err error) {
 	var j []byte
-	if method == "GET" && resourceType == "containers" && action == "" {
+	if method == "GET" && resourceType == "containers" && action == "" && !client.callraw {
 		j, err = json.Marshal(client.Container)
 	} else {
 		j = []byte(`{
@@ -1612,3 +1613,13 @@ func (s *TestSuite) TestStderrMount(c *C) {
 
 	c.Check(api.CalledWith("collection.manifest_text", "./a b1946ac92492d2347c6235b4d2611184+6 0:6:out.txt\n./b 38af5c54926b620264ab1501150cf189+5 0:5:err.txt\n"), NotNil)
 }
+
+func (s *TestSuite) TestNumberRoundTrip(c *C) {
+	cr := NewContainerRunner(&ArvTestClient{callraw: true}, &KeepTestClient{}, nil, "zzzzz-zzzzz-zzzzzzzzzzzzzzz")
+	cr.fetchContainerRecord()
+
+	jsondata, err := json.Marshal(cr.Container.Mounts["/json"].Content)
+
+	c.Check(err, IsNil)
+	c.Check(string(jsondata), Equals, `{"number":123456789123456789}`)
+}

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list