Exemplo n.º 1
0
    def test_10_tag_new_commit(self):
        """Test tagging a newer commit of a recipe"""
        recipe = recipes.read_recipe_commit(self.repo, "master", "example-http-server")
        recipe["description"] = "A modified description"
        oid = recipes.commit_recipe(self.repo, "master", recipe)
        self.assertNotEqual(oid, None)

        # Tag the new commit
        result = recipes.tag_recipe_commit(self.repo, "master", "example-http-server")
        self.assertNotEqual(result, None)

        commits = recipes.list_commits(self.repo, "master", "example-http-server.toml")
        self.assertEqual(len(commits), 3, "Wrong number of commits: %s" % commits)
        self.assertEqual(commits[0].revision, 2)
Exemplo n.º 2
0
 def test_02_commit_recipe(self):
     """Test committing a Recipe object"""
     recipe = recipes.Recipe("test-recipe", "A recipe used for testing",
                             None, None, None, None)
     oid = recipes.commit_recipe(self.repo, "master", recipe)
     self.assertNotEqual(oid, None)