cockpit
cockpit copied to clipboard
testlib: add MachineCase.reboot and MachineCase.wait_reboot functions which allows restart messages
Tests which call m.reboot or m.wait_reboot should automatically call self.allow_restart_journal_mesages so we don't have to add this for every test which uses these functions.
To implement this we will need to extend the MachineCase class and add two new functions reboot and wait_reboot which calls self.allow_restart_journal_messages and either self.machine.reboot() or self.machine.wait_reboot() taking the timeout_sec parameter into account.
Hey there! I would like to work on this issue
Sure, there are no pre-assigned issues so please try to setup a Cockpit development environment and ask any questions if they come up.
Sure, there are no pre-assigned issues so please try to setup a Cockpit development environment and ask any questions if they come up.
so I clone the project locally but I'm unable to understand how to implement changes please help me in this
Sure, there are no pre-assigned issues so please try to setup a Cockpit development environment and ask any questions if they come up.
what exactly I have to do is extend the MachineCase class and add two functions reboot which calls self.machine.reboot(). and wait_reboot which calls self.machine.wait_reboot() the thing in which I'm confused is timeout_sec parameter please help me out in this
Sure, there are no pre-assigned issues so please try to setup a Cockpit development environment and ask any questions if they come up.
what exactly I have to do is extend the MachineCase class and add two functions reboot which calls self.machine.reboot(). and wait_reboot which calls self.machine.wait_reboot() the thing in which I'm confused is timeout_sec parameter please help me out in this
The new function should accept a timeout_sec parameter and pass it through.
Tests which call
m.rebootorm.wait_rebootshould automatically callself.allow_restart_journal_mesagesso we don't have to add this for every test which uses these functions.To implement this we will need to extend the
MachineCaseclass and add two new functionsrebootandwait_rebootwhich callsself.allow_restart_journal_messagesand eitherself.machine.reboot()orself.machine.wait_reboot()taking thetimeout_secparameter into account.
Can u please review the changes made.
Is it necessary to create a new subclass that inherits from the "MachineCase" class in order to make changes, or can modifications be made directly to the "MachineCase" class?
Hello,
I'm Deep. I'm interested in working on this issue. Could you please explain the problem and guide me on setting up the repository on my computer? I'm eager to contribute and give my best effort to resolve this. This will be my first valuable contribution. Thank you for giving me this opportunity.
Hello @Deeppjp116 thanks for your interest! Please see https://github.com/cockpit-project/cockpit/blob/main/HACKING.md for how to set yourself up for Cockpit development.
ok thanks
hi @martinpitt sir, I am working on Windows. Can you help me with the setup process?
@Deeppjp116 I'm afraid I can't. We've heard reports that it is possible to build and run Cockpit on WSL, but nobody in the team has personal experience with it. I recommend to install a Linux distribution into WSL (Ubuntu 22.04 is a popular choice, and Fedora hopefully also works), and then just follow HACKING.md.
Thanks for the suggestion. I'll give it a try by installing a Linux distribution into WSL and following the instructions in HACKING.md.
Hello @martinpitt ,
I hope this message finds you well. My name is Harshal, and I've recently come across issue #18644 , titled "testlib: add MachineCase.reboot and MachineCase.wait_reboot functions which allows restart messages," and I'm eager to take on the challenge and contribute to its resolution. This will be my first valuable contribution. Thank you for giving me this opportunity.
Hey @Harshalvk, thanks for the interest. There's already a draft PR #18897 working on the issue. Please, choose another one from the good first issues.
You may also want to set up a local development environment first, please follow https://github.com/cockpit-project/cockpit/blob/main/HACKING.md. Feel free to ask in Matrix if you get stuck.