Skip to content

Commit

Permalink
Update project configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed May 16, 2024
1 parent 25bed75 commit aecc2cd
Showing 1 changed file with 20 additions and 23 deletions.
43 changes: 20 additions & 23 deletions noxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,13 @@
MutableMapping,
)

from exasol.toolbox.nox.plugin import hookimpl
from nox import Session


@dataclass(frozen=True)
class Config:
root: Path = Path(__file__).parent
doc: Path = Path(__file__).parent / "doc"
version_file: Path = Path(__file__).parent / "exasol" / "bucketfs" / "version.py"
path_filters: Iterable[str] = (
"dist",
".eggs",
"venv",
)

@staticmethod
def pre_integration_tests_hook(
session: Session, _config: Config, _context: MutableMapping[str, Any]
) -> bool:
"""Implement if project specific behaviour is required"""
class IntegrationTestsPlugin:
@hookimpl
def pre_integration_tests_hook(self, session, config, context):
with TemporaryDirectory() as tmp_dir:
tmp_dir = Path(tmp_dir)
checkout_name = "ITDE"
Expand All @@ -51,15 +39,24 @@ def pre_integration_tests_hook(
"--db-mem-size",
"4GB",
)
return True

@staticmethod
def post_integration_tests_hook(
session: Session, _config: Config, _context: MutableMapping[str, Any]
) -> bool:
"""Implement if project specific behaviour is required"""
@hookimpl
def post_integration_tests_hook(self, session, config, context):
session.run("docker", "kill", "db_container_test", external=True)
return True


@dataclass(frozen=True)
class Config:
root: Path = Path(__file__).parent
doc: Path = Path(__file__).parent / "doc"
version_file: Path = Path(__file__).parent / "exasol" / "bucketfs" / "version.py"
path_filters: Iterable[str] = (
"dist",
".eggs",
"venv",
)

plugins = [IntegrationTestsPlugin]


PROJECT_CONFIG = Config()

0 comments on commit aecc2cd

Please sign in to comment.