Skip to content

Conversation

@jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Oct 19, 2025

Unit tests wrapping existing self-tests and most of the helper functions.

While building the test suite I discovered some corner cases that we currently don't support all that well. The corresponding tests are therefore left disabled but marked with TODO for follow-up.

@jonasbardino jonasbardino self-assigned this Oct 19, 2025
@jonasbardino jonasbardino added the test-only Improvements or additions solely for better test coverage - without functionality changes label Oct 19, 2025
@jonasbardino jonasbardino changed the title Basic unit tester to wrap existing self-tests and a number of helper functions WiP: Basic unit tester to wrap existing self-tests and a number of helper functions Oct 20, 2025
@jonasbardino jonasbardino added the follow-up pending Pending tasks to follow-up on after close label Oct 20, 2025
fill_distinguished_name, fill_user, canonical_user and generate_https_urls as
well.
Uses FakeConfiguration, but should probably inline parameters and perhaps even
swith to a _before_each structure.
@jonasbardino jonasbardino force-pushed the add/mig-shared-base-unit-tests branch from 18f5af4 to 29ea7cf Compare October 21, 2025 16:05
@jonasbardino jonasbardino changed the title WiP: Basic unit tester to wrap existing self-tests and a number of helper functions Basic unit tester to wrap existing self-tests and a number of helper functions Oct 21, 2025
@jonasbardino jonasbardino marked this pull request as ready for review October 21, 2025 18:33
@jonasbardino jonasbardino requested a review from a team October 29, 2025 11:29
@albu-diku
Copy link
Contributor

This looks good to me - I would however suggest renaming the PR. The current title reads like a generic facility which isn't quite auccrate - somethin like: "Fundamental test coverage of mig/shared/basic". The in the description:
"Wire the legacy unit tests into the automated suite and fill coverge gaps with addition test cases."

Copy link
Contributor

@albu-diku albu-diku left a comment

Choose a reason for hiding this comment

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

I have approved these changes as the code itself looks good - but I have made some suggestions about the PR title and description that I think would clarify what is here in case it is referred to in future: #366 (comment)

I think it may also be preferable to squash the work here down to a single commit at the point of landing it for clarity.

@jonasbardino jonasbardino changed the title Basic unit tester to wrap existing self-tests and a number of helper functions Unit tests to cover most of mig/shared/base.py Oct 31, 2025
@jonasbardino
Copy link
Contributor Author

This looks good to me - I would however suggest renaming the PR. The current title reads like a generic facility which isn't quite auccrate - somethin like: "Fundamental test coverage of mig/shared/basic". The in the description: "Wire the legacy unit tests into the automated suite and fill coverge gaps with addition test cases."

Thanks for the review. Yes, the title had indeed been left behind from the original commit. Updated now.
Note to self: when making a PR from a single commit one should double check if the git commit log suggested for title/description includes enough information or if e.g. relevant file info was left out as redundant there.

@jonasbardino
Copy link
Contributor Author

I have approved these changes as the code itself looks good - but I have made some suggestions about the PR title and description that I think would clarify what is here in case it is referred to in future: #366 (comment)

I think it may also be preferable to squash the work here down to a single commit at the point of landing it for clarity.

Addressed the first bit above, and good point about simplifying on merge. I'll give squash merge a try.

@jonasbardino jonasbardino merged commit 6e3df14 into next Oct 31, 2025
7 checks passed
@jonasbardino jonasbardino deleted the add/mig-shared-base-unit-tests branch October 31, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

follow-up pending Pending tasks to follow-up on after close test-only Improvements or additions solely for better test coverage - without functionality changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants