~vila/ubuntuone-testing/usync-daemon

« back to all changes in this revision

Viewing changes to ubuntuone/client/sync_daemon/fabfile/u1sdtool.py

  • Committer: Vincent Ladeuil
  • Date: 2012-09-05 08:20:33 UTC
  • Revision ID: vila+qa@canonical.com-20120905082033-kc9k73ih23tma7o2
Another dead-end: u1sdtool requires a proper DBUS_SESSION_BUS_ADDRESS environment variable set and makes it harder to know in which state the test start (is the daemon already running ? Is the user already connected). 2 tests are currently failing for related reasons, committing at this point to better track the next steps.

- Implement u1sdtool via fabric with tests,
- Notice that key_upload should create '~/.ssh' if it doesn't exist,
- Notice that tests are missing for some fixtures,
- Start sync daemon tests starting with test_u1sdsession_73 from
  moztrap (the real target).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012 Canonical Ltd.
 
2
#
 
3
# This program is free software: you can redistribute it and/or modify it
 
4
# under the terms of the GNU General Public License version 3, as published
 
5
# by the Free Software Foundation.
 
6
#
 
7
# This program is distributed in the hope that it will be useful, but
 
8
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
9
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
10
# PURPOSE.  See the GNU General Public License for more details.
 
11
#
 
12
# You should have received a copy of the GNU General Public License along
 
13
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
14
 
 
15
"""A fabric proxy to u1sdtool on a given host/user."""
 
16
 
 
17
 
 
18
from fabric import api as fab
 
19
 
 
20
 
 
21
def u1sdtool_connect():
 
22
    return fab.run('u1sdtool --connect')
 
23
 
 
24
 
 
25
def u1sdtool_disconnect():
 
26
    return fab.run('u1sdtool --disconnect')
 
27
 
 
28
 
 
29
def u1sdtool_status():
 
30
    return fab.run('u1sdtool --status')