Public Access
DEVX-136: feat: add fix_pr_title module and update_pr API method
This commit was merged in pull request #203.
This commit is contained in:
@@ -27,13 +27,15 @@ class TestValidateDeployRef:
|
||||
assert result.exit_code == 1
|
||||
assert "does not exist" in result.output
|
||||
|
||||
def test_no_tag_without_allow_empty_exits_nonzero(self) -> None:
|
||||
@patch("devx.ci.validate_deploy_ref.subprocess.run")
|
||||
def test_no_tag_without_allow_empty_exits_nonzero(self, mock_subproc: MagicMock) -> None:
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(main, [])
|
||||
assert result.exit_code == 1
|
||||
assert "No tag specified" in result.output
|
||||
|
||||
def test_allow_empty_prints_pr_mode(self) -> None:
|
||||
@patch("devx.ci.validate_deploy_ref.subprocess.run")
|
||||
def test_allow_empty_prints_pr_mode(self, mock_subproc: MagicMock) -> None:
|
||||
runner = CliRunner()
|
||||
result = runner.invoke(main, ["--allow-empty"])
|
||||
assert result.exit_code == 0
|
||||
@@ -60,7 +62,8 @@ class TestValidateDeployRef:
|
||||
assert result.exit_code == 1
|
||||
assert "GITHUB_OUTPUT" in result.output
|
||||
|
||||
def test_allow_empty_with_github_output(self, tmp_path: Path) -> None:
|
||||
@patch("devx.ci.validate_deploy_ref.subprocess.run")
|
||||
def test_allow_empty_with_github_output(self, mock_subproc: MagicMock, tmp_path: Path) -> None:
|
||||
runner = CliRunner()
|
||||
gh_output = tmp_path / "github_output"
|
||||
gh_output.write_text("")
|
||||
|
||||
Reference in New Issue
Block a user