-
Notifications
You must be signed in to change notification settings - Fork 108
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
Pbench Server client library and functional tests #2941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
But, of course, I have a pile of nits for you. 🍤
Changing to draft mode for a bit: I went on autopilot while my daughter was chatting to me on the phone and pushed a commit after the functional tests ran... forgetting I'd meant to add some additional test cases. (And I didn't even blacken the code 😵💫 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, but...new code, new nits. 🥴
- The increased use of
CaseInsensitiveDict
seems good...but, I think we need even more. - I resisted the temptation to request unit tests in my last review, but...since you've added some stuff that looks like unit testing to the functional test, I figured I would bring it up in this one. 🙂
- A few of the exception assertions should probably use formatted strings (with an argument) -- I don't think they require raw strings.
- I've suggested two more, easy test cases.
- And, there are a few other, smaller things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea of adding a third major component to the test scripts is daunting (there are many semi-hidden dependencies I suspect will be ugly to resolve), and the idea of piggybacking unit testing onto either of the existing major components is deeply unsatisfying.
So I guess I'm going to dump this into the "draft" bin and let it stew while I think about how much effort it's actually worth. 😦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I just had one query.
PBENCH-810 This adds the beginnings of a simple Pbench Server python client library (with a `Pbench` class) and a few initial functional test modules. The modules are written in Python using the Pytest framework to give us convenient test modularization and fixtures. We use a fixture to establish a Pbench Server connection, for example. The functional test modules currently include a simple validation that we can connect to a server and retrieve the server's endpoints, and a test of Pbench Server user operations including register, login, logout, profile access/update, and delete. The `PBENCH_SERVER` environment variable provides the server host for connection; the `pbench` fixture will cause failure if the environment variable isn't defined, or if connection fails.
. Split off "client" unit tests for connect and login . Modified exec-unittests to recognize the extra "major"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
Unfortunately, I found two small things...one of which leaves me with a medium-sized mystery....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
PBENCH-810
This adds the beginnings of a simple Pbench Server python client library (with a
Pbench
class) and a few initial functional test modules.The modules are written in Python using the Pytest framework to give us convenient test modularization and fixtures. We use a fixture to establish a Pbench Server connection, for example.
The functional test modules currently include a simple validation that we can connect to a server and retrieve the server's endpoints, and a test of Pbench Server user operations including register, login, logout, profile access/update, and delete.
The
PBENCH_SERVER
environment variable provides the server host for connection; thepbench
fixture will cause failure if the environment variable isn't defined, or if connection fails.