exasol / exasol-testcontainers

Test container for Exasol on Docker
MIT License
9 stars 2 forks source link

Improve auto-detection of folder for temp SSH credentials #215

Closed kaklakariada closed 1 year ago

kaklakariada commented 1 year ago

This is related to https://github.com/exasol/exasol-testcontainers/issues/202 and https://github.com/exasol/exasol-testcontainers/issues/206.

Context

The latest version of ETC uses a temp directory to store SSH credentials. It uses target as default but this can be overwritten by calling .withTemporaryCredentialsDirectory().

This behavior is fine for Maven projects but requires additional configuration for Gradle projects. Especially developers of Gradle projects who are not familiar with ETC will wonder why .withTemporaryCredentialsDirectory(Path.of("build/")) is necessary.

Proposed solution

  1. Detect directory
    1. If a dir was explicitly specified with withTemporaryCredentialsDirectory() use this one
    2. If target exists, use it
    3. If build exists, use it
    4. Else use target
  2. Check if the directory exists and create it if necessary (this doesn't work currently).