[ARVADOS] created: a7c537fe1345a7a43edf5c08850358ee5f291f10

git at public.curoverse.com git at public.curoverse.com
Mon Aug 10 13:07:07 EDT 2015


        at  a7c537fe1345a7a43edf5c08850358ee5f291f10 (commit)


commit a7c537fe1345a7a43edf5c08850358ee5f291f10
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Aug 10 13:07:02 2015 -0400

    6827: Test logging handler with short token.

diff --git a/services/arv-git-httpd/server_test.go b/services/arv-git-httpd/server_test.go
index 77c4d3b..55bc6c4 100644
--- a/services/arv-git-httpd/server_test.go
+++ b/services/arv-git-httpd/server_test.go
@@ -80,7 +80,21 @@ func (s *IntegrationSuite) TestExpiredToken(c *check.C) {
 
 func (s *IntegrationSuite) TestInvalidToken(c *check.C) {
 	for _, repo := range []string{"active/foo.git", "active/foo/.git"} {
-		err := s.runGit(c, "no-such-token-in-the-system", "fetch", repo)
+		err := s.runGit(c, "s3cr3tp at ssw0rd", "fetch", repo)
+		c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`)
+	}
+}
+
+func (s *IntegrationSuite) TestShortToken(c *check.C) {
+	for _, repo := range []string{"active/foo.git", "active/foo/.git"} {
+		err := s.runGit(c, "s3cr3t", "fetch", repo)
+		c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`)
+	}
+}
+
+func (s *IntegrationSuite) TestShortTokenBadReq(c *check.C) {
+	for _, repo := range []string{"bogus.git"} {
+		err := s.runGit(c, "s3cr3t", "fetch", repo)
 		c.Assert(err, check.ErrorMatches, `.* 500 while accessing.*`)
 	}
 }

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list