Merge ~paride/ubuntu-manual-tests:fix-2fa into ubuntu-manual-tests:master

Proposed by Paride Legovini
Status: Merged
Merged at revision: 137ed8698c0e3c219720ef9ffd411d4ddc3aba06
Proposed branch: ~paride/ubuntu-manual-tests:fix-2fa
Merge into: ubuntu-manual-tests:master
Diff against target: 29 lines (+18/-0)
1 file modified
tools/qa_tracker_update.pl (+18/-0)
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+381828@code.launchpad.net

Commit message

qa_tracker_update.pl: add support for 2FA authentication

With this change the script assumes that 2FA authentication is enabled,
which is the case for everybody in the ~canonical team. I didn't look
at the code that is supposed to login to the development instances of
the iso tracker, as IIUC they do not exist anymore.

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

Oddly enough the script has CRLF end of lines. I didn't convert them here otherwise the diff would have covered the whole file.

Revision history for this message
Brian Murray (brian-murray) wrote :

I've test this a couple of times and it is working well, thanks!

review: Approve
Revision history for this message
Paride Legovini (paride) wrote :

Great! Waiting for the green light on finishing up the git conversion, then I'll merge this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/tools/qa_tracker_update.pl b/tools/qa_tracker_update.pl
index 1f9ab81..6448c67 100644
--- a/tools/qa_tracker_update.pl
+++ b/tools/qa_tracker_update.pl
@@ -223,6 +223,24 @@ sub login {
223 }223 }
224 }224 }
225225
226 print "Enter your 2FA OTP: ";
227 my $otp = <STDIN>;
228 chomp $otp;
229
230 $mech->submit_form(
231 form_id => 'login-form',
232 fields => {
233 oath_token => $otp,
234 }
235 );
236
237 if ($mech->success()) {
238 #$output = $mech->content();
239 #print "2FA Login submit:\n" . $output . "\n";
240 } else {
241 die localtime(time) . ' Error meching 2FA Login' . "\n";
242 }
243
226 #sso decide form244 #sso decide form
227 $mech->submit_form(245 $mech->submit_form(
228 form_name => 'decideform',246 form_name => 'decideform',

Subscribers

People subscribed via source and target branches