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

NAS-130937 / 25.04 / Remove REST from test_290_mail.py #14422

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

creatorcary
Copy link
Contributor

@creatorcary creatorcary commented Sep 4, 2024

@creatorcary creatorcary requested a review from a team September 4, 2024 20:36
@bugclerk
Copy link
Contributor

bugclerk commented Sep 4, 2024

@bugclerk bugclerk changed the title Remove REST from test_290_mail.py NAS-130937 / 25.04 / Remove REST from test_290_mail.py Sep 4, 2024
"smtp": True,
"user": "[email protected]"
}
call("mail.update", payload)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be done with context call or try so that we maintain the same configuration exiting the test as we had entering?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tests we have now do not do this, but I can add it. The problem is if the test fails, restoring the state of the configuration will probably also fail since it would use the same endpoints (mail.config and mail.update) that the test uses.

Copy link
Contributor

@mgrimesix mgrimesix Sep 5, 2024

Choose a reason for hiding this comment

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

Many of the old tests did not attempt to restore state. Many (most?) of the updated and new tests do proper state restore. Yes, if the endpoint is failing, then restoring the state is mute because you weren't able to effect any change in the first place.
It's not critical, but good practice for a CI test environment.
I'll approve and let you decide which way to go.

Ah, you did add restore! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it, will keep in mind as I'm going through the "rest" of the tests

Copy link
Contributor

Choose a reason for hiding this comment

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

I approve the pun. 😄

@creatorcary creatorcary merged commit 82e0a76 into master Sep 5, 2024
2 of 3 checks passed
@creatorcary creatorcary deleted the NAS-130937 branch September 5, 2024 14:42
@bugclerk
Copy link
Contributor

bugclerk commented Sep 5, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants