use /login for smoke tests not register

1) A user needs an OL access token to load the beta - 5001dc48f1/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
This commit is contained in:
Henry Oswald 2017-11-21 10:43:24 +00:00
parent 154b03ab13
commit 7187f5ed67

View file

@ -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?