On Wed, 2020-05-13 at 12:22 -0400, pmkellly@xxxxxxxxxxxx wrote: > In regard to: QA:Testcase base service manipulation > > Back about a year ago now I started fiddling around with this test case > to see if I could make it a bit easier to run. > > A little background first. After I have my test machine set up and ready > to start testing a new drop I always do the login tests first. Then I > set the pass word to "none" and set the account to auto login. I do this > because I find I end up doing lots of restarts while I am testing and > prefer to not be bothered with the logins as security on my test machine > is not an issue. I also set the root pass word, just because I always > set a root password on my test machine. > > Now back to the test case. My approach to the test case is to have four > (4) bash scripts that do each part of the test and reboot the system. I > save the results for the commands in a file and have another file to > keep track of which step last ran so I know which step to run next. I > still have to write my top level script and write a little python code > to parse the results file and report. > > While I was getting the four individual scripts running I had a problem > with using the (su -c). I seem to recall that using (su -c) required a > list being edited to allow the user to use (su -c) I ended up putting > (sudo su) at the top of each script and just ran the commands without > the (su -c). That seemed to work fine. > > Is there a critical to the test reason to use (su -c)? No. It really just means "do this as root". There are various ways you can indicate this when writing instructions, all with benefits and drawbacks... I've kinda wobbled around a few different styles for this when writing in the wiki over the years, you'll find different test cases and common bugs entries and so on that do it differently depending on when they were written :) Sometimes I've wanted to write some kind of template for it, but never get enough roundtuits... > Is using the > approach I took a problem for the test? Not at all. > Is their a better approach I could take to this? It sounds like you're dealing with it fine :) We do have this test case fully automated in openQA too, but it's always good to have confirmation from someone testing a different way. -- Adam Williamson Fedora QA Community Monkey IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net http://www.happyassassin.net _______________________________________________ test mailing list -- test@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to test-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/test@xxxxxxxxxxxxxxxxxxxxxxx