22#
33# SPDX-License-Identifier: MIT
44
5- """Tests for push command just-push mode functionality."""
5+ """Tests for push command mark-published mode functionality."""
66
77import pytest
88from pathlib import Path
@@ -52,7 +52,7 @@ def test_notes_file(tmp_path):
5252@patch ("release_tool.commands.push.determine_release_branch_strategy" )
5353@patch ("release_tool.commands.push.GitHubClient" )
5454def test_just_push_mode_dry_run (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
55- """Test just-push mode in dry-run shows expected output."""
55+ """Test mark-published mode in dry-run shows expected output."""
5656 runner = CliRunner ()
5757
5858 # Mock database
@@ -74,11 +74,11 @@ def test_just_push_mode_dry_run(mock_gh_client, mock_strategy, mock_git_ops, moc
7474
7575 result = runner .invoke (
7676 push ,
77- ['1.0.0' , '-f' , str (test_notes_file ), '--dry-run' , '--release' , '--release-mode' , 'just-push ' ],
77+ ['1.0.0' , '-f' , str (test_notes_file ), '--dry-run' , '--release' , '--release-mode' , 'mark-published ' ],
7878 obj = {'config' : test_config }
7979 )
80-
81- # Should show dry-run output for just-push mode
80+
81+ # Should show dry-run output for mark-published mode
8282 assert result .exit_code == 0
8383 assert 'DRY RUN' in result .output
8484 assert 'Would mark existing GitHub release as published' in result .output
@@ -94,7 +94,7 @@ def test_just_push_mode_dry_run(mock_gh_client, mock_strategy, mock_git_ops, moc
9494@patch ("release_tool.commands.push.determine_release_branch_strategy" )
9595@patch ("release_tool.commands.push.GitHubClient" )
9696def test_just_push_mode_no_existing_release (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
97- """Test just-push mode fails when no existing release found."""
97+ """Test mark-published mode fails when no existing release found."""
9898 runner = CliRunner ()
9999
100100 # Mock database
@@ -121,10 +121,10 @@ def test_just_push_mode_no_existing_release(mock_gh_client, mock_strategy, mock_
121121
122122 result = runner .invoke (
123123 push ,
124- ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
124+ ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
125125 obj = {'config' : test_config }
126126 )
127-
127+
128128 # Should fail with error
129129 assert result .exit_code == 1
130130 assert 'No existing GitHub release found' in result .output
@@ -139,7 +139,7 @@ def test_just_push_mode_no_existing_release(mock_gh_client, mock_strategy, mock_
139139@patch ("release_tool.commands.push.determine_release_branch_strategy" )
140140@patch ("release_tool.commands.push.GitHubClient" )
141141def test_just_push_mode_marks_existing_release_as_published (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
142- """Test just-push mode successfully marks existing release as published."""
142+ """Test mark-published mode successfully marks existing release as published."""
143143 runner = CliRunner ()
144144
145145 # Mock database
@@ -176,7 +176,7 @@ def test_just_push_mode_marks_existing_release_as_published(mock_gh_client, mock
176176
177177 result = runner .invoke (
178178 push ,
179- ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
179+ ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
180180 obj = {'config' : test_config }
181181 )
182182
@@ -200,7 +200,7 @@ def test_just_push_mode_marks_existing_release_as_published(mock_gh_client, mock
200200@patch ("release_tool.commands.push.determine_release_branch_strategy" )
201201@patch ("release_tool.commands.push.GitHubClient" )
202202def test_just_push_mode_preserves_release_properties (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
203- """Test just-push mode preserves all existing release properties."""
203+ """Test mark-published mode preserves all existing release properties."""
204204 runner = CliRunner ()
205205
206206 # Mock database
@@ -237,7 +237,7 @@ def test_just_push_mode_preserves_release_properties(mock_gh_client, mock_strate
237237
238238 result = runner .invoke (
239239 push ,
240- ['1.0.0-beta.1' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
240+ ['1.0.0-beta.1' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
241241 obj = {'config' : test_config }
242242 )
243243
@@ -259,7 +259,7 @@ def test_just_push_mode_preserves_release_properties(mock_gh_client, mock_strate
259259@patch ("release_tool.commands.push.determine_release_branch_strategy" )
260260@patch ("release_tool.commands.push.GitHubClient" )
261261def test_just_push_mode_skips_tag_creation (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
262- """Test just-push mode does not create or push tags."""
262+ """Test mark-published mode does not create or push tags."""
263263 runner = CliRunner ()
264264
265265 # Mock database
@@ -296,7 +296,7 @@ def test_just_push_mode_skips_tag_creation(mock_gh_client, mock_strategy, mock_g
296296
297297 result = runner .invoke (
298298 push ,
299- ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
299+ ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
300300 obj = {'config' : test_config }
301301 )
302302
@@ -314,7 +314,7 @@ def test_just_push_mode_skips_tag_creation(mock_gh_client, mock_strategy, mock_g
314314@patch ("release_tool.commands.push.determine_release_branch_strategy" )
315315@patch ("release_tool.commands.push.GitHubClient" )
316316def test_just_push_mode_with_debug_output (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
317- """Test just-push mode shows debug output when enabled."""
317+ """Test mark-published mode shows debug output when enabled."""
318318 runner = CliRunner ()
319319
320320 # Mock database
@@ -351,7 +351,7 @@ def test_just_push_mode_with_debug_output(mock_gh_client, mock_strategy, mock_gi
351351
352352 result = runner .invoke (
353353 push ,
354- ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
354+ ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
355355 obj = {'config' : test_config , 'debug' : True }
356356 )
357357
@@ -366,7 +366,7 @@ def test_just_push_mode_with_debug_output(mock_gh_client, mock_strategy, mock_gi
366366@patch ("release_tool.commands.push.determine_release_branch_strategy" )
367367@patch ("release_tool.commands.push.GitHubClient" )
368368def test_just_push_mode_fails_when_update_fails (mock_gh_client , mock_strategy , mock_git_ops , mock_db , test_config , test_notes_file ):
369- """Test just-push mode fails gracefully when GitHub update fails."""
369+ """Test mark-published mode fails gracefully when GitHub update fails."""
370370 runner = CliRunner ()
371371
372372 # Mock database
@@ -403,7 +403,7 @@ def test_just_push_mode_fails_when_update_fails(mock_gh_client, mock_strategy, m
403403
404404 result = runner .invoke (
405405 push ,
406- ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'just-push ' ],
406+ ['1.0.0' , '-f' , str (test_notes_file ), '--release' , '--release-mode' , 'mark-published ' ],
407407 obj = {'config' : test_config }
408408 )
409409
0 commit comments