mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #8951 from meteor/abernix/clear-password-on-retry
Clear credentials before retry on initial `meteor deploy` password failure.
This commit is contained in:
@@ -508,6 +508,7 @@ var doInteractivePasswordLogin = function (options) {
|
||||
} else {
|
||||
loginFailed();
|
||||
if (options.retry) {
|
||||
delete loginData.password;
|
||||
Console.error();
|
||||
continue;
|
||||
} else {
|
||||
|
||||
@@ -122,3 +122,34 @@ selftest.define("login", ['net'], function () {
|
||||
run.matchErr("Login failed");
|
||||
run.expectExit(1);
|
||||
});
|
||||
|
||||
// This is a Galaxy-related command (deploy), but still pretty auth-y.
|
||||
selftest.define("login on deploy", ['net'], function () {
|
||||
const s = new Sandbox;
|
||||
|
||||
const appName = testUtils.randomAppName();
|
||||
|
||||
s.createApp(appName, "standard-app");
|
||||
s.cd(appName);
|
||||
|
||||
let run = s.run("deploy", appName);
|
||||
run.matchErr(/You must be logged in to deploy/);
|
||||
|
||||
run.matchErr("Email:");
|
||||
run.write("test@test.com\n");
|
||||
|
||||
run.matchErr("Logging in as test.");
|
||||
|
||||
run.matchErr("Password:");
|
||||
run.write("SoVeryWrong\n");
|
||||
run.waitSecs(commandTimeoutSecs);
|
||||
run.matchErr("Login failed");
|
||||
|
||||
run.matchErr("Password:");
|
||||
run.write("testtest\n");
|
||||
run.waitSecs(commandTimeoutSecs);
|
||||
run.match("Talking to Galaxy servers");
|
||||
|
||||
// "test" user can't actually deploy, so it will still fail.
|
||||
run.expectExit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user