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

webui: tests: switch some storage tests to nondestructive #4884

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

KKoukiou
Copy link
Contributor

@KKoukiou KKoukiou commented Jul 6, 2023

For the two tests affected in this commit it was enough to use add_ram_disk test storage helper, which has includes a teardown cleanup.

@KKoukiou KKoukiou force-pushed the webui-non-destructive-tests branch 2 times, most recently from b20c192 to b1a6540 Compare July 6, 2023 13:10
@KKoukiou KKoukiou marked this pull request as draft July 6, 2023 16:07
@KKoukiou KKoukiou force-pushed the webui-non-destructive-tests branch 2 times, most recently from 4ab826d to 42451b1 Compare July 7, 2023 16:48
@KKoukiou KKoukiou marked this pull request as ready for review July 10, 2023 10:17
@KKoukiou KKoukiou requested review from jelly and rvykydal July 10, 2023 10:17
ui/webui/test/helpers/storage.py Show resolved Hide resolved
Copy link
Contributor

@rvykydal rvykydal left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@KKoukiou KKoukiou force-pushed the webui-non-destructive-tests branch from 42451b1 to a898673 Compare July 10, 2023 13:35
Copy link
Contributor

@VladimirSlavik VladimirSlavik left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you!

Copy link
Contributor

@M4rtinK M4rtinK left a comment

Choose a reason for hiding this comment

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

Looks good to me as well. :)


class VirtInstallMachineCase(MachineCase):
MachineCase.machine_class = VirtInstallMachine

def setUp(self):
# FIXME: running this in destructive tests fails because the SSH session closes before this is run
if self.is_nondestructive():
self.addCleanup(self.rescanStorage)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could print/log a warning when someone calls this by mistake in destructive mode ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm i don't see how I can know if rescanStorage will be added with an addCleanup in the future

@KKoukiou KKoukiou force-pushed the webui-non-destructive-tests branch 3 times, most recently from 10cd471 to 36b195d Compare July 13, 2023 08:28
@rvykydal
Copy link
Contributor

/webui-test

@KKoukiou
Copy link
Contributor Author

Permian tests are failing https://github.com/rhinstaller/anaconda/actions/runs/5541527226

For the two tests affected in this commit it was enough to use
add_ram_disk test storage helper, which has includes a teardown cleanup.
@KKoukiou KKoukiou force-pushed the webui-non-destructive-tests branch from 36b195d to 3d84a10 Compare July 13, 2023 11:06
@KKoukiou
Copy link
Contributor Author

/kickstart-test --waive webui only

@KKoukiou KKoukiou merged commit c4100f3 into rhinstaller:master Jul 13, 2023
@KKoukiou KKoukiou deleted the webui-non-destructive-tests branch July 13, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants