Merge lp:~andreserl/maas/maas_fix_broken_tftppath_tests into lp:~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Rejected
Rejected by: Julian Edwards
Proposed branch: lp:~andreserl/maas/maas_fix_broken_tftppath_tests
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 83 lines (+8/-8)
3 files modified
src/provisioningserver/pxe/tests/test_install_image.py (+1/-1)
src/provisioningserver/pxe/tests/test_tftppath.py (+3/-3)
src/provisioningserver/tests/test_tftp.py (+4/-4)
To merge this branch: bzr merge lp:~andreserl/maas/maas_fix_broken_tftppath_tests
Reviewer Review Type Date Requested Status
Julian Edwards (community) Needs Fixing
Review via email: mp+121876@code.launchpad.net

Commit message

Fix broken tftppath tests due to maas/trunk/revision/940

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi guys, please review/test. This should fix all the tests failures for the tftp path changes.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Some tests are still failing to pass.

review: Needs Fixing
Revision history for this message
Julian Edwards (julian-edwards) wrote :

(running "make check")

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Jtv has fixed this problem in another branch.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/provisioningserver/pxe/tests/test_install_image.py'
2--- src/provisioningserver/pxe/tests/test_install_image.py 2012-07-23 13:25:15 +0000
3+++ src/provisioningserver/pxe/tests/test_install_image.py 2012-08-29 14:39:18 +0000
4@@ -85,7 +85,7 @@
5 tftproot = self.make_dir()
6 arch, subarch, release, purpose = make_arch_subarch_release_purpose()
7 self.assertEqual(
8- os.path.join(tftproot, 'maas', arch, subarch, release, purpose),
9+ os.path.join(tftproot, arch, subarch, release, purpose),
10 make_destination(tftproot, arch, subarch, release, purpose))
11
12 def test_make_destination_creates_directory_if_not_present(self):
13
14=== modified file 'src/provisioningserver/pxe/tests/test_tftppath.py'
15--- src/provisioningserver/pxe/tests/test_tftppath.py 2012-08-17 14:11:20 +0000
16+++ src/provisioningserver/pxe/tests/test_tftppath.py 2012-08-29 14:39:18 +0000
17@@ -41,7 +41,7 @@
18 def test_compose_config_path_follows_maas_pxe_directory_layout(self):
19 name = factory.make_name('config')
20 self.assertEqual(
21- 'maas/pxelinux.cfg/%02x-%s' % (ARP_HTYPE.ETHERNET, name),
22+ 'pxelinux.cfg/%02x-%s' % (ARP_HTYPE.ETHERNET, name),
23 compose_config_path(name))
24
25 def test_compose_config_path_does_not_include_tftp_root(self):
26@@ -56,7 +56,7 @@
27 release = factory.make_name('release')
28 purpose = factory.make_name('purpose')
29 self.assertEqual(
30- 'maas/%s/%s/%s/%s' % (arch, subarch, release, purpose),
31+ '%s/%s/%s/%s' % (arch, subarch, release, purpose),
32 compose_image_path(arch, subarch, release, purpose))
33
34 def test_compose_image_path_does_not_include_tftp_root(self):
35@@ -69,7 +69,7 @@
36 Not(StartsWith(self.tftproot)))
37
38 def test_compose_bootloader_path_follows_maas_pxe_directory_layout(self):
39- self.assertEqual('maas/pxelinux.0', compose_bootloader_path())
40+ self.assertEqual('pxelinux.0', compose_bootloader_path())
41
42 def test_compose_bootloader_path_does_not_include_tftp_root(self):
43 self.assertThat(
44
45=== modified file 'src/provisioningserver/tests/test_tftp.py'
46--- src/provisioningserver/tests/test_tftp.py 2012-08-27 12:00:44 +0000
47+++ src/provisioningserver/tests/test_tftp.py 2012-08-29 14:39:18 +0000
48@@ -71,7 +71,7 @@
49 the expected groups from a match.
50 """
51 components = {
52- "bootpath": b"maas", # Static.
53+ "bootpath": None, # Static.
54 "mac": factory.getRandomMACAddress(b"-"),
55 }
56 config_path = compose_config_path(components["mac"])
57@@ -125,7 +125,7 @@
58
59 def test_re_config_file_does_not_match_non_config_file(self):
60 self.assertIsNone(
61- TFTPBackend.re_config_file.match('maas/pxelinux.cfg/kernel'))
62+ TFTPBackend.re_config_file.match('pxelinux.cfg/kernel'))
63
64 def test_re_config_file_does_not_match_file_in_root(self):
65 self.assertIsNone(
66@@ -202,7 +202,7 @@
67 output = reader.read(10000)
68 # The expected parameters include bootpath; this is extracted from the
69 # file path by re_config_file.
70- expected_params = dict(mac=mac, bootpath="maas")
71+ expected_params = dict(mac=mac, bootpath=None)
72 observed_params = json.loads(output)
73 self.assertEqual(expected_params, observed_params)
74
75@@ -213,7 +213,7 @@
76 backend = TFTPBackend(self.make_dir(), b"http://example.com/")
77 # Fake configuration parameters, as discovered from the file path.
78 fake_params = {
79- "bootpath": "maas",
80+ "bootpath": None,
81 "mac": factory.getRandomMACAddress(b"-"),
82 }
83 # Fake kernel configuration parameters, as returned from the API call.