diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 3fc05be7d..b53fe1563 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [3.0.0](changes_3.0.0.md) * [2.1.0](changes_2.1.0.md) * [2.0.0](changes_2.0.0.md) * [1.7.1](changes_1.7.1.md) @@ -30,6 +31,7 @@ --- hidden: --- +changes_3.0.0 changes_2.1.0 changes_2.0.0 changes_1.7.1 diff --git a/doc/changes/changes_3.0.0.md b/doc/changes/changes_3.0.0.md new file mode 100644 index 000000000..046fb69a8 --- /dev/null +++ b/doc/changes/changes_3.0.0.md @@ -0,0 +1,19 @@ +# Integration-Test-Docker-Environment 3.0.0, released 2024-02-22 + +## Summary + +Removed `pytest-itde` plugin. + +### Supported Exasol Versions + +* **7.1**: up to 7.1.17 +* **8**: 8.18.1 + +### Breaking Changes + +* Removed `pytest-itde` plugin See also + + Users which do rely on the plugin should consider moving to the standalone [pytest-itde](https://pypi.org/project/pytest-exasol-itde/) plugin. + The related project can be found [here](https://github.com/exasol/pytest-plugins) + + diff --git a/poetry.lock b/poetry.lock index 2d40e3365..1dab49107 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -16,7 +15,6 @@ files = [ name = "argcomplete" version = "2.1.2" description = "Bash tab completion for argparse" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -32,7 +30,6 @@ test = ["coverage", "flake8", "mypy", "pexpect", "wheel"] name = "babel" version = "2.14.0" description = "Internationalization utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -50,7 +47,6 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] name = "bcrypt" version = "4.1.2" description = "Modern password hashing for your software and your servers" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -91,7 +87,6 @@ typecheck = ["mypy"] name = "beautifulsoup4" version = "4.12.3" description = "Screen-scraping library" -category = "dev" optional = false python-versions = ">=3.6.0" files = [ @@ -113,7 +108,6 @@ lxml = ["lxml"] name = "certifi" version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -125,7 +119,6 @@ files = [ name = "cffi" version = "1.16.0" description = "Foreign Function Interface for Python calling C code." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -190,7 +183,6 @@ pycparser = "*" name = "charset-normalizer" version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -290,7 +282,6 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -305,7 +296,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -317,7 +307,6 @@ files = [ name = "colorlog" version = "6.8.2" description = "Add colours to the output of Python's logging module." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -335,7 +324,6 @@ development = ["black", "flake8", "mypy", "pytest", "types-colorama"] name = "cryptography" version = "42.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -390,7 +378,6 @@ test-randomorder = ["pytest-randomly"] name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -402,7 +389,6 @@ files = [ name = "deprecated" version = "1.2.14" description = "Python @deprecated decorator to deprecate old python classes, functions or methods." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -420,7 +406,6 @@ dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] name = "distlib" version = "0.3.8" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -432,7 +417,6 @@ files = [ name = "docker" version = "6.1.3" description = "A Python library for the Docker Engine API." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -453,7 +437,6 @@ ssh = ["paramiko (>=2.4.3)"] name = "docutils" version = "0.17.1" description = "Docutils -- Python Documentation Utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -465,7 +448,6 @@ files = [ name = "exasol-bucketfs" version = "0.9.0" description = "BucketFS utilities for the Python programming language" -category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -482,7 +464,6 @@ typeguard = "4.0.0" name = "exasol-error-reporting" version = "0.4.0" description = "Exasol Python Error Reporting" -category = "main" optional = false python-versions = ">=3.8,<4.0" files = [ @@ -494,7 +475,6 @@ files = [ name = "exasol-sphinx-github-pages-generator" version = "0.1.1" description = "Generates Sphinx GitHub pages for a given Git Repository" -category = "dev" optional = false python-versions = ">=3.8,<4.0" files = [] @@ -518,7 +498,6 @@ resolved_reference = "9692e4384b6ba9cbede3ad8510523ebf4f36b830" name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -533,7 +512,6 @@ test = ["pytest (>=6)"] name = "fabric" version = "3.2.2" description = "High level SSH command execution" -category = "main" optional = false python-versions = "*" files = [ @@ -554,7 +532,6 @@ pytest = ["pytest (>=7)"] name = "filelock" version = "3.13.1" description = "A platform independent file lock." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -571,7 +548,6 @@ typing = ["typing-extensions (>=4.8)"] name = "furo" version = "2022.9.29" description = "A clean customisable Sphinx documentation theme." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -589,7 +565,6 @@ sphinx-basic-ng = "*" name = "gitdb" version = "4.0.11" description = "Git Object Database" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -604,7 +579,6 @@ smmap = ">=3.0.1,<6" name = "gitpython" version = "3.1.42" description = "GitPython is a Python library used to interact with Git repositories" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -622,7 +596,6 @@ test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre name = "humanfriendly" version = "10.0" description = "Human friendly output for text interfaces using Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -637,7 +610,6 @@ pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_ve name = "idna" version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -649,7 +621,6 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -661,7 +632,6 @@ files = [ name = "importlib-metadata" version = "7.0.1" description = "Read metadata from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -681,7 +651,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "importlib-resources" version = "6.1.1" description = "Read resources from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -700,7 +669,6 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -712,7 +680,6 @@ files = [ name = "invoke" version = "2.2.0" description = "Pythonic task execution" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -724,7 +691,6 @@ files = [ name = "jinja2" version = "3.1.3" description = "A very fast and expressive template engine." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -742,7 +708,6 @@ i18n = ["Babel (>=2.7)"] name = "joblib" version = "1.3.2" description = "Lightweight pipelining with Python functions" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -754,7 +719,6 @@ files = [ name = "jsonpickle" version = "3.0.3" description = "Python library for serializing any arbitrary object graph into JSON" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -770,7 +734,6 @@ testing = ["ecdsa", "feedparser", "gmpy2", "numpy", "pandas", "pymongo", "pytest name = "lockfile" version = "0.12.2" description = "Platform-independent file locking module" -category = "main" optional = false python-versions = "*" files = [ @@ -782,7 +745,6 @@ files = [ name = "luigi" version = "3.5.0" description = "Workflow mgmgt + task scheduling + dependency resolution." -category = "main" optional = false python-versions = "*" files = [ @@ -804,7 +766,6 @@ toml = ["toml (<2.0.0)"] name = "markdown-it-py" version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -829,7 +790,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "markupsafe" version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -899,7 +859,6 @@ files = [ name = "mdit-py-plugins" version = "0.3.5" description = "Collection of plugins for markdown-it-py" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -919,7 +878,6 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] name = "mdurl" version = "0.1.2" description = "Markdown URL utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -931,7 +889,6 @@ files = [ name = "mypy" version = "1.8.0" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -979,7 +936,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -991,7 +947,6 @@ files = [ name = "myst-parser" version = "0.17.2" description = "An extended commonmark compliant parser, with bridges to docutils & sphinx." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1018,7 +973,6 @@ testing = ["beautifulsoup4", "coverage", "docutils (>=0.17.0,<0.18.0)", "pytest name = "netaddr" version = "1.2.1" description = "A network address manipulation library for Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1033,7 +987,6 @@ nicer-shell = ["ipython"] name = "networkx" version = "3.1" description = "Python package for creating and manipulating graphs and networks" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1052,7 +1005,6 @@ test = ["codecov (>=2.1)", "pytest (>=7.2)", "pytest-cov (>=4.0)"] name = "nox" version = "2022.11.21" description = "Flexible test automation." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1073,7 +1025,6 @@ tox-to-nox = ["jinja2", "tox"] name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1085,7 +1036,6 @@ files = [ name = "paramiko" version = "3.4.0" description = "SSH2 protocol library" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1107,7 +1057,6 @@ invoke = ["invoke (>=2.0)"] name = "platformdirs" version = "4.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1123,7 +1072,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest- name = "pluggy" version = "1.4.0" description = "plugin and hook calling mechanisms for python" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1139,7 +1087,6 @@ testing = ["pytest", "pytest-benchmark"] name = "portalocker" version = "2.8.2" description = "Wraps the portalocker recipe for easy usage" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1159,7 +1106,6 @@ tests = ["pytest (>=5.4.1)", "pytest-cov (>=2.8.1)", "pytest-mypy (>=0.8.0)", "p name = "pyasn1" version = "0.5.1" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ @@ -1171,7 +1117,6 @@ files = [ name = "pycparser" version = "2.21" description = "C parser in Python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1183,7 +1128,6 @@ files = [ name = "pydot" version = "2.0.0" description = "Python interface to Graphviz's Dot" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1203,7 +1147,6 @@ tests = ["black", "chardet", "tox"] name = "pyexasol" version = "0.25.2" description = "Exasol python driver with extra features" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1228,7 +1171,6 @@ ujson = ["ujson"] name = "pygments" version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1244,7 +1186,6 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pynacl" version = "1.5.0" description = "Python binding to the Networking and Cryptography (NaCl) library" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1271,7 +1212,6 @@ tests = ["hypothesis (>=3.27.0)", "pytest (>=3.2.1,!=3.3.0)"] name = "pyopenssl" version = "24.0.0" description = "Python wrapper module around the OpenSSL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1290,7 +1230,6 @@ test = ["flaky", "pretend", "pytest (>=3.0.1)"] name = "pyparsing" version = "3.1.1" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" optional = false python-versions = ">=3.6.8" files = [ @@ -1305,7 +1244,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pyreadline3" version = "3.4.1" description = "A python implementation of GNU readline." -category = "main" optional = false python-versions = "*" files = [ @@ -1317,7 +1255,6 @@ files = [ name = "pytest" version = "7.4.4" description = "pytest: simple powerful testing with Python" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1340,7 +1277,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-daemon" version = "3.0.1" description = "Library to implement a well-behaved Unix daemon process." -category = "main" optional = false python-versions = ">=3" files = [ @@ -1361,7 +1297,6 @@ test = ["coverage", "docutils", "testscenarios (>=0.4)", "testtools"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1376,7 +1311,6 @@ six = ">=1.5" name = "pytz" version = "2024.1" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -1388,7 +1322,6 @@ files = [ name = "pywin32" version = "306" description = "Python for Window Extensions" -category = "main" optional = false python-versions = "*" files = [ @@ -1412,7 +1345,6 @@ files = [ name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1421,6 +1353,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -1428,8 +1361,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -1446,6 +1386,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -1453,6 +1394,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -1462,7 +1404,6 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1484,7 +1425,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rsa" version = "4.9" description = "Pure-Python RSA implementation" -category = "main" optional = false python-versions = ">=3.6,<4" files = [ @@ -1499,7 +1439,6 @@ pyasn1 = ">=0.1.3" name = "setuptools" version = "69.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1516,7 +1455,6 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar name = "simplejson" version = "3.19.2" description = "Simple, fast, extensible JSON encoder/decoder for Python" -category = "main" optional = false python-versions = ">=2.5, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1624,7 +1562,6 @@ files = [ name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1636,7 +1573,6 @@ files = [ name = "smmap" version = "5.0.1" description = "A pure Python implementation of a sliding window memory map manager" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1648,7 +1584,6 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" optional = false python-versions = "*" files = [ @@ -1660,7 +1595,6 @@ files = [ name = "soupsieve" version = "2.5" description = "A modern CSS selector implementation for Beautiful Soup." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1672,7 +1606,6 @@ files = [ name = "sphinx" version = "4.5.0" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1708,7 +1641,6 @@ test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] name = "sphinx-basic-ng" version = "1.0.0b2" description = "A modern skeleton for Sphinx themes." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1726,7 +1658,6 @@ docs = ["furo", "ipython", "myst-parser", "sphinx-copybutton", "sphinx-inline-ta name = "sphinxcontrib-applehelp" version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1742,7 +1673,6 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1758,7 +1688,6 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1774,7 +1703,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1789,7 +1717,6 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1805,7 +1732,6 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1821,7 +1747,6 @@ test = ["pytest"] name = "stopwatch-py" version = "2.0.1" description = "A simple stopwatch for python" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -1833,7 +1758,6 @@ files = [ name = "tenacity" version = "8.2.3" description = "Retry code until it succeeds" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1848,7 +1772,6 @@ doc = ["reno", "sphinx", "tornado (>=4.5)"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1860,7 +1783,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1872,7 +1794,6 @@ files = [ name = "tornado" version = "6.4" description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." -category = "main" optional = false python-versions = ">= 3.8" files = [ @@ -1893,7 +1814,6 @@ files = [ name = "typeguard" version = "4.0.0" description = "Run-time type checker for Python" -category = "main" optional = false python-versions = ">=3.7.4" files = [ @@ -1913,7 +1833,6 @@ test = ["mypy (>=1.2.0)", "pytest (>=7)"] name = "typing-extensions" version = "4.9.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1925,7 +1844,6 @@ files = [ name = "urllib3" version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1943,7 +1861,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "virtualenv" version = "20.25.1" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1964,7 +1881,6 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess name = "websocket-client" version = "1.7.0" description = "WebSocket client for Python with low level API options" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1981,7 +1897,6 @@ test = ["websockets"] name = "wrapt" version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2061,7 +1976,6 @@ files = [ name = "zipp" version = "3.17.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -2076,4 +1990,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8,<4" -content-hash = "ba36f4adc303d066ac326d496e10bd83f9c82fb7278c3f980743c88882954161" +content-hash = "6763210b626a6704e6638a344662f8c16a2fe36535905d3fd7ee07eb4e19f76a" diff --git a/pyproject.toml b/pyproject.toml index 66b44ff52..63cd5101d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,8 @@ name = "exasol-integration-test-docker-environment" packages = [ { include = "exasol_integration_test_docker_environment" }, - { include = "pytest_itde" } ] -version = "2.1.0" +version = "3.0.0" description = "Integration Test Docker Environment for Exasol" license = "MIT" @@ -42,20 +41,16 @@ importlib_resources = ">=5.4.0" #Needed to copy resource files, can be removed a "stopwatch.py" = ">=1.0.0" exasol-bucketfs = ">=0.6.0,<2.0.0" pytest = "^7.2.2" -pyexasol = "^0.25.2" fabric = "^3.0.1" portalocker = "^2.7.0" exasol-error-reporting = "^0.4.0" -[tool.poetry.plugins.pytest11] -itde = "pytest_itde" - - [tool.poetry.group.dev.dependencies] toml = ">=0.10.2" nox = "^2022.1.7" mypy = "^1.1.1" exasol-sphinx-github-pages-generator = { git = "https://github.com/exasol/sphinx-github-pages-generator.git" } +pyexasol = "^0.25.2" [tool.poetry.scripts] diff --git a/pytest_itde/__init__.py b/pytest_itde/__init__.py deleted file mode 100644 index 50a9c7ddb..000000000 --- a/pytest_itde/__init__.py +++ /dev/null @@ -1,250 +0,0 @@ -import os -from typing import Tuple - -import pyexasol -import pytest - -from pytest_itde import config -from exasol_integration_test_docker_environment.lib.test_environment.ports import Ports - -EXASOL = config.OptionGroup( - prefix="exasol", - options=( - { - "name": "host", - "type": str, - "default": "localhost", - "help_text": "Host to connect to", - }, - { - "name": "port", - "type": int, - "default": Ports.forward.database, - "help_text": "Port on which the exasol db is listening", - }, - { - "name": "username", - "type": str, - "default": "SYS", - "help_text": "Username used to authenticate against the exasol db", - }, - { - "name": "password", - "type": str, - "default": "exasol", - "help_text": "Password used to authenticate against the exasol db", - }, - ), -) - -BUCKETFS = config.OptionGroup( - prefix="bucketfs", - options=( - { - "name": "url", - "type": str, - "default": f"http://127.0.0.1:{Ports.forward.bucketfs}", - "help_text": "Base url used to connect to the bucketfs service", - }, - { - "name": "username", - "type": str, - "default": "w", - "help_text": "Username used to authenticate against the bucketfs service", - }, - { - "name": "password", - "type": str, - "default": "write", - "help_text": "Password used to authenticate against the bucketfs service", - }, - ), -) - -SSH = config.OptionGroup( - prefix="ssh", - options=( - { - "name": "port", - "type": int, - "default": Ports.forward.ssh, - "help_text": "Port on which external processes can access the database via SSH protocol", - }, - ), -) - -def TestSchemas(value) -> Tuple[str]: - """ - Parses a test schema spec string. - - Args: - value: spec string for the test schemas. - e.g. "Schema1, Schema2, " or "Schema" - """ - - seperator = "," - if seperator in value: - schemas = value.split(seperator) - else: - schemas = [value] - schemas = (s.strip() for s in schemas) - schemas = (s for s in schemas if s != "") - return tuple(schemas) - - -ITDE = config.OptionGroup( - prefix="itde", - options=( - { - "name": "db_version", - "type": str, - "default": "8.18.1", - "help_text": "DB version to start, if value is 'external' an existing instance will be used", - }, - { - "name": "schemas", - "type": TestSchemas, - "default": ("TEST", "TEST_SCHEMA"), - "help_text": "Schemas which should be created for the session", - }, - ), -) - - -@pytest.fixture(scope="session") -def exasol_config(request) -> config.Exasol: - """Returns the configuration settings of the exasol db for this session.""" - cli_arguments = request.config.option - kwargs = EXASOL.kwargs(os.environ, cli_arguments) - return config.Exasol(**kwargs) - - -@pytest.fixture(scope="session") -def bucketfs_config(request) -> config.BucketFs: - """Returns the configuration settings of the bucketfs for this session.""" - cli_arguments = request.config.option - kwargs = BUCKETFS.kwargs(os.environ, cli_arguments) - return config.BucketFs(**kwargs) - - -@pytest.fixture(scope="session") -def ssh_config(request) -> config.Ssh: - """Returns the configuration settings for SSH access in this session.""" - cli_arguments = request.config.option - kwargs = SSH.kwargs(os.environ, cli_arguments) - return config.Ssh(**kwargs) - - -@pytest.fixture(scope="session") -def itde_config(request) -> config.Itde: - """Returns the configuration settings of the ITDE for this session.""" - cli_arguments = request.config.option - kwargs = ITDE.kwargs(os.environ, cli_arguments) - return config.Itde(**kwargs) - - -@pytest.fixture(scope="session") -def connection_factory(): - """ - Returns a database connection factory. - - Attention: - All created connections will be cleaned up (closed) at the end of the session. - """ - connections = [] - - def factory(config: config.Exasol): - con = pyexasol.connect( - dsn=f"{config.host}:{config.port}", - user=config.username, - password=config.password, - ) - connections.append(con) - return con - - yield factory - - for connection in connections: - connection.close() - - -@pytest.fixture(scope="session") -def _bootstrap_db(itde_config, exasol_config, bucketfs_config, ssh_config): - """Bootstraps the database should not be used from outside the itde plugin.""" - - def nop(): - pass - - def start_db(name, itde, exasol, bucketfs, ssh_access): - from urllib.parse import urlparse - - from exasol_integration_test_docker_environment.lib import api - - bucketfs_url = urlparse(bucketfs.url) - _, cleanup_function = api.spawn_test_environment( - environment_name=name, - database_port_forward=exasol.port, - bucketfs_port_forward=bucketfs_url.port, - ssh_port_forward=ssh_access.port, - db_mem_size="4GB", - docker_db_image_version=itde.db_version, - ) - return cleanup_function - - db_name = "pytest_exasol_db" - bootstrap_db = itde_config.db_version != "external" - - start = ( - lambda: start_db(db_name, itde_config, exasol_config, bucketfs_config, ssh_config) - if bootstrap_db - else lambda: nop - ) - stop = start() - yield - stop() - - -@pytest.fixture(scope="session") -def itde( - _bootstrap_db, - itde_config, - exasol_config, - bucketfs_config, - connection_factory, -) -> config.TestConfig: - """Starts a docker based test environment and returns the associated test config.""" - connection = connection_factory(exasol_config) - - for schema in itde_config.schemas: - connection.execute(f"DROP SCHEMA IF EXISTS {schema} CASCADE;") - connection.execute(f"CREATE SCHEMA {schema};") - connection.commit() - - yield config.TestConfig( - db=exasol_config, - bucketfs=bucketfs_config, - itde=itde_config, - ctrl_connection=connection, - ) - - for schema in itde_config.schemas: - connection.execute(f"DROP SCHEMA IF EXISTS {schema} CASCADE;") - connection.commit() - - -OPTION_GROUPS = (EXASOL, BUCKETFS, ITDE, SSH) - - -def _add_option_group(parser, group): - parser_group = parser.getgroup(group.prefix) - for option in group.options: - parser_group.addoption( - option.cli, - type=option.type, - help=option.help, - ) - - -def pytest_addoption(parser): - for group in OPTION_GROUPS: - _add_option_group(parser, group) diff --git a/pytest_itde/config.py b/pytest_itde/config.py deleted file mode 100644 index faa00e402..000000000 --- a/pytest_itde/config.py +++ /dev/null @@ -1,146 +0,0 @@ -from collections import ChainMap -from dataclasses import dataclass -from typing import Generic, List, Optional, TypeVar - -from pyexasol.connection import ExaConnection - -T = TypeVar("T") - - -@dataclass(frozen=True) -class Option(Generic[T]): - name: str - prefix: str - type: T - default: Optional[T] = None - help_text: str = "" - - @property - def env(self): - """Environment variable name""" - - def normalize(name): - name = name.replace("-", "_") - name = name.upper() - return name - - return f"{normalize(self.prefix)}_{normalize(self.name)}" - - @property - def cli(self): - """Cli argument name""" - - def normalize(name): - name = name.replace("_", "-") - name = name.lower() - return name - - return f"--{normalize(self.prefix)}-{normalize(self.name)}" - - @property - def pytest(self): - """Pytest option name""" - - def normalize(name): - name = name.replace("-", "_") - name = name.lower() - return name - - return f"{normalize(self.prefix)}_{normalize(self.name)}" - - @property - def help(self): - """Help text including information about default value.""" - if not self.default: - return f"{self.help_text}." - return f"{self.help_text} (default: {self.default})." - - -class OptionGroup: - """ - Wraps a set of pytest options. - """ - - def __init__(self, prefix, options): - self._prefix = prefix - self._options = tuple(Option(prefix=prefix, **kwargs) for kwargs in options) - self._default = {o.name: o.default for o in self._options} - self._env = {} - self._cli = {} - self._kwargs = ChainMap(self._cli, self._env, self._default) - - @property - def prefix(self): - """The option group prefix.""" - return self._prefix - - @property - def options(self): - """A tuple of all options which are part of this group.""" - return self._options - - def kwargs(self, environment, cli_arguments): - """ - Given the default values, the passed environment and cli arguments it will - take care of the prioritization for the option values in regard of their - source(s) and return a kwargs dictionary with all options and their - appropriate value. - """ - env = { - o.name: o.type(environment[o.env]) - for o in self._options - if o.env in environment - } - cli = { - o.name: getattr(cli_arguments, o.pytest) - for o in self.options - if hasattr(cli_arguments, o.pytest) - and getattr(cli_arguments, o.pytest) is not None - } - self._env.update(env) - self._cli.update(cli) - return self._kwargs - - -@dataclass -class Exasol: - """Exasol database configuration""" - - host: str - port: int - username: str - password: str - - -@dataclass -class BucketFs: - """Bucketfs configuration""" - - url: str - username: str - password: str - - -@dataclass -class Ssh: - """SSH configuration""" - - port: int - - -@dataclass -class Itde: - """Itde configuration settings""" - - db_version: str - schemas: List[str] - - -@dataclass -class TestConfig: - """Full test configuration for itde based tests""" - - db: Exasol - bucketfs: BucketFs - itde: Itde - ctrl_connection: ExaConnection diff --git a/starter_scripts/Dockerfile b/starter_scripts/Dockerfile index 4573266b2..7ddafff22 100644 --- a/starter_scripts/Dockerfile +++ b/starter_scripts/Dockerfile @@ -22,7 +22,6 @@ ENV LANG=C.UTF-8 RUN mkdir /exasol_integration_test_docker_environment COPY exasol_integration_test_docker_environment /integration_test_docker_environment/exasol_integration_test_docker_environment -COPY pytest_itde /integration_test_docker_environment/pytest_itde COPY poetry.lock /integration_test_docker_environment/poetry.lock COPY pyproject.toml /integration_test_docker_environment/pyproject.toml COPY LICENSE /integration_test_docker_environment/LICENSE diff --git a/starter_scripts/checksums/Dockerfile.sha512sum b/starter_scripts/checksums/Dockerfile.sha512sum index 8904cbff9..5924f9657 100644 --- a/starter_scripts/checksums/Dockerfile.sha512sum +++ b/starter_scripts/checksums/Dockerfile.sha512sum @@ -1 +1 @@ -64586b7191bf816f7d230414538f054b89895af0681037ea84b26852ac6ab6a5a6ec0ff5b30630cac0685c9824f8e0aaff287e984bd9e7a8b0dcf0ba5133d844 Dockerfile +11ff01926b3c94b4cd20bb754d2014772aa26e53b0bd2fac1af28227542b5997891346a6237fa59c1c30df5715c3e28ad991b58d4b3293ab1c75f954f5b457dd Dockerfile diff --git a/test/integration/pytest_itde_test.py b/test/integration/pytest_itde_test.py deleted file mode 100644 index 682ace020..000000000 --- a/test/integration/pytest_itde_test.py +++ /dev/null @@ -1,156 +0,0 @@ -import os -from inspect import cleandoc -from itertools import chain - -import pytest - -pytest_plugins = "pytester" - - -@pytest.fixture -def make_test_files(): - def make(pytester, files): - pytester.makepyfile(**files) - - return make - - -def _ids(params): - keys = (k for k in params.keys()) - return next(keys) - - -default_version = "8.18.1" -default_version_only=pytest.mark.skipif( - "EXASOL_VERSION" in os.environ and os.environ["EXASOL_VERSION"] != default_version, - reason="""This test always uses default version of Exasol database. If - the current run of a matrix build uses a different version then executing - all tests requires to download two docker images in total. For Exasol - versions 8 and higher the size of the Docker Containers did drastically - increase which in turn causes error "no space left on device" in the GitHub Action Runners.""", -) - - -@default_version_only -@pytest.mark.slow -@pytest.mark.parametrize( - "files", - [ - { - "test_smoke_test": cleandoc( - """ - def test_itde_smoke_test(itde): - # This smoke test just makes sure db spin up etc does not fail - assert True - """ - ) - }], ids=_ids -) -def test_itde_smoke_test(make_test_files, pytester, files): - make_test_files(pytester, files) - result = pytester.runpytest() - assert result.ret == pytest.ExitCode.OK - - -@default_version_only -@pytest.mark.parametrize( - "files", - [ - { - "test_exasol_settings": cleandoc( - """ - def test_default_settings_of_exasol(exasol_config): - assert exasol_config.host == 'localhost' - assert exasol_config.port == 8563 - assert exasol_config.username == 'SYS' - assert exasol_config.password == 'exasol' - """ - ) - }, - { - "test_bucketfs_settings": cleandoc( - """ - def test_default_settings_of_bucketfs(bucketfs_config): - assert bucketfs_config.url == 'http://127.0.0.1:2580' - assert bucketfs_config.username == 'w' - assert bucketfs_config.password == 'write' - """ - ) - }, - { - "test_itde_settings": cleandoc( - f""" -def test_default_settings_of_itde(itde_config): - assert itde_config.db_version == '{default_version}' - assert set(itde_config.schemas) == set(('TEST', 'TEST_SCHEMA')) -""" - ) - }, - ], - ids=_ids, -) -def test_default_settings_for_options(pytester, make_test_files, files): - make_test_files(pytester, files) - result = pytester.runpytest() - assert result.ret == pytest.ExitCode.OK - - -@pytest.mark.parametrize( - "files,cli_args", - [ - ( - { - "test_exasol_settings": cleandoc( - """ - def test_default_settings_of_exasol(exasol_config): - assert exasol_config.host == '127.0.0.1' - assert exasol_config.port == 7777 - assert exasol_config.username == 'foo' - assert exasol_config.password == 'bar' - """ - ) - }, - { - "--exasol-port": 7777, - "--exasol-host": "127.0.0.1", - "--exasol-username": "foo", - "--exasol-password": "bar", - }, - ), - ( - { - "test_bucketfs_settings": cleandoc( - """ - def test_default_settings_of_bucketfs(bucketfs_config): - assert bucketfs_config.url == 'https://127.0.0.1:7777' - assert bucketfs_config.username == 'user' - assert bucketfs_config.password == 'pw' - """ - ) - }, - { - "--bucketfs-url": "https://127.0.0.1:7777", - "--bucketfs-username": "user", - "--bucketfs-password": "pw", - }, - ), - ( - { - "test_itde_settings": cleandoc( - """ - def test_default_settings_of_itde(itde_config): - assert itde_config.db_version == '7.1.0' - assert set(itde_config.schemas) == set(('TEST_FOO', 'TEST_BAR')) - """ - ) - }, - {"--itde-db-version": "7.1.0", "--itde-schemas": "TEST_FOO, TEST_BAR"}, - ), - ], - ids=_ids, -) -def test_pass_options_via_cli(pytester, make_test_files, files, cli_args): - make_test_files(pytester, files) - args = chain.from_iterable(cli_args.items()) - result = pytester.runpytest(*args) - assert result.ret == pytest.ExitCode.OK diff --git a/test/unit/pytest_plugin_itde_test.py b/test/unit/pytest_plugin_itde_test.py deleted file mode 100644 index aa1e2236e..000000000 --- a/test/unit/pytest_plugin_itde_test.py +++ /dev/null @@ -1,246 +0,0 @@ -import pytest - -from pytest_itde import TestSchemas -from pytest_itde.config import Option, OptionGroup -from exasol_integration_test_docker_environment.lib.test_environment.ports import Ports - -OPTIONS = ( - Option( - name="port", - prefix="exasol", - type=int, - default=9999, - help_text="Port to connect to", - ), - Option( - name="URL", - prefix="exasol", - type=str, - default="http://foo.bar", - help_text="A url", - ), -) - - -@pytest.mark.parametrize("option,expected", zip(OPTIONS, ("EXASOL_PORT", "EXASOL_URL"))) -def test_get_environment_variable_name_for_option(option, expected): - assert option.env == expected - - -@pytest.mark.parametrize( - "option,expected", zip(OPTIONS, ("--exasol-port", "--exasol-url")) -) -def test_get_cli_argument_name_for_option(option, expected): - assert option.cli == expected - - -@pytest.mark.parametrize("option,expected", zip(OPTIONS, ("exasol_port", "exasol_url"))) -def test_get_pytest_option_name_for_option(option, expected): - assert option.pytest == expected - - -def test_help_of_option_without_default_value(): - option = Option( - name="port", - prefix="exasol", - type=int, - default=9999, - help_text="Port to connect to", - ) - expected = "Port to connect to (default: 9999)." - assert option.help == expected - - -def test_help_of_option_with_default_value(): - option = Option( - name="port", - prefix="exasol", - type=int, - help_text="Port to connect to", - ) - expected = "Port to connect to." - assert option.help == expected - - -@pytest.mark.parametrize( - "definition,expected", - ( - ("", []), - ("TEST", ["TEST"]), - ("TEST1,TEST2", ["TEST1", "TEST2"]), - ("TEST1, TEST2", ["TEST1", "TEST2"]), - ("TEST1, TEST2,", ["TEST1", "TEST2"]), - ("TEST1, TEST2, TEST3", ["TEST1", "TEST2", "TEST3"]), - ), -) -def test_test_schema_parser(definition, expected): - actual = TestSchemas(definition) - assert set(actual) == set(expected) - - -EXASOL_OPTIONS = ( - { - "name": "host", - "type": str, - "default": "localhost", - "help_text": "Host to connect to", - }, - { - "name": "port", - "type": int, - "default": Ports.default_ports.database, - "help_text": "Port on which the exasol db is listening", - }, - { - "name": "username", - "type": str, - "default": "SYS", - "help_text": "Username used to authenticate against the exasol db", - }, - { - "name": "password", - "type": str, - "default": "exasol", - "help_text": "Password used to authenticate against the exasol db", - }, -) - -BUCKETFS_OPTIONS = ( - { - "name": "url", - "type": str, - "default": f"http://127.0.0.1:{Ports.default_ports.bucketfs}", - "help_text": "Base url used to connect to the bucketfs service", - }, - { - "name": "username", - "type": str, - "default": "w", - "help_text": "Username used to authenticate against the bucketfs service", - }, - { - "name": "password", - "type": str, - "default": "write", - "help_text": "Password used to authenticate against the bucketfs service", - }, -) - - -@pytest.mark.parametrize( - "group,expected", - ( - (OptionGroup(prefix="exasol", options=EXASOL_OPTIONS), "exasol"), - (OptionGroup(prefix="bucket", options=BUCKETFS_OPTIONS), "bucket"), - ), -) -def test_option_group_prefix_property(group, expected): - actual = group.prefix - assert actual == expected - - -@pytest.mark.parametrize( - "group,expected", - ( - ( - OptionGroup(prefix="exasol", options=EXASOL_OPTIONS), - ( - Option( - prefix="exasol", - name="host", - type=str, - default="localhost", - help_text="Host to connect to", - ), - Option( - prefix="exasol", - name="port", - type=int, - default=8563, - help_text="Port on which the exasol db is listening", - ), - Option( - prefix="exasol", - name="username", - type=str, - default="SYS", - help_text="Username used to authenticate against the exasol db", - ), - Option( - prefix="exasol", - name="password", - type=str, - default="exasol", - help_text="Password used to authenticate against the exasol db", - ), - ), - ), - ), -) -def test_option_group_options_property(group, expected): - actual = group.options - assert set(actual) == set(expected) - - -class PyTestArgs: - def __init__(self, **kwargs): - for name, value in kwargs.items(): - setattr(self, name, value) - - -@pytest.mark.parametrize( - "group,env,cli,expected", - ( - ( - OptionGroup( - prefix="db", - options=( - { - "name": "port", - "type": int, - "default": 9999, - "help_text": "some help", - }, - ), - ), - {}, - PyTestArgs(), - {"port": 9999}, - ), - ( - OptionGroup( - prefix="db", - options=( - { - "name": "port", - "type": int, - "default": 9999, - "help_text": "some help", - }, - ), - ), - {"DB_PORT": "7777"}, - PyTestArgs(), - {"port": 7777}, - ), - ( - OptionGroup( - prefix="db", - options=( - { - "name": "port", - "type": int, - "default": 9999, - "help_text": "some help", - }, - ), - ), - {"DB_PORT": "7777"}, - PyTestArgs(db_port=8888), - {"port": 8888}, - ), - ), -) -def test_option_group_prefix_kwargs_prioritization(group, env, cli, expected): - actual = dict(group.kwargs(env, cli)) - assert actual == expected