Exemplo n.º 1
0
 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')
Exemplo n.º 2
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')
Exemplo n.º 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")