From bf7b89d577a9fbe8d25c3db2deae926d852d8bcc Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 10 Nov 2011 16:55:32 -0500 Subject: Converting inject_file to use instance objects Related to blueprint internal-uuids. This function also appeared to be incomplete. It should actually work now. Change-Id: I77ccd29c7ac5e0cbe60d52a4ff5a64ecdff6fa1a --- nova/tests/test_compute.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index bf3c1ea59..f99927909 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -1882,3 +1882,11 @@ class ComputeAPITestCase(BaseTestCase): self.compute_api.add_fixed_ip(self.context, instance, '1') self.compute_api.remove_fixed_ip(self.context, instance, '192.168.1.1') self.compute_api.delete(self.context, instance) + + def test_inject_file(self): + """Ensure we can write a file to an instance""" + instance_id = self._create_instance() + instance = self.compute_api.get(self.context, instance_id) + self.compute_api.inject_file(self.context, instance, + "/tmp/test", "File Contents") + db.instance_destroy(self.context, instance_id) -- cgit