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

fix: factor out test_utils, clean-up test code #72

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Conversation

przydatek
Copy link
Contributor

Factor out test functions test_utils-module, so that they can be used in other tests.
Use the new module in existing tests, and simplify the test setup for tld_operator-tests.

@przydatek przydatek marked this pull request as ready for review January 14, 2025 19:11
@przydatek przydatek requested a review from a team as a code owner January 14, 2025 19:11
@przydatek przydatek requested a review from nathanosdev January 14, 2025 19:11
Comment on lines +54 to +57
# NOTE: The functionality of tld_operator depends on whehter the caller is a controller or not,
# so we proceed in two steps. Initially the test canister (i.e. tld_operator_test) is not a controller,
# so we test the behaviour for non-controller callers. Afterwards we make the test canister
# a controller of tld_operator, and test the behaviour for controller callers.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nathanosdev: following your suggestion from #70 I've removed the "doubled" canister, and run the controller/non-controller tests on a single canister -- this seems simpler indeed.

@przydatek przydatek merged commit 02f93a2 into main Jan 15, 2025
9 checks passed
@przydatek przydatek deleted the bartosz/test_utils branch January 15, 2025 11:12
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