Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(release): Set gitconfig before git write operations #32277

Merged
merged 4 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
  • Loading branch information
chouetz committed Feb 13, 2025
commit 122cddf7f3f862614dd29edf27783da4c20be575
14 changes: 7 additions & 7 deletions tasks/unit_tests/release_tests.py
Original file line number Diff line number Diff line change
@@ -787,7 +787,7 @@ def test_no_changes(self, version_mock, print_mock, _):
}
),
)
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'true'})
@patch.dict(os.environ, {'GITLAB_CI': 'true'})
@patch('os.chdir', new=MagicMock())
def test_changes_new_commit_first_repo(self, version_mock, print_mock, _):
with mock_git_clone():
@@ -871,7 +871,7 @@ def test_changes_new_commit_first_repo(self, version_mock, print_mock, _):
),
)
@patch('os.chdir', new=MagicMock())
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'false'})
@patch.dict(os.environ, {'GITLAB_CI': 'false'})
def test_changes_new_commit_all_repo(self, version_mock, print_mock, _):
with mock_git_clone():
next = MagicMock()
@@ -1023,7 +1023,7 @@ def test_changes_new_release_one_repo(self, version_mock, print_mock, _):
}
),
)
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'true'})
@patch.dict(os.environ, {'GITLAB_CI': 'true'})
@patch('os.chdir', new=MagicMock())
def test_changes_new_commit_second_repo_branch_out(self, version_mock, print_mock, _):
with mock_git_clone():
@@ -1272,7 +1272,7 @@ def test_update_module_optional_in_agent_7(self):
class TestTagModules(unittest.TestCase):
@patch('tasks.release.__tag_single_module', new=MagicMock(side_effect=[[str(i)] for i in range(2)]))
@patch('tasks.release.agent_context', new=MagicMock())
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'false'})
@patch.dict(os.environ, {'GITLAB_CI': 'false'})
def test_2_tags(self):
c = MockContext(run=Result("yolo"))
with patch('tasks.release.get_default_modules') as mock_modules:
@@ -1285,7 +1285,7 @@ def test_2_tags(self):

@patch('tasks.release.__tag_single_module', new=MagicMock(side_effect=[[str(i)] for i in range(3)]))
@patch('tasks.release.agent_context', new=MagicMock())
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'false'})
@patch.dict(os.environ, {'GITLAB_CI': 'false'})
def test_3_tags(self):
c = MockContext(run=Result("yolo"))
with patch('tasks.release.get_default_modules') as mock_modules:
@@ -1298,7 +1298,7 @@ def test_3_tags(self):

@patch('tasks.release.__tag_single_module', new=MagicMock(side_effect=[[str(i)] for i in range(4)]))
@patch('tasks.release.agent_context', new=MagicMock())
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'false'})
@patch.dict(os.environ, {'GITLAB_CI': 'false'})
def test_4_tags(self):
c = MockContext(run=Result("yolo"))
with patch('tasks.release.get_default_modules') as mock_modules:
@@ -1315,7 +1315,7 @@ def test_4_tags(self):

@patch('tasks.release.__tag_single_module', new=MagicMock(side_effect=[[str(i)] for i in range(100)]))
@patch('tasks.release.agent_context', new=MagicMock())
@patch.dict(os.environ, {'GITHUB_ACTIONS': 'false'})
@patch.dict(os.environ, {'GITLAB_CI': 'false'})
def test_100_tags(self):
c = MockContext(run=Result("yolo"))
with patch('tasks.release.get_default_modules') as mock_modules:
Loading
Oops, something went wrong.