diff --git a/tests/main.py b/tests/main.py index 04f9b93..dc6d9e9 100644 --- a/tests/main.py +++ b/tests/main.py @@ -11,7 +11,7 @@ from utils.properties import ContainerObject class Container(enum.Enum): """Enumerate about the Geometry node""" - BLENDER = ContainerObject(name='Blender', image='stilobique/blender') + BLENDER = ContainerObject(name='Blender', image='stilobique/blender', tag='3.1.2') def launch_unit_test(test: [str] = None): diff --git a/tests/utils/properties.py b/tests/utils/properties.py index b586215..3cc955c 100644 --- a/tests/utils/properties.py +++ b/tests/utils/properties.py @@ -6,22 +6,28 @@ from pathlib import PurePosixPath class ContainerObject(object): """All data request to launch one dedicated container""" - def __init__(self, name: str, image: str): + def __init__(self, name: str, image: str, tag: str = None): self.label: str = name.lower() self.image: str = image - self.tag: str = self.set_tag() + self.tag: str = self.set_tag(tag) self.local_folder: str = '' self.volumes: list[str] = self.set_volumes() self.environments: list[str] = self.set_environments() self.commands: list[str] = self.set_commands() self.ref = f'{self.image}:{self.tag}' - def set_tag(self): + def set_tag(self, tag): """Determine the tag use with the docker image call""" if 'blender' in self.label: - return 'latest' + if tag is not None: + return tag + else: + return 'latest' elif 'unreal' in self.label: - return 'dev-slim-4.27.2' + if tag is not None: + return tag + else: + return 'dev-slim-4.27.2' else: return None