1464.1.1
|
|
|
Gavin Panella |
11 years ago
|
|
|
1464
|
|
|
jtv at canonical |
11 years ago
|
|
|
1463
|
|
|
jtv at canonical |
11 years ago
|
|
|
1462
|
|
|
Raphael Badin |
11 years ago
|
|
|
1461
|
|
|
jtv at canonical |
11 years ago
|
|
|
1460
|
|
|
Ian Booth |
11 years ago
|
|
|
1459
|
|
|
jtv at canonical |
11 years ago
|
|
|
1458
|
|
|
jtv at canonical |
11 years ago
|
|
|
1457
|
|
[r=jtv] Unify providers' tools series check.
This is preparation for a refactoring discussed with William Reade and outlined in bug 1199847. When starting an instance, the providers generally check that the proffered possibleTools are all for the required OS release series. (Well... except the dummy, which doesn't look like it cares, and the local provider where I added this because it seemed just as appropriate as for the "real" ones).
In this branch I extract that check into a reusable function, with tests. With this in place it'll be easier to move these checks around, and as you can see in the maas/azure providers, it's no longer even necessary to pass a series down the call chain when starting an instance — it can be just a property of the selected tools.
There was no documented way to generate fakes with different series, or indeed documented anything, so I hacked up my own very simple fakes. It looked as if it might have been possible to mess with what was there already, but the problem with such data-driven tests is that extending them in unexpected ways often leads to brittleness, poorly-understood tests, rigidity, and redundant or conflated coverage. I decided against trying to fit my tests into the code that was already in the test file.
|
jtv at canonical |
11 years ago
|
|
|
1456
|
|
|
jtv at canonical |
11 years ago
|
|
|
1455
|
|
|
Raphael Badin |
11 years ago
|
|
|
1454
|
|
|
jtv at canonical |
11 years ago
|
|
|
1453
|
|
|
jtv at canonical |
11 years ago
|
|
|
1452
|
|
|
jtv at canonical |
11 years ago
|
|
|
1451
|
|
|
Francesco Banconi |
11 years ago
|
|
|
1450
|
|
|
Raphael Badin |
11 years ago
|
|
|
1449
|
|
|
jtv at canonical |
11 years ago
|
|
|
1448
|
|
|
jtv at canonical |
11 years ago
|
|
|
1447
|
|
|
jtv at canonical |
11 years ago
|
|
|
1446
|
|
|
jtv at canonical |
11 years ago
|
|
|