Repository: exasol/integration-test-docker-environment (language: python)

Issue:
Update exaplus, odbc and  jdbc for test environment and cleanup Dockerfile
## Background

These artifacts we use for the test environment in the [docker file](https://github.com/exasol/integration-test-docker-environment/blob/master/tests/Dockerfile) are very old.
Update to latest version (7.1.3).
**Important**:
In case of exaplus, we will need to change the behavior of polling the database startup, as the latest version of exaplus works with TLS.  As workaround we can set the following JAVA parameter (check [here](https://docs.exasol.com/connect_exasol/drivers/jdbc.htm)):
```
validateservercertificate=0
```

## Acceptance Criteria

1. Update the three artificates to the latest version
2. Fix startup polling check of database
3. Remove any unecessary dependencies


Discussion / hints:
Latest EXAPLUS URL is:
https://www.exasol.com/support/secure/attachment/175394/EXAplus-7.1.3.tar.gz

Fix patch:
diff --git a/doc/changes/changes_0.8.0.md b/doc/changes/changes_0.8.0.md
index b3b2bb13a..9ca37492f 100644
--- a/doc/changes/changes_0.8.0.md
+++ b/doc/changes/changes_0.8.0.md
@@ -27,7 +27,7 @@ If you need further versions, please open an issue.
 
 ## Features / Enhancements:
 
-n/a
+ - #150: Updated exaplus and jdbc for test environment and cleaned up Dockerfile
 
 ## Refactoring:
 


Test patch:
diff --git a/exasol_integration_test_docker_environment/lib/test_environment/abstract_spawn_test_environment.py b/exasol_integration_test_docker_environment/lib/test_environment/abstract_spawn_test_environment.py
index 27fb9e677..cc0b6f55d 100644
--- a/exasol_integration_test_docker_environment/lib/test_environment/abstract_spawn_test_environment.py
+++ b/exasol_integration_test_docker_environment/lib/test_environment/abstract_spawn_test_environment.py
@@ -31,7 +31,6 @@ class AbstractSpawnTestEnvironment(DockerBaseTask,
                                    GeneralSpawnTestEnvironmentParameter,
                                    DatabaseCredentialsParameter):
     environment_name = luigi.Parameter()  # type: str
-    create_certificates = luigi.BoolParameter()
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
diff --git a/exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py b/exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py
index 03a45d951..795b79432 100644
--- a/exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py
+++ b/exasol_integration_test_docker_environment/lib/test_environment/database_setup/populate_data.py
@@ -35,7 +35,7 @@ def populate_data(self):
         password = self.db_password
         with self._get_docker_client() as docker_client:
             test_container = docker_client.containers.get(self._test_container_info.container_name)
-            cmd = f"""cd /tests/test/enginedb_small; $EXAPLUS -c '{self._database_info.host}:{self._database_info.db_port}' -u '{username}' -p '{password}' -f import.sql"""
+            cmd = f"""cd /tests/test/enginedb_small; $EXAPLUS -c '{self._database_info.host}:{self._database_info.db_port}' -u '{username}' -p '{password}' -f import.sql -jdbcparam 'validateservercertificate=0'"""
             bash_cmd = f"""bash -c "{cmd}" """
             exit_code, output = test_container.exec_run(cmd=bash_cmd)
         self.write_logs(output.decode("utf-8"))
diff --git a/exasol_integration_test_docker_environment/lib/test_environment/database_waiters/is_database_ready_thread.py b/exasol_integration_test_docker_environment/lib/test_environment/database_waiters/is_database_ready_thread.py
index dbeb5a1d5..cf8687bd3 100644
--- a/exasol_integration_test_docker_environment/lib/test_environment/database_waiters/is_database_ready_thread.py
+++ b/exasol_integration_test_docker_environment/lib/test_environment/database_waiters/is_database_ready_thread.py
@@ -45,7 +45,7 @@ def create_db_connection_command(self):
         username = self.database_credentials.db_user
         password = self.database_credentials.db_password
         connection_options = f"""-c '{self._database_info.host}:{self._database_info.db_port}' -u '{username}' -p '{password}'"""
-        cmd = f"""$EXAPLUS {connection_options}  -sql 'select 1;'"""
+        cmd = f"""$EXAPLUS {connection_options}  -sql 'select 1;' -jdbcparam 'validateservercertificate=0'"""
         bash_cmd = f"""bash -c "{cmd}" """
         return bash_cmd
 
diff --git a/exasol_integration_test_docker_environment/lib/test_environment/parameter/general_spawn_test_environment_parameter.py b/exasol_integration_test_docker_environment/lib/test_environment/parameter/general_spawn_test_environment_parameter.py
index 4ef3dce28..c8003b066 100644
--- a/exasol_integration_test_docker_environment/lib/test_environment/parameter/general_spawn_test_environment_parameter.py
+++ b/exasol_integration_test_docker_environment/lib/test_environment/parameter/general_spawn_test_environment_parameter.py
@@ -10,4 +10,5 @@ class GeneralSpawnTestEnvironmentParameter(Config):
     no_test_container_cleanup_after_failure = luigi.BoolParameter(False, significant=False)
     max_start_attempts = luigi.IntParameter(2, significant=False)
     is_setup_database_activated = luigi.BoolParameter(True, significant=False)
-    docker_runtime = luigi.OptionalParameter(None, significant=False)
\ No newline at end of file
+    docker_runtime = luigi.OptionalParameter(None, significant=False)
+    create_certificates = luigi.BoolParameter()
\ No newline at end of file
diff --git a/exasol_integration_test_docker_environment/test/test_test_env_reuse.py b/exasol_integration_test_docker_environment/test/test_test_env_reuse.py
index 0cb53ee8f..af9908838 100644
--- a/exasol_integration_test_docker_environment/test/test_test_env_reuse.py
+++ b/exasol_integration_test_docker_environment/test/test_test_env_reuse.py
@@ -1,4 +1,3 @@
-import os
 import unittest
 
 import luigi
@@ -87,7 +86,8 @@ def _create_exaplus_check_cmd(self, test_environment_info):
         database_host = test_environment_info.database_info.host
         database_port = test_environment_info.database_info.db_port
         q = "SELECT TABLE_NAME FROM SYS.EXA_ALL_TABLES WHERE TABLE_SCHEMA='TEST';"
-        return f"""$EXAPLUS -c '{database_host}:{database_port}' -u '{username}' -p '{password}' -sql \\\"{q}\\\""""
+        return f"$EXAPLUS -c '{database_host}:{database_port}' -u '{username}' -p '{password}' " \
+               f"-jdbcparam 'validateservercertificate=0' -sql \\\"{q}\\\""""
 
     def _exec_cmd_in_test_container(self, test_environment_info, cmd):
         with ContextDockerClient() as docker_client:
diff --git a/tests/Dockerfile b/tests/Dockerfile
index 0fc2c4e29..dd9f284ad 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -5,11 +5,8 @@ COPY ext/01_nodoc /etc/dpkg/dpkg.cfg.d/01_nodoc
 RUN apt-get -y update && \
     apt-get -y install \
         openjdk-11-jdk \
+        perl \
         locales \
-        python \
-        python-pip \
-        unixodbc \
-        unixodbc-dev \
         curl && \
     locale-gen en_US.UTF-8 && \
     update-locale LC_ALL=en_US.UTF-8 && \
@@ -19,13 +16,8 @@ RUN apt-get -y update && \
 
 RUN curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh
 
-RUN mkdir -p downloads/ODBC downloads/JDBC downloads/EXAplus downloads/virtualschema-jdbc-adapter
-RUN curl -s https://www.exasol.com/support/secure/attachment/65437/EXASOL_ODBC-6.0.11.tar.gz | tar -C downloads/ODBC --strip-components 1 -zxf -
-RUN curl -s https://www.exasol.com/support/secure/attachment/60963/EXASOL_JDBC-6.0.8.tar.gz | tar -C downloads/JDBC --strip-components 1 -zxf -
-RUN curl -s https://www.exasol.com/support/secure/attachment/63966/EXAplus-6.0.10.tar.gz | tar -C downloads/EXAplus --strip-components 1 -zxf -
+RUN mkdir -p downloads/JDBC downloads/EXAplus downloads/virtualschema-jdbc-adapter
+RUN curl -s https://www.exasol.com/support/secure/attachment/175412/EXASOL_JDBC-7.1.3.tar.gz | tar -C downloads/JDBC --strip-components 1 -zxf -
+RUN curl -s https://www.exasol.com/support/secure/attachment/175394/EXAplus-7.1.3.tar.gz | tar -C downloads/EXAplus --strip-components 1 -zxf -
 COPY ext/virtualschema-jdbc-adapter.jar downloads/virtualschema-jdbc-adapter
 ENV EXAPLUS=/downloads/EXAplus/exaplus
-RUN curl -s -o udf_debug.py https://raw.githubusercontent.com/exasol/hadoop-etl-udfs/master/tools/udf_debug.py
-
-COPY requirements.txt requirements.txt
-RUN pip install -r "requirements.txt"
diff --git a/tests/requirements.txt b/tests/requirements.txt
index d25badfdf..10a34ae79 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,4 +1,2 @@
-pyodbc<=4.0.24
-pytz
-lxml
-docker
+#Need to keep this empty file, as any clients might need a requirements.txt
+#and analyze_test_container.py assumes it's existence
\ No newline at end of file