Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Feb 13, 2025
1 parent 731a3c0 commit 122cddf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tasks/unit_tests/release_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 122cddf

Please sign in to comment.