mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #143 from sharelatex/ho-login-smoke-tests
use /login for smoke tests not register
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user