sarutak commented on a change in pull request #33821: URL: https://github.com/apache/spark/pull/33821#discussion_r695019512
########## File path: external/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/OracleIntegrationSuite.scala ########## @@ -34,42 +34,46 @@ import org.apache.spark.sql.types._ import org.apache.spark.tags.DockerTest /** - * The following would be the steps to test this - * 1. Build Oracle database in Docker, please refer below link about how to. - * https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md - * 2. export ORACLE_DOCKER_IMAGE_NAME=$ORACLE_DOCKER_IMAGE_NAME - * Pull oracle $ORACLE_DOCKER_IMAGE_NAME image - docker pull $ORACLE_DOCKER_IMAGE_NAME - * 3. Start docker - sudo service docker start - * 4. Run spark test - ./build/sbt -Pdocker-integration-tests - * "testOnly org.apache.spark.sql.jdbc.OracleIntegrationSuite" + * The following are the steps to test this: * - * An actual sequence of commands to run the test is as follows + * 1. Choose to use a prebuilt image or build Oracle database in a container + * - The documentation on how to build Oracle RDBMS in a container is at + * https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md + * - Official Oracle container images can be found at https://container-registry.oracle.com + * - A trustable and streamlined Oracle XE database image can be found on Docker Hub at + * https://hub.docker.com/r/gvenzl/oracle-xe see also https://github.com/gvenzl/oci-oracle-xe + * 2. Run: export ORACLE_DOCKER_IMAGE_NAME=image_you_want_to_use_for_testing + * - Example: export ORACLE_DOCKER_IMAGE_NAME=gvenzl/oracle-xe:latest + * 3. Run: export ENABLE_DOCKER_INTEGRATION_TESTS=1 + * 4. Start docker: sudo service docker start + * - Optionally, docker pull $ORACLE_DOCKER_IMAGE_NAME + * 5. Run Spark integration tests for Oracle with: ./build/sbt -Pdocker-integration-tests + * "testOnly org.apache.spark.sql.jdbc.OracleIntegrationSuite" * + * A sequence of commands to build the Oracle XE database container image: * $ git clone https://github.com/oracle/docker-images.git - * // Head SHA: 3f422c4a35b423dfcdbcc57a84f01db6c82eb6c1 * $ cd docker-images/OracleDatabase/SingleInstance/dockerfiles * $ ./buildContainerImage.sh -v 18.4.0 -x * $ export ORACLE_DOCKER_IMAGE_NAME=oracle/database:18.4.0-xe - * $ export ENABLE_DOCKER_INTEGRATION_TESTS=1 - * $ cd $SPARK_HOME - * $ ./build/sbt -Pdocker-integration-tests - * "testOnly org.apache.spark.sql.jdbc.OracleIntegrationSuite" * - * It has been validated with 18.4.0 Express Edition. + * This procedure has been validated with Oracle 18.4.0 Express Edition. */ @DockerTest class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSparkSession { import testImplicits._ override val db = new DatabaseOnDocker { - lazy override val imageName = sys.env("ORACLE_DOCKER_IMAGE_NAME") + lazy override val imageName = + sys.env.getOrElse("ORACLE_DOCKER_IMAGE_NAME", "gvenzl/oracle-xe:latest") Review comment: Oh, it's better to pin the tag rather than `latest` for the reproducibility. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
