-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qisrc push: don't try to set reviewers when --no-review #97
There was some logic missing here, this option is seldom used and needed a test Change-Id: If026508c2a33e38c42bfb4b86293e316053e7779 Reviewed-on: http://gerrit.aldebaran.lan/73252 Tested-by: gerrit Reviewed-by: vbarbaresi <[email protected]>
- Loading branch information
Vincent Barbaresi
authored and
vbarbaresi
committed
Jul 8, 2016
1 parent
8181d68
commit 8cb3945
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -217,3 +217,20 @@ def test_orphaned_project(qisrc_action, git_server, record_messages): | |
record_messages.reset() | ||
qisrc_action("push", "--project", "foo") | ||
assert record_messages.find("Project is orphaned") | ||
|
||
def test_no_reviewers_when_no_review(qisrc_action, git_server): | ||
foo_repo = git_server.create_repo("foo.git", review=True) | ||
qiproject_xml = """\ | ||
<project format="3"> | ||
<maintainer email="[email protected]">John Doe</maintainer> | ||
</project>""" | ||
git_server.push_file("foo.git", "qiproject.xml", qiproject_xml) | ||
qisrc_action("init", git_server.manifest_url) | ||
git_worktree = TestGitWorkTree() | ||
foo_proj = git_worktree.get_git_project("foo") | ||
foo_git = TestGit(foo_proj.path) | ||
foo_git.commit_file("a.txt", "a") | ||
with mock.patch("qisrc.review.set_reviewers") as set_reviewers: | ||
qisrc_action("push", "--no-review", "--project", "foo") | ||
assert not set_reviewers.called | ||
|