~martin-nowack/ubuntu/utopic/maas/bug-1425837

« back to all changes in this revision

Viewing changes to src/provisioningserver/boot/tests/test_install_bootloader.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez, Diogo Matsubara, Jeroen Vermeulen, Raphaël Badin, Greg Lutostanski, Gavin Panella, Julian Edwards, Graham Binns, Andres Rodriguez
  • Date: 2014-08-21 14:05:40 UTC
  • mfrom: (1.2.35)
  • Revision ID: package-import@ubuntu.com-20140821140540-khodrzopm91kl4le
Tags: 1.7.0~beta1+bzr2781-0ubuntu1
* New upstream release, 1.7.0 Beta 1

[Diogo Matsubara]
* debian/control:
  - maas-cluster-controller depends on syslinux-dev | 
    syslinux-common (LP: #1328659)
  - python-maas-provisioningserver depends on
    python-paramiko (LP: #1334401)

[Jeroen Vermeulen]
* debian/extras/99-maas-sudoers:
  - Let maas user import, including sudo tgt-admin and sudo uec2roottar.
* debian/maas-cluster-controller.install:
  - Stop installing obsolete file bootresources.yaml.

[ Raphaël Badin ]
* debian/control:
  - maas-cluster-controller depends on python-pexpect
* debian/extras/99-maas-sudoers:
  - Add rule 'maas-dhcp-server stop' job.

[ Greg Lutostanski ]
* debian/control:
  - maas-cluster-controller depends on grub-common
  - maas-provisioningserver not maas-cluster-controller depends on
    python-pexpect (LP: #1352273)
  - maas-provisioningserver not maas-cluster-controller depends on
    python-seamicroclient (LP: #1332532)

[ Gavin Panella ]
* debian/maas-cluster-controller.postinst
  - Allow maas-pserv to bind to all IPv6 addresses too.

[ Julian Edwards ]
* debian/maas-region-controller-min.apport
  debian/maas-region-controller-min.logrotate
  debian/maas-region-controller-min.postinst
  debian/maas-region-controller.postinst
  - Change the log file name maas.log to maas-django.log
* debian/maas-cluster-controller.postinst
  debian/maas-common.install
  debian/maas-region-controller-min.postinst
  debian/maas-region-controller.postinst
  - Install /var/log/maas/maas.log as a syslog file.
  - Ensure logging is set up for upgrades 

[ Graham Binns ]
* debian/maas-region-controller.postinst:
  - Add symlinks for squid3, squid-deb-proxy and apache log directories to
    /var/log/maas.

[ Andres Rodriguez ]
* debian/maas-region-controller.postinst: Force symlink creation
  for external logs.
* debian/maas-region-controller.postinst: Do not change celery's
  rabbitmq password on upgrade that to not lock remote
  Cluster Controllers if upgrading from 1.5+. (LP: #1300507)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
class TestInstallBootloader(MAASTestCase):
36
36
 
37
37
    def test_integration(self):
38
 
        loader_contents = factory.getRandomString()
 
38
        loader_contents = factory.make_string()
39
39
        loader = self.make_file(contents=loader_contents)
40
40
        destination = self.make_file()
41
41
        install_bootloader(loader, destination)
53
53
        self.assertThat(dest, DirExists())
54
54
 
55
55
    def test_install_bootloader_installs_new_bootloader(self):
56
 
        contents = factory.getRandomString()
 
56
        contents = factory.make_string()
57
57
        loader = self.make_file(contents=contents)
58
58
        install_dir = self.make_dir()
59
59
        dest = os.path.join(install_dir, factory.make_name('loader'))
61
61
        self.assertThat(dest, FileContains(contents))
62
62
 
63
63
    def test_install_bootloader_replaces_bootloader_if_changed(self):
64
 
        contents = factory.getRandomString()
 
64
        contents = factory.make_string()
65
65
        loader = self.make_file(contents=contents)
66
66
        dest = self.make_file(contents="Old contents")
67
67
        install_bootloader(loader, dest)
68
68
        self.assertThat(dest, FileContains(contents))
69
69
 
70
70
    def test_install_bootloader_skips_if_unchanged(self):
71
 
        contents = factory.getRandomString()
 
71
        contents = factory.make_string()
72
72
        dest = self.make_file(contents=contents)
73
73
        age_file(dest, 100)
74
74
        original_write_time = get_write_time(dest)
78
78
        self.assertEqual(original_write_time, get_write_time(dest))
79
79
 
80
80
    def test_install_bootloader_sweeps_aside_dot_new_if_any(self):
81
 
        contents = factory.getRandomString()
 
81
        contents = factory.make_string()
82
82
        loader = self.make_file(contents=contents)
83
83
        dest = self.make_file(contents="Old contents")
84
84
        temp_file = '%s.new' % dest