tests: improve vmtest

`wait_for_text()` takes a regex and it seems that sometimes OCR fails to
recognize the dots in the version string. To make this more resilient,
zero or one symbol is not matched between the numerical components of
the version string.
This commit is contained in:
WilliButz 2024-09-07 22:03:48 +02:00
parent a1630aaf9f
commit ee7e7ed147
No known key found for this signature in database
GPG key ID: AB05DF703EB9DC70

View file

@ -78,7 +78,9 @@ pkgs.nixosTest {
machine.screenshot("3_rendered_admin_interface") machine.screenshot("3_rendered_admin_interface")
machine.succeed("su - alice -c 'xdotool click 1' >&2") machine.succeed("su - alice -c 'xdotool click 1' >&2")
machine.succeed("su - alice -c 'xdotool key --delay 100 Page_Down' >&2") machine.succeed("su - alice -c 'xdotool key --delay 100 Page_Down' >&2")
machine.wait_for_text("${authentik-version}") # sometimes the cursor covers the version string
machine.succeed("su - alice -c 'xdotool mousemove_relative 50 50' >&2")
machine.wait_for_text("${builtins.replaceStrings ["."] [".?"] authentik-version}")
machine.screenshot("4_correct_version_in_admin_interface") machine.screenshot("4_correct_version_in_admin_interface")
with subtest("nginx proxies to authentik"): with subtest("nginx proxies to authentik"):