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

Tickets/DM-47619: Update implementation of the ignore feature in scripts. #256

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

MarcoRocchietti
Copy link
Contributor

Update scripts to use the disable_checks_for_components method of the RemoteGroup class.

@MarcoRocchietti MarcoRocchietti marked this pull request as ready for review December 30, 2024 19:08
Copy link
Member

@tribeiro tribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in the scripts and most of the changes in the unit tests looks fine. However, some scripts were testing the ignore feature without any mocking, which I would expect to work with the updated version.

I made comments in the unit tests that I found, but I am not sure I caught all of them. Can you please, rollback the changes you've made on those? Unless there is really a reason for the changes, in which case, we should probably investigate what the problem is.

@@ -40,24 +41,24 @@ async def basic_make_script(self, index):
self.script = DisableATAOSCorrections(index=index)
self.atcs_mock = ATCSMock()

return (self.script, self.atcs_mock)
self.script.atcs = ATCS(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These unit tests were doing an actual test of the execution, see that they are using the ATCSMock above. Any reason for changing them? If not, I would rather leave them as they were.

@@ -39,6 +40,14 @@ async def basic_make_script(self, index):
self.script = EnableATAOSCorrections(index=index)
self.atcs_mock = ATCSMock()

self.script.atcs = ATCS(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, any reason for changing the unit tests?

@@ -38,9 +38,19 @@ class TestEnableATTCS(
async def basic_make_script(self, index):
self.script = EnableATTCS(index=index)
self.atcs_mock = ATCSMock()
self.script._attcs.disable_checks_for_components = unittest.mock.Mock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above, any reason to change the unit test? they should work as is no?

@@ -38,9 +38,19 @@ class TestStandbyATCS(
async def basic_make_script(self, index):
self.script = StandbyATCS(index=index)
self.atcs_mock = ATCSMock()
self.script._atcs.disable_checks_for_components = unittest.mock.Mock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. This unit test is using ATCSMock any reason for changing it?

@@ -47,18 +47,13 @@ async def test_executable(self):
await self.check_executable(script_path)

async def test_configure_ignore(self):
async with self.make_script():
async with self.make_dry_script():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants