def test_enterprise( self, enterprise_artifact: Path, enterprise_1_11_artifact: Path, enterprise_1_10_artifact: Path, enterprise_1_9_artifact: Path, tmpdir_factory: TempdirFactory, ) -> None: """ ``True`` is returned when given a DC/OS Enterprise artifact. """ artifacts = [ enterprise_artifact, enterprise_1_11_artifact, enterprise_1_10_artifact, enterprise_1_9_artifact, ] for artifact in artifacts: random = uuid.uuid4().hex workspace_dir = Path(str(tmpdir_factory.mktemp(random))) assert _is_enterprise( build_artifact=artifact, workspace_dir=workspace_dir, ) # We delete the workspace during the test so as not to use too much # space for the test. shutil.rmtree(path=str(workspace_dir))
def test_1_11( self, enterprise_1_11_artifact: Path, tmpdir: local, ) -> None: """ ``True`` is returned when given a DC/OS Enterprise 1.11 artifact. """ assert _is_enterprise( build_artifact=enterprise_1_11_artifact, workspace_dir=Path(str(tmpdir)), )
def test_1_9( self, oss_1_9_artifact: Path, tmpdir: local, ) -> None: """ ``False`` is returned when given a DC/OS OSS 1.9 artifact. """ assert not _is_enterprise( build_artifact=oss_1_9_artifact, workspace_dir=Path(str(tmpdir)), )