summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-02-17 22:50:17 +0000
committerTarmac <>2011-02-17 22:50:17 +0000
commit76a82e57dfbca67e1e70a12db4f4b5c2111e4d93 (patch)
treead470c12b3650141ec74051386af8e87e6515999 /nova/tests
parent5688fbd7a06ea47e18f38e4c900be4dbb50b921c (diff)
parentc0972233901774598fe6c836fcc3a0dd1f28f180 (diff)
Added support for feature parity with the current Rackspace Cloud Servers practice of "injecting" files into newly-created instances for configuration, etc. However, this is in no way restricted to only writing files to the guest when it is first created.
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_compute.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py
index 2aa0690e7..b049ac943 100644
--- a/nova/tests/test_compute.py
+++ b/nova/tests/test_compute.py
@@ -202,6 +202,14 @@ class ComputeTestCase(test.TestCase):
self.compute.set_admin_password(self.context, instance_id)
self.compute.terminate_instance(self.context, instance_id)
+ def test_inject_file(self):
+ """Ensure we can write a file to an instance"""
+ instance_id = self._create_instance()
+ self.compute.run_instance(self.context, instance_id)
+ self.compute.inject_file(self.context, instance_id, "/tmp/test",
+ "File Contents")
+ self.compute.terminate_instance(self.context, instance_id)
+
def test_snapshot(self):
"""Ensure instance can be snapshotted"""
instance_id = self._create_instance()