[ARVADOS] updated: 4517ed5d2c28870422faf8057d4f6708242cc5a0

git at public.curoverse.com git at public.curoverse.com
Sat Nov 7 09:27:49 EST 2015


Summary of changes:
 sdk/go/arvadosclient/arvadosclient_test.go | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

       via  4517ed5d2c28870422faf8057d4f6708242cc5a0 (commit)
      from  3ded4c192b1fc655d9fffa225f792055f10f78c9 (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 4517ed5d2c28870422faf8057d4f6708242cc5a0
Author: radhika <radhika at curoverse.com>
Date:   Sat Nov 7 09:25:48 2015 -0500

    5538: update the test to set resp.body with the given string from stub than hard code it (overlooked in previous commit)

diff --git a/sdk/go/arvadosclient/arvadosclient_test.go b/sdk/go/arvadosclient/arvadosclient_test.go
index bc88c44..3746ad0 100644
--- a/sdk/go/arvadosclient/arvadosclient_test.go
+++ b/sdk/go/arvadosclient/arvadosclient_test.go
@@ -250,18 +250,6 @@ func RunFakeArvadosServer(st http.Handler) (api APIServer, err error) {
 	return
 }
 
-func (h *APIStub) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
-	resp.WriteHeader(h.respStatus[h.count])
-
-	if h.respStatus[h.count] == 200 {
-		resp.Write([]byte(`{"ok":"ok"}`))
-	} else {
-		resp.Write([]byte(``))
-	}
-
-	h.count++
-}
-
 type APIStub struct {
 	method       string
 	count        int
@@ -270,6 +258,12 @@ type APIStub struct {
 	responseBody []string
 }
 
+func (h *APIStub) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
+	resp.WriteHeader(h.respStatus[h.count])
+	resp.Write([]byte(h.responseBody[h.count]))
+	h.count++
+}
+
 func (s *MockArvadosServerSuite) TestWithRetries(c *C) {
 	for _, stub := range []APIStub{
 		{

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list