Merge lp://qastaging/~nataliabidart/ubuntuone-control-panel/raise-and-handle-unauthorized into lp://qastaging/ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 135
Merged at revision: 129
Proposed branch: lp://qastaging/~nataliabidart/ubuntuone-control-panel/raise-and-handle-unauthorized
Merge into: lp://qastaging/ubuntuone-control-panel
Diff against target: 757 lines (+218/-44)
14 files modified
ubuntuone/controlpanel/backend.py (+29/-2)
ubuntuone/controlpanel/dbus_service.py (+29/-21)
ubuntuone/controlpanel/gtk/gui.py (+19/-5)
ubuntuone/controlpanel/gtk/package_manager.py (+3/-2)
ubuntuone/controlpanel/gtk/tests/test_gui.py (+29/-1)
ubuntuone/controlpanel/gtk/tests/test_gui_basic.py (+9/-0)
ubuntuone/controlpanel/gtk/tests/test_package_manager.py (+2/-2)
ubuntuone/controlpanel/integrationtests/__init__.py (+1/-2)
ubuntuone/controlpanel/integrationtests/test_dbus_service.py (+29/-0)
ubuntuone/controlpanel/integrationtests/test_webclient.py (+11/-1)
ubuntuone/controlpanel/replication_client.py (+1/-1)
ubuntuone/controlpanel/tests/test_backend.py (+43/-5)
ubuntuone/controlpanel/utils.py (+1/-1)
ubuntuone/controlpanel/webclient.py (+12/-1)
To merge this branch: bzr merge lp://qastaging/~nataliabidart/ubuntuone-control-panel/raise-and-handle-unauthorized
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Roman Yepishev (community) fieldtest Approve
Review via email: mp+56782@code.qastaging.launchpad.net

Commit message

- If servers reply with a 401, clear credentials and ask user to authenticate (LP: #726612).

Description of the change

To test IRL, you need to do a little tweak in the source code due to bug #751895.

- edit ubuntuone/controlpanel/webclient.py:66 and add the 400 error to the list of unauthorized errors
- killall ubuntuone-control-panel-backend
- in 2 terminals, run both the backend and the frontend from this branch:

DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-backend
DEBUG=True PYTHONPATH=. ./bin/ubuntuone-control-panel-gtk

While you have your panel opened, go to https://one.ubuntu.com/account/machines/ and remove the computer you're currently using. Then, try to go to the folders tab or to remove a device (browsing devices will show an empty list due to bug #695820.
You should be redirected to the overview page and you should get your U1 credentials cleared from your local system.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

Revision history for this message
Roman Yepishev (rye) wrote :

Awesome!

review: Approve (fieldtest)
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :
Download full text (79.8 KiB)

The attempt to merge lp:~nataliabidart/ubuntuone-control-panel/raise-and-handle-unauthorized into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

Running test suite for ubuntuone/controlpanel
Xlib: extension "RANDR" missing on display ":99".
ubuntuone.controlpanel.gtk.tests
  BaseTestCase
    runTest ... [OK]
ubuntuone.controlpanel.gtk.tests.test_gui_basic
  ControlPanelMixinTestCase
    test_is_a_control_panel_mixin ... [OK]
    test_ui_can_be_created ... [OK]
  ControlPanelTestCase
    test_backend_is_shutdown_on_close ... [OK]
    test_credentials_found_connects_syncdaemon ... [OK]
    test_credentials_found_shows_dashboard_panel ... [OK]
    test_credentials_found_shows_services_panel ... [OK]
    test_is_a_notebook ... [OK]
    test_local_device_removed_shows_overview_panel ... [OK]
    test_main_window_is_passed_to_child ... [OK]
    test_on_show_management_panel ... [OK]
    test_on_show_management_panel_is_idempotent ... [OK]
    test_overview_is_shown_at_startup ... [OK]
    test_startup_props ... [OK]
    test_startup_visibility ... [OK]
    test_unauthorized_shows_overview_panel ... [OK]
  ControlPanelWindowAlertParamTestCase
    test_alert ... [OK]
  ControlPanelWindowInvalidParamsTestCase
    test_closing_stops_the_main_lopp ... [OK]
    test_control_panel_is_the_only_child ... [OK]
    test_icon_name_is_correct ... [OK]
    test_is_a_window ... [OK]
    test_main_start_gtk_main_loop ... [OK]
    test_main_window_is_passed_to_child ... [OK]
    test_max_size ... [OK]
    test_startup_visibility ... [OK]
    test_switch_to ... [OK]
    test_title_is_correct ... [OK]
  ControlPanelWindowParamsNoneTestCase
    test_closing_stops_the_main_lopp ... [OK]
    test_control_panel_is_the_only_child ... [OK]
    test_icon_name_is_correct ... [OK]
    test_is_a_window ... [OK]
    test_main_start_gtk_main_loop ... [OK]
    test_main_window_is_passed_to_child ... [OK]
    test_max_size ....

135. By Natalia Bidart

Increasing the timeout fr webclient tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches