[ARVADOS] updated: 2.1.0-1078-g0f2573742

Git user git at public.arvados.org
Mon Jul 19 19:28:27 UTC 2021


Summary of changes:
 lib/controller/localdb/login_oidc_test.go | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

       via  0f25737426b76ac41c9e69226cf322842b793933 (commit)
      from  b13e32f7df598fcf027a9f126f180b9d66be8c17 (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 0f25737426b76ac41c9e69226cf322842b793933
Author: Nico Cesar <nico at nicocesar.com>
Date:   Mon Jul 19 15:22:46 2021 -0400

    Addressing note 11
    
    >  In the interest of reducing redundant tests: It looks like if we change Given/Family names to {"Fake", "User Name"} in SetUpTest, and update TestGoogleLogin_Success accordingly, then we wouldn't even need a separate TestGoogleLogin_OIDCClamisWithGivenNames test to check the normal case, and the old/renamed OIDCNameWithoutGivenAndFamilyNames test would check the case where we fall back to splitting on whitespace.
    
    Arvados-DCO-1.1-Signed-off-by: Nico Cesar <nico at curii.com>

diff --git a/lib/controller/localdb/login_oidc_test.go b/lib/controller/localdb/login_oidc_test.go
index f5b7e2e91..1e7c09a6e 100644
--- a/lib/controller/localdb/login_oidc_test.go
+++ b/lib/controller/localdb/login_oidc_test.go
@@ -51,20 +51,13 @@ func (s *OIDCLoginSuite) TearDownSuite(c *check.C) {
 	c.Check(arvados.NewClientFromEnv().RequestAndDecode(nil, "POST", "database/reset", nil, nil), check.IsNil)
 }
 
-// TODO: In the interest of reducing redundant tests: It looks like if we change
-// Given/Family names to {"Fake", "User Name"} in SetUpTest, and update
-// TestGoogleLogin_Success accordingly, then we wouldn't even need a separate
-// TestGoogleLogin_OIDCClamisWithGivenNames test to check the normal case, and
-// the old/renamed OIDCNameWithoutGivenAndFamilyNames test would check the case
-// where we fall back to splitting on whitespace.
-
 func (s *OIDCLoginSuite) SetUpTest(c *check.C) {
 	s.fakeProvider = arvadostest.NewOIDCProvider(c)
 	s.fakeProvider.AuthEmail = "active-user at arvados.local"
 	s.fakeProvider.AuthEmailVerified = true
 	s.fakeProvider.AuthName = "Fake User Name"
-	s.fakeProvider.AuthGivenName = "Fake User"
-	s.fakeProvider.AuthFamilyName = "Name"
+	s.fakeProvider.AuthGivenName = "Fake"
+	s.fakeProvider.AuthFamilyName = "User Name"
 	s.fakeProvider.ValidCode = fmt.Sprintf("abcdefgh-%d", time.Now().Unix())
 	s.fakeProvider.PeopleAPIResponse = map[string]interface{}{}
 
@@ -430,8 +423,8 @@ func (s *OIDCLoginSuite) TestGoogleLogin_Success(c *check.C) {
 	c.Check(token, check.Matches, `v2/zzzzz-gj3su-.{15}/.{32,50}`)
 
 	authinfo := getCallbackAuthInfo(c, s.railsSpy)
-	c.Check(authinfo.FirstName, check.Equals, "Fake User")
-	c.Check(authinfo.LastName, check.Equals, "Name")
+	c.Check(authinfo.FirstName, check.Equals, "Fake")
+	c.Check(authinfo.LastName, check.Equals, "User Name")
 	c.Check(authinfo.Email, check.Equals, "active-user at arvados.local")
 	c.Check(authinfo.AlternateEmails, check.HasLen, 0)
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list