Merge ~seb128/ubuntu-manual-tests:ask-login-password into ubuntu-manual-tests:main

Proposed by Sebastien Bacher
Status: Merged
Merged at revision: a717ab543323c79bceeedde6faa0418a793c2aec
Proposed branch: ~seb128/ubuntu-manual-tests:ask-login-password
Merge into: ubuntu-manual-tests:main
Diff against target: 34 lines (+16/-0)
1 file modified
tools/qa_tracker_update.pl (+16/-0)
Reviewer Review Type Date Requested Status
Paride Legovini Approve
Review via email: mp+431757@code.launchpad.net

Description of the change

Prompt for login and password if those aren't set in the source

It introduces a new depends on libterm-readkey-perl which is used to not display the password being typed

To post a comment you must log in.
Revision history for this message
Paride Legovini (paride) wrote :

LGTM, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/qa_tracker_update.pl b/tools/qa_tracker_update.pl
2index 6448c67..5c49669 100644
3--- a/tools/qa_tracker_update.pl
4+++ b/tools/qa_tracker_update.pl
5@@ -11,6 +11,7 @@ use Encode;
6 use File::Path;
7 use File::Basename;
8 use Data::Dumper;
9+use Term::ReadKey;
10
11 my $mech = WWW::Mechanize->new();
12
13@@ -103,6 +104,21 @@ sub login {
14 # print Dumper( $mech->current_form() );
15 # }
16
17+ if ($email eq "") {
18+ print "Enter your Ubuntu One email: ";
19+ $email = <STDIN>;
20+ chomp $email;
21+ }
22+
23+ if ($password eq "") {
24+ print "Enter your Ubuntu One password: ";
25+ ReadMode('noecho');
26+ $password = <STDIN>;
27+ chomp $password;
28+ ReadMode('normal');
29+ print "\n";
30+ }
31+
32 #dev sites require you to authenticate to even see the site, then to do it again to login
33 if (index($baseURL,"ps.qa.dev") != -1) {
34 #load base page

Subscribers

People subscribed via source and target branches