-
Notifications
You must be signed in to change notification settings - Fork 39
/
noxconfig.py
55 lines (42 loc) · 1.3 KB
/
noxconfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
from typing import Iterable
from exasol.toolbox.nox.plugin import hookimpl
class StartDB:
@hookimpl
def pre_integration_tests_hook(self, session, config, context):
port = context.get("port", 8563)
db_version = context.get("db_version", "7.1.17")
session.run(
"itde",
"spawn-test-environment",
"--create-certificates",
"--environment-name",
"test",
"--database-port-forward",
f"{port}",
"--bucketfs-port-forward",
"2580",
"--docker-db-image-version",
db_version,
"--db-mem-size",
"4GB",
external=True,
)
class StopDB:
@hookimpl
def post_integration_tests_hook(self, session, config, context):
session.run("docker", "kill", "db_container_test", external=True)
@dataclass(frozen=True)
class Config:
root: Path = Path(__file__).parent
doc: Path = Path(__file__).parent / "doc"
version_file: Path = Path(__file__).parent / "pyexasol" / "version.py"
path_filters: Iterable[str] = (
"dist",
".eggs",
"venv",
)
plugins = [StartDB, StopDB]
PROJECT_CONFIG = Config()