[ARVADOS] updated: 1.3.0-1854-g4e03c16ce

Git user git at public.curoverse.com
Wed Nov 13 20:02:36 UTC 2019


Summary of changes:
 lib/controller/rpc/conn_test.go | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

       via  4e03c16ce84982605e8f5b2a56dd19ab0a11980c (commit)
      from  c00d9e1595d07e6941bb2fbfb8b4e57c3c4ba856 (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 4e03c16ce84982605e8f5b2a56dd19ab0a11980c
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Nov 13 15:02:09 2019 -0500

    15107: Add login-redirect test.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/lib/controller/rpc/conn_test.go b/lib/controller/rpc/conn_test.go
index 80e90a043..7a5403e93 100644
--- a/lib/controller/rpc/conn_test.go
+++ b/lib/controller/rpc/conn_test.go
@@ -36,10 +36,21 @@ func (s *RPCSuite) SetUpTest(c *check.C) {
 	ctx := ctxlog.Context(context.Background(), ctxlog.TestLogger(c))
 	s.ctx = context.WithValue(ctx, contextKeyTestTokens, []string{arvadostest.ActiveToken})
 	s.conn = NewConn("zzzzz", &url.URL{Scheme: "https", Host: os.Getenv("ARVADOS_TEST_API_HOST")}, true, func(ctx context.Context) ([]string, error) {
-		return ctx.Value(contextKeyTestTokens).([]string), nil
+		tokens, _ := ctx.Value(contextKeyTestTokens).([]string)
+		return tokens, nil
 	})
 }
 
+func (s *RPCSuite) TestLogin(c *check.C) {
+	s.ctx = context.Background()
+	opts := arvados.LoginOptions{
+		ReturnTo: "https://foo.example.com/bar",
+	}
+	resp, err := s.conn.Login(s.ctx, opts)
+	c.Check(err, check.IsNil)
+	c.Check(resp.RedirectLocation, check.Equals, "/auth/joshid?return_to="+url.QueryEscape(","+opts.ReturnTo))
+}
+
 func (s *RPCSuite) TestCollectionCreate(c *check.C) {
 	coll, err := s.conn.CollectionCreate(s.ctx, arvados.CreateOptions{Attrs: map[string]interface{}{
 		"owner_uuid":         arvadostest.ActiveUserUUID,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list