Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify ports for database, BucketFS, and SSH #354

Merged
merged 57 commits into from
Jul 4, 2023
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b9ca0fe
initial implementation
ckunki Jun 22, 2023
975f8ac
Annotated properties of class Ports with references to usages
ckunki Jun 22, 2023
c1b5d18
Updated changes_2.0.0.md
ckunki Jun 22, 2023
482219a
Replaced ports in EXAConf by template variables
ckunki Jun 22, 2023
a52f516
fixed errors in pytest_plugin_itde_test.py
ckunki Jun 23, 2023
4b166de
Removed Exposed ports from files EXAConf
ckunki Jun 23, 2023
a4bbce0
reviewed and cleaned up references to class Port
ckunki Jun 23, 2023
344f515
added ssh_port to all EXAConf templates and enhanced template substit…
ckunki Jun 23, 2023
37a2f59
Fixed review findings
ckunki Jun 26, 2023
fcd251a
Added forwarded ports to DatabaseInfo
ckunki Jun 26, 2023
adbfd09
Removed port from ShInfo
ckunki Jun 26, 2023
82861fb
fixed Test
ckunki Jun 26, 2023
7f8ad18
fixed test/integration/pytest_itde_test.py
ckunki Jun 27, 2023
8fb0b08
Fixed review findings
ckunki Jun 27, 2023
282b979
Fixed tests
ckunki Jun 27, 2023
4b4679f
made moved forwarded port an attribute of class SpawnTestDockerDatabase
ckunki Jun 27, 2023
ec773f1
[run all tests]
ckunki Jun 27, 2023
5415844
Use EXASOL_VERSION in pytest_itde_test.py [run all tests]
tkilias Jun 28, 2023
c6d4243
set log level for debugging purposes
ckunki Jun 29, 2023
a121b61
[run all tests]
ckunki Jun 29, 2023
35103c8
added workflow for manual experiments
ckunki Jun 29, 2023
09b11ba
added on: workflow_dispatch:
ckunki Jun 29, 2023
d0699d4
fixed workflow
ckunki Jun 29, 2023
f438803
fixed id of workflow
ckunki Jun 29, 2023
dc3c302
simplified workflow
ckunki Jun 29, 2023
93c22a3
added --log-debug=DEBUG
ckunki Jun 29, 2023
5e75517
reverted test workflow file
ckunki Jun 29, 2023
42727c8
x
ckunki Jun 29, 2023
8a6a956
x
ckunki Jun 29, 2023
e274d75
y
ckunki Jun 29, 2023
835c7b6
different approach to skip pytest_itde_tests for non-default version …
ckunki Jun 29, 2023
28da851
x
ckunki Jun 29, 2023
e8cafd4
refactored test skips
ckunki Jun 29, 2023
9bfd3af
changed noxfile
ckunki Jun 29, 2023
ab3a5df
fixed noxfile.py
ckunki Jun 29, 2023
ab1fcf8
CLeaned up tests
ckunki Jun 29, 2023
d7e6c9d
removed experimental test
ckunki Jun 29, 2023
cf67beb
[run all tests]
ckunki Jun 30, 2023
820ce1b
added env to noxfile
ckunki Jun 30, 2023
5d0c96a
experimental
ckunki Jun 30, 2023
6c64352
added unit tests and old tests based on python lib "unittest"
ckunki Jun 30, 2023
84ffc38
finalized noxfile
ckunki Jun 30, 2023
9fb77b0
[run all tests]
ckunki Jun 30, 2023
eac0c59
Update test/integration/pytest_itde_test.py
ckunki Jul 3, 2023
07575e5
removed commented lines in 8.18.1/EXAConf
ckunki Jul 3, 2023
2c33cee
[run all tests]
ckunki Jul 3, 2023
20f4898
re-activated new integration tests
ckunki Jul 3, 2023
66442a7
added build script for experimental tests
ckunki Jul 3, 2023
30808e9
fixed build script
ckunki Jul 3, 2023
de76d4d
added chroot for 8.17.0/EXAConf as well
ckunki Jul 3, 2023
180a9c6
changed COS version in path to sbin/nsexec_chroot to match ConfVersion
ckunki Jul 3, 2023
1082e82
copied EXAConf template to exasol_integration_test_docker_environment…
ckunki Jul 3, 2023
e863e24
[run all tests]
ckunki Jul 3, 2023
27f0c34
removed experimental workflow
ckunki Jul 3, 2023
1424cc1
[run all tests]
ckunki Jul 3, 2023
f66f715
Fixed build matrix
ckunki Jul 4, 2023
b024bdc
[run all tests]
ckunki Jul 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
initial implementation
ckunki committed Jun 22, 2023
commit b9ca0fed764cac9a6289c68a8ebcd1c36796be53
4 changes: 2 additions & 2 deletions doc/user_guide/user_guide.rst
Original file line number Diff line number Diff line change
@@ -244,8 +244,8 @@ The following config files are available:

# Database IP in environment docker network
export ITDE_DATABASE_HOST=172.21.0.2
export ITDE_DATABASE_DB_PORT=8888
export ITDE_DATABASE_BUCKETFS_PORT=6583
export ITDE_DATABASE_DB_PORT=8563
export ITDE_DATABASE_BUCKETFS_PORT=2580
export ITDE_DATABASE_SSH_PORT=22
export ITDE_DATABASE_CONTAINER_NAME=db_container_test
export ITDE_DATABASE_CONTAINER_NETWORK_ALIASES="exasol_test_database db_container_test"
2 changes: 1 addition & 1 deletion exasol_integration_test_docker_environment/cli/cli.py
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ def cli():
Spawn an ITDE test environment:

$ itde spawn-test-environment --environment-name test \\
--database-port-forward 8888 --bucketfs-port-forward 6666 \\
--database-port-forward 8563 --bucketfs-port-forward 2580 \\
--docker-db-image-version 7.1.9 --db-mem-size 4GB
"""
pass
Original file line number Diff line number Diff line change
@@ -36,15 +36,22 @@ class PortsType(type):

@property
def default_ports(self) -> 'Ports':
return Ports(database=8888, bucketfs=6583, ssh=22)
# return Ports(database=8888, bucketfs=6583, ssh=22)
return Ports(database=8563, bucketfs=2580, ssh=22)

@property
def external(self) -> 'Ports':
return Ports(database=8563, bucketfs=6583, ssh=22)
# return Ports(database=8563, bucketfs=6583, ssh=22)
return Ports(database=8563, bucketfs=2580, ssh=22)

@property
def docker(self) -> 'Ports':
return Ports(database=8888, bucketfs=6583, ssh=22)
# return Ports(database=8888, bucketfs=6583, ssh=22)
return Ports(database=8563, bucketfs=2580, ssh=22)

@property
def forward(self) -> 'Ports':
return Ports(database=8563, bucketfs=2580, ssh=20002)


class Ports(metaclass=PortsType):
5 changes: 3 additions & 2 deletions pytest_itde/__init__.py
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
{
"name": "url",
"type": str,
"default": "http://127.0.0.1:6666",
"default": f"http://127.0.0.1:{Ports.default.bucketfs}",
"help_text": "Base url used to connect to the bucketfs service",
},
{
@@ -166,7 +166,8 @@ def start_db(name, itde, exasol, bucketfs):
environment_name=name,
database_port_forward=exasol.port,
bucketfs_port_forward=bucketfs_url.port,
ssh_port_forward=20002,
# should this rather be passed as a parameter to _bootstrap_db()?
ssh_port_forward=Ports.forward.ssh,
ckunki marked this conversation as resolved.
Show resolved Hide resolved
db_mem_size="4GB",
docker_db_image_version=itde.db_version,
)
4 changes: 2 additions & 2 deletions test/integration/pytest_itde_test.py
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ def test_itde_smoke_test(make_test_files, pytester, files):
"""
def test_default_settings_of_exasol(exasol_config):
assert exasol_config.host == 'localhost'
assert exasol_config.port == 8888
assert exasol_config.port == 8563
assert exasol_config.username == 'SYS'
assert exasol_config.password == 'exasol'
"""
@@ -57,7 +57,7 @@ def test_default_settings_of_exasol(exasol_config):
"test_bucketfs_settings": cleandoc(
"""
def test_default_settings_of_bucketfs(bucketfs_config):
assert bucketfs_config.url == 'http://127.0.0.1:6666'
assert bucketfs_config.url == 'http://127.0.0.1:2580'
assert bucketfs_config.username == 'w'
assert bucketfs_config.password == 'write'
"""
7 changes: 4 additions & 3 deletions test/unit/pytest_plugin_itde_test.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

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(
@@ -87,7 +88,7 @@ def test_test_schema_parser(definition, expected):
{
"name": "port",
"type": int,
"default": 8888,
"default": Ports.default.database,
"help_text": "Port on which the exasol db is listening",
},
{
@@ -108,7 +109,7 @@ def test_test_schema_parser(definition, expected):
{
"name": "url",
"type": str,
"default": "http://127.0.0.1:6666",
"default": f"http://127.0.0.1:{Ports.default.bucketfs}",
"help_text": "Base url used to connect to the bucketfs service",
},
{
@@ -155,7 +156,7 @@ def test_option_group_prefix_property(group, expected):
prefix="exasol",
name="port",
type=int,
default=8888,
default=Ports.default.database,
help_text="Port on which the exasol db is listening",
),
Option(