-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add GUI call functionality to scauto CLI #147
Add GUI call functionality to scauto CLI #147
Conversation
Please don't mind the unit test failures since unit tests are still a work in progress and they are not reliable yet. I will review the PR ASAP! |
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.
Here are some concerns that I have regarding the introduction of the GUI command.
The other problem that I see is that without initialization of the controller, a lot of required packages and modules that are installed dynamically are not installed. So I guess we can skip configuration (by changing the code) but we need to run at least the setup in the controller (and maybe even cleanup). |
Add CLI GUI commands to make direct calls to the GUI model library functions necessary for some manual and remotely executed test steps. As a part of the change to run GUI functions from the CLI, we also need to move the initialization of the screen object in __init__ instead of __enter__. resolves redhat-qe-security#146
kb_write sent the text directly two keyboard.write() which doesn't handle uppercase characters. A workaround is to use keyboard.sent() to send shift+<char> for the uppercase characters and rely on keyboard.write() to send the rest.
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.
Sorry for the late review, I was fighting with some other stuff but now it is over. Really great approach, I like it. I have a couple of concerns but it is definitely the right path. I will need to also do more testing with previous tests to see that everything is in order.
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.
One more change, but I run our tests in the current state of the code and they are passing!!
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.
no concerns from my side.
e194d89
to
35be8db
Compare
One side question for you. I took the Should I add a note in a commit message or a comment in the cli_commands.py file itself? |
@spoore1 I am not 100% sure how that code works but it won't hurt to add a reference somewhere. I don't mind if it is a comment or in the commit message. |
5f2cfab
to
482abf4
Compare
Updates patch that fix Controller and cli to better handle setup. Follow up changes per PR review also added to cli_commands.py. Add note about where NaturalOrderGroup in cli_commands came from.
@spoore1 @GeorgePantelakis We just talked with @Jakuje and came up with an idea that it would be really great to have an example and/or documentation and/or tests for the new functionality being added. Motivation behind this is that somebody won't break some of your use-cases in future. |
Hello @ep69 @Jakuje, |
Example/documentation/test were only ideas. The important thing from my POV is demonstrating how is this functionality we are adding in this PR used, because it wasn't clear to me (but I am not familiar with the tooling). I'd like to prevent the situation that 1. this is merged 2. our team uses and develops SCAutolib further and forgets about this use-case 3. we break something for Scott or his team. |
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.
Run all the tests again with the latest code and everything passes, the logging works (it is not perfect but it is good enough for this stage) and the code seems in order. The Linder fails seem relevant but after the changes we can merge. For the documentation I have created #149 so we can do that in a different PR, doesn't have to be in this one.
e1c1c9e
to
091f11a
Compare
@GeorgePantelakis ok, I fixed the linter issues but, I had to update the flake8 github workflow to install krb5-config to do so. Is that how it should be fixed or is there something else I should do instead for that? |
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.
LGTM, @spoore1 if you don't have anything else to add we can merge!
Update to fix logging to work better when multiple scauto commands may be run.
@GeorgePantelakis I found a small issue when I tried setup on a new system. the /tmp/SC-tests directory wasn't created. I added the Path.mkdir() for the html_directory to the logging commit. So far, that's the only thing I've found with a fresh install so I think it's good now. |
LGTM, if we are okay we can merge |
4cd3784
into
redhat-qe-security:master
Add CLI GUI commands to make direct calls to the GUI model library functions necessary for some manual and remotely executed test steps.
As a part of the change to run GUI functions from the CLI, we also need to move the initialization of the screen object in init instead of enter.
resolves #146
Todo: