tests: fix and update tests:

- update code to newer version of `sh`
- update code to newer version of `selenium`
- update names of OMEMO algorithms
- fix paths and names used to mount source to the test container
- skip modules using `Gst` and `PyQt` when they are not available.
This commit is contained in:
Goffi 2024-03-05 17:31:56 +01:00
commit 48201780de

View file

@ -26,7 +26,7 @@ from datetime import datetime
import sh
import io
import sat_templates
import libervia
from libervia import web
from libervia.backend.core import exceptions
from libervia.backend.tools.common import regex
import yaml
@ -145,34 +145,34 @@ def use_e2e_env():
keep_containers = keep_profiles = keep_vnc = visual = True
for p in Path.cwd().parents:
package_path = p / "sat"
package_path = p / "libervia"
docker_path = p / "docker"
if package_path.is_dir() and docker_path.is_dir():
backend_root_path = p
break
else:
raise exceptions.NotFound(
"Can't find root of SàT code, are you sure that you are running the test "
"from the backend repository?"
"Can't find root of Libervia code, are you sure that you are running the "
"test from the backend repository?"
)
libervia_web_path = Path(libervia.__file__).parent.resolve()
libervia_web_path = Path(web.__file__).parent.resolve()
libervia_web_root_path = libervia_web_path.parent
if (libervia_web_root_path / ".hg").is_dir():
libervia_web_source = libervia_web_root_path
libervia_web_target = "/src/libervia-web"
else:
libervia_web_source = libervia_web_path
libervia_web_target = "/src/libervia-web/libervia"
libervia_web_target = "/src/libervia-web/libervia/web"
sat_templates_path = Path(sat_templates.__file__).parent.resolve()
sat_templates_root_path = sat_templates_path.parent
if (sat_templates_root_path / ".hg").is_dir():
sat_templates_source = sat_templates_root_path
sat_templates_target = "/src/libervia-templates"
libervia_templates_source = sat_templates_root_path
libervia_templates_target = "/src/libervia-templates"
else:
sat_templates_source = sat_templates_path
sat_templates_target = "/src/libervia-templates/sat_templates"
libervia_templates_source = sat_templates_path
libervia_templates_target = "/src/libervia-templates/sat_templates"
compose_e2e_path = docker_path / "docker-compose-e2e.yml"
if not compose_e2e_path.is_file():
@ -201,8 +201,8 @@ def use_e2e_env():
target: {libervia_web_target}
read_only: true
- type: bind
source: {sat_templates_source}
target: {sat_templates_target}
source: {libervia_templates_source}
target: {libervia_templates_target}
read_only: true
"""
),