~ubuntu-core-dev/update-manager/main

« back to all changes in this revision

Viewing changes to AutoUpgradeTester/UpgradeTestBackendSimulate.py

  • Committer: Michael Terry
  • Date: 2012-05-15 19:43:43 UTC
  • mto: This revision was merged to the branch mainline in revision 2428.
  • Revision ID: michael.terry@canonical.com-20120515194343-tocvo0awttmggie1
update several strings to match the software updater spec; most notably, rename from Update Manager to Software Updater

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# UpgradeTestBackendSimulate.py
 
2
#
 
3
# test backend
 
4
#
 
5
 
 
6
from __future__ import absolute_import, print_function
 
7
 
 
8
import tempfile
 
9
 
 
10
from .UpgradeTestBackend import UpgradeTestBackend
 
11
 
 
12
class UpgradeTestBackendSimulate(UpgradeTestBackend):
 
13
 
 
14
    def __init__(self, profiledir, resultdir=""):
 
15
        tmpdir = tempfile.mkdtemp()
 
16
        super(UpgradeTestBackendSimulate, self).__init__(profiledir, resultdir=tmpdir)
 
17
 
 
18
    def installPackages(self, pkgs):
 
19
        print("simulate installing packages: %s" % ",".join(pkgs))
 
20
 
 
21
    def bootstrap(self):
 
22
        " bootstaps a pristine install"
 
23
        print("simulate running bootstrap")
 
24
        return True
 
25
 
 
26
    def upgrade(self):
 
27
        " upgrade a given install "
 
28
        print("simulate running upgrade")
 
29
        return True
 
30
 
 
31
    def test(self):
 
32
        " test if the upgrade was successful "
 
33
        print("running post upgrade test")
 
34
        return True