Kaynağa Gözat

use /login for smoke tests not register

1) A user needs an OL access token to load the beta - https://github.com/sharelatex/overleaf-integration-web-module/blob/5001dc48f15ca557bab8689f50b6ac28f30db66a/app/coffee/OAuth/OAuthRequest.coffee#L8

2) If a user has an OL access token they can not use the register endpoint on ShareLaTeX.  https://github.com/sharelatex/web-sharelatex-modules/blob/master/public-registration/app/coffee/PublicRegistrationController.coffee#L72
Henry Oswald 9 yıl önce
ebeveyn
işleme
7187f5ed67

+ 4 - 4
services/web/test/smoke/coffee/SmokeTests.coffee

@@ -33,9 +33,9 @@ describe "Opening", ->
 				return done(err)
 			logger.log "smoke test: clearing rate limit "
 			require("../../../app/js/infrastructure/RateLimiter.js").clearRateLimit "open-project", "#{Settings.smokeTest.projectId}:#{Settings.smokeTest.userId}", ->
-				logger.log "smoke test: hitting /register"
+				logger.log "smoke test: hitting /login"
 				command =  """
-					curl -H  "X-Forwarded-Proto: https" -c #{cookeFilePath} #{buildUrl('register')}
+					curl -H  "X-Forwarded-Proto: https" -c #{cookeFilePath} #{buildUrl('login')}
 				"""
 				child.exec command, (err, stdout, stderr)->
 					if err? then done(err)
@@ -47,9 +47,9 @@ describe "Opening", ->
 					logger.log "smoke test: converting cookie file 1"
 					convertCookieFile (err) ->
 						return done(err) if err?
-						logger.log "smoke test: hitting /register with csrf"
+						logger.log "smoke test: hitting /login with csrf"
 						command = """
-							curl -c #{cookeFilePath} -H "Content-Type: application/json" -H "X-Forwarded-Proto: https" -d '{"_csrf":"#{csrf}", "email":"#{Settings.smokeTest.user}", "password":"#{Settings.smokeTest.password}"}' #{buildUrl('register')}
+							curl -c #{cookeFilePath} -H "Content-Type: application/json" -H "X-Forwarded-Proto: https" -d '{"_csrf":"#{csrf}", "email":"#{Settings.smokeTest.user}", "password":"#{Settings.smokeTest.password}"}' #{buildUrl('login')}
 						"""
 						child.exec command, (err) ->
 							return done(err) if err?