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

Finish etcd test suite [Tech Debt] #61756

Merged
merged 14 commits into from
Apr 7, 2022
Merged

Conversation

MKLeb
Copy link
Contributor

@MKLeb MKLeb commented Mar 4, 2022

What does this PR do?

Finishes etcd testing suite in anticipation of soon adopting another etcd client library for APIv3 support. It was decided that unit tests will serve the needed purpose here, since the functional testing is all done in utils.test_etcd_util. The other pieces simply rely, in some way, on that utility module to actually connect to the etcd service.

Also...
Changes logic in modules.etcd_mod.get to take full advantage of utils.etcd_util.get which now defers to utils.etcd_util.tree in the recursive case. Nothing was fixed, just a cleaner implementation.

Fixes returners.etcd_return being profoundly out of tune with its underlying usage of utils.etcd_util. Removed .value accesses from get returns and made use of the tree returns in the case where recursive get was necessary.

What issues does this PR fix or reference?

Fixes: All but one piece of #60325
Inidvidual issues: #61033, #61034, #61035, #61036

Note: issue closure dependent on the choice of v3 library.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

@MKLeb MKLeb requested a review from a team as a code owner March 4, 2022 21:09
@MKLeb MKLeb requested review from twangboy and waynew and removed request for a team and twangboy March 4, 2022 21:09
@MKLeb MKLeb changed the title Td/etcd mod functional Finish etcd test suite [Tech Debt] Mar 4, 2022
@MKLeb
Copy link
Contributor Author

MKLeb commented Mar 5, 2022

re-run pr-photon-3-x86_64-py3-pytest

waynew
waynew previously approved these changes Mar 7, 2022
Copy link
Contributor

@waynew waynew left a comment

Choose a reason for hiding this comment

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

I think this is good - I am not quite positive if we have enough test coverage to make me comfortable (i.e. having some light functional tests) based on some of the things that I've seen in other parts of the codebase, using etcd.

I'll see about putting together some example or something to see if I can reproduce what I'm talking about.

@MKLeb MKLeb changed the title Finish etcd test suite [Tech Debt] [WIP] Finish etcd test suite [Tech Debt] Mar 7, 2022
@MKLeb MKLeb changed the title [WIP] Finish etcd test suite [Tech Debt] Finish etcd test suite [Tech Debt] Mar 7, 2022
@MKLeb MKLeb requested a review from waynew March 7, 2022 23:56
@MKLeb
Copy link
Contributor Author

MKLeb commented Mar 8, 2022

re-run pr-macosx-catalina-x86_64-py3-pytest

@MKLeb
Copy link
Contributor Author

MKLeb commented Mar 8, 2022

re-run pr-ubuntu-2004-arm64-py3-pytest

@Ch3LL Ch3LL added the Phosphorus v3005.0 Release code name and version label Mar 8, 2022
Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

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

This will need a changelog since we are also editing the code.

And just a couple places in the tests where we could be using pathlib.Path() instead.

@MKLeb MKLeb requested a review from Ch3LL March 25, 2022 16:25
@MKLeb
Copy link
Contributor Author

MKLeb commented Mar 25, 2022

re-run all

@MKLeb
Copy link
Contributor Author

MKLeb commented Mar 30, 2022

re-run all

@MKLeb
Copy link
Contributor Author

MKLeb commented Apr 6, 2022

re-run pr-centos-7-x86_64-py3-tcp-pytest

@MKLeb
Copy link
Contributor Author

MKLeb commented Apr 6, 2022

re-run pr-centosstream-8-x86_64-py3-pytest

@MKLeb
Copy link
Contributor Author

MKLeb commented Apr 6, 2022

re-run pr-centos-7-x86_64-py3-pycryptodome-pytest

@Ch3LL Ch3LL merged commit f6a5090 into saltstack:master Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Phosphorus v3005.0 Release code name and version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants