containers / podman-desktop-e2e

Podman desktop e2e tests
Apache License 2.0
3 stars 8 forks source link

Enable running custom code on the pde2e-runner image to enable custom test environment preparation #243

Open odockal opened 1 week ago

odockal commented 1 week ago

Right now, we are quite tied to what pde2e-runner/*.ps1(sh) script does. It is all hardcoded and driven by use of parameters.

This mechanism should enable to execute arbitrary code outside of the script. Let's imagine it as an url to a ie. script file in github repo of git gist. So the parameter would be an url of the raw script.

runner script would then, if provided, run the script before running npm target.

Why? Ie. If I want to test a podman remote feature in podman desktop, I need to setup podman machine first and remove some files on the target host. Or If I want to test compose loaded containers, I also need to run some podman compose commands in advance. NPM target can run specific test which counts with particular test environment setup, but in order to influence target host environment, we need to have a way to run custom code there.

odockal commented 1 week ago

If there are any security concerns, we can instead of url, have only a subpath passed to a file we want to execute. And the url/location would be given, ie. only files under podman-desktop repo podman-desktop/tests/playwright/resources/scripts/ would be accepted. This way we may have freedom to run what we need and also a gate guard in podman-desktop PR review and check process.