def test_runnable_to_recipe_noop(self):
     runnable = Runnable('noop', None)
     recipe_path = os.path.join(self.tmpdir.name, 'recipe.json')
     runnable.write_json(recipe_path)
     self.assertTrue(os.path.exists(recipe_path))
     loaded_runnable = Runnable.from_recipe(recipe_path)
     self.assertEqual(loaded_runnable.kind, 'noop')
 def test_runnable_to_recipe_uri(self):
     runnable = Runnable('exec-test', '/bin/true')
     recipe_path = os.path.join(self.tmpdir.name, 'recipe.json')
     runnable.write_json(recipe_path)
     self.assertTrue(os.path.exists(recipe_path))
     loaded_runnable = Runnable.from_recipe(recipe_path)
     self.assertEqual(loaded_runnable.kind, 'exec-test')
     self.assertEqual(loaded_runnable.uri, '/bin/true')
Example #3
0
 def test_runnable_to_recipe_uri(self):
     runnable = Runnable("exec-test", "/bin/true")
     recipe_path = os.path.join(self.tmpdir.name, "recipe.json")
     runnable.write_json(recipe_path)
     self.assertTrue(os.path.exists(recipe_path))
     loaded_runnable = Runnable.from_recipe(recipe_path)
     self.assertEqual(loaded_runnable.kind, "exec-test")
     self.assertEqual(loaded_runnable.uri, "/bin/true")