Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
cleanup: Remove needs_reboot patches from unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NucciTheBoss committed Apr 27, 2023
1 parent 28fb743 commit 0981aff
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def test_config_available_fail(self, defer):
"interface_slurmrestd.SlurmrestdRequires.get_stored_slurm_config",
return_value={"cluster_name": "test"},
)
@patch(
"slurm_ops_manager.SlurmManager.needs_reboot",
new_callable=PropertyMock(return_value=False),
)
@patch(
"interface_slurmrestd.SlurmrestdRequires.is_joined",
new_callable=PropertyMock(return_value=True),
Expand All @@ -69,10 +65,6 @@ def test_install_fail(self, defer, *_):
self.assertFalse(self.harness.charm._stored.slurm_installed)
defer.assert_called()

@patch(
"slurm_ops_manager.SlurmManager.needs_reboot",
new_callable=PropertyMock(return_value=False),
)
@patch(
"interface_slurmrestd.SlurmrestdRequires.is_joined",
new_callable=PropertyMock(return_value=True),
Expand Down Expand Up @@ -125,10 +117,6 @@ def test_restart_slurmrestd_fail(self, defer):
defer.assert_called()

@patch("slurm_ops_manager.SlurmManager.restart_slurm_component", lambda _: True)
@patch(
"slurm_ops_manager.SlurmManager.needs_reboot",
new_callable=PropertyMock(return_value=False),
)
@patch(
"interface_slurmrestd.SlurmrestdRequires.is_joined",
new_callable=PropertyMock(return_value=True),
Expand All @@ -154,10 +142,6 @@ def test_update_status_fail(self):
self.harness.charm.unit.status, BlockedStatus("Error installing slurmrestd")
)

@patch(
"slurm_ops_manager.SlurmManager.needs_reboot",
new_callable=PropertyMock(return_value=False),
)
@patch(
"interface_slurmrestd.SlurmrestdRequires.is_joined",
new_callable=PropertyMock(return_value=True),
Expand All @@ -179,10 +163,6 @@ def test_upgrade_fail(self, *_):
)

@patch("pathlib.Path.read_text", return_value="v1.0.0")
@patch(
"slurm_ops_manager.SlurmManager.needs_reboot",
new_callable=PropertyMock(return_value=False),
)
@patch(
"interface_slurmrestd.SlurmrestdRequires.is_joined",
new_callable=PropertyMock(return_value=True),
Expand Down

0 comments on commit 0981aff

Please sign in to comment.