Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(579)

Unified Diff: juju/providers/maas/tests/test_launch.py

Issue 6569053: Add generic and tag constraints to maas provider
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: juju/providers/maas/tests/test_launch.py
=== modified file 'juju/providers/maas/tests/test_launch.py'
--- juju/providers/maas/tests/test_launch.py 2012-05-25 06:32:24 +0000
+++ juju/providers/maas/tests/test_launch.py 2012-09-25 08:59:22 +0000
@@ -72,7 +72,7 @@
provider = self._get_provider(
FakeMAASHTTPConnectionWithNoAvailableNodes)
machine_data = {
- "machine-id": "foo", "constraints": {"maas-name": None}}
+ "machine-id": "foo", "constraints": {}}
d = provider.start_machine(machine_data)
# These arbitrary fake failure values come from
@@ -94,7 +94,7 @@
# Try to start up that node using the fake MAAS.
provider = self._get_provider(FakeMAASHTTPConnection)
machine_data = {
- "machine-id": machine_id, "constraints": {"maas-name": None}}
+ "machine-id": machine_id, "constraints": {}}
machine_list = yield provider.start_machine(machine_data)
# Test that it returns a list containing a single MAASMachine
@@ -147,7 +147,7 @@
# The following operations happen in sequence.
mocker.order()
# First, the node is acquired.
- mock_client.acquire_node({"maas-name": None})
+ mock_client.acquire_node({})
mocker.result({"resource_uri": "/node/123"})
# Second, the node is started. We simulate a failure at this stage.
mock_client.start_node("/node/123", ANY)
@@ -158,5 +158,5 @@
mocker.replay()
return self.assertFailure(
- MAASLaunchMachine(mock_provider, {"maas-name": None}).run("fred"),
+ MAASLaunchMachine(mock_provider, {}).run("fred"),
ZeroDivisionError)

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 204d58d