~ubuntu-branches/ubuntu/utopic/unattended-upgrades/utopic

« back to all changes in this revision

Viewing changes to test/test_in_chroot.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2011-11-08 17:37:31 UTC
  • Revision ID: package-import@ubuntu.com-20111108173731-py60wunble40f56z
Tags: 0.74
* test improvements
* fix crash when no packages are upgraded
* only run dpkg if there are packages to upgrade (closes: #647476)
* include "stable-updates" in the configuration example
* debian/po/de.po:
  - updated, thanks to Helge Kreutzmann (closes: #647172)
* debian/rules:
  - install initscripts but do not run them on install/upgrade
    (closes: #645919), thanks to Teodor MICU
* data/50unattended-upgrades.Debian:
  - update default Debian config for squeeze, thanks to 
    John Feuerstein for the example (closes: #609854)
* debian/prerm:
  - ignore failures from versions where the initscript is run
    with "stop" even when not in shutdown mode (closes: #645919)
* unattended-upgrade:
  - ensure to release shutdown-lock before shutting down 
    (closes: #645919)
* debian/postinst, data/20auto-upgrades-disabled:
  - allow disabling via debconf (closes: #645971)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import logging
5
5
import glob
6
6
import os
 
7
import re
7
8
import shutil
8
9
import subprocess
9
10
import sys
121
122
        log = os.path.join(
122
123
            target, "var/log/unattended-upgrades/unattended-upgrades.log")
123
124
        logfile = open(log).read()
124
 
        self.assertTrue("Packages that are upgraded: bzip2" in logfile)
 
125
        #print logfile
 
126
        self.assertNotEqual(
 
127
            re.search("Packages that are upgraded:.*bzip2", logfile), None)
125
128
        self.assertFalse("ERROR Installing the upgrades failed" in logfile)
126
 
        #print logfile
127
129
        dpkg_log = os.path.join(target, "var/log/unattended-upgrades/*-dpkg*.log")
128
130
        dpkg_logfile = open(glob.glob(dpkg_log)[0]).read()
129
131
        self.assertTrue("Preparing to replace bzip2 1.0.5-4" in dpkg_logfile)