Fix integration test credential resource path handling (#11487)
This PR fixes an issue with the integration test copy_resources.sh script.
The "install druid jars" portion was removing the $SHARED_DIR/docker directory, which wipes out the $SHARED_DIR/docker/extensions and $SHARED_DIR/docker/credentials directories created just before, which leads to issues later in the script when copying resources to the $SHARED_DIR/docker/credentials/ dir.
diff --git a/integration-tests/script/copy_resources.sh b/integration-tests/script/copy_resources.sh
index 4dd1f0a..8e4d8f3 100755
--- a/integration-tests/script/copy_resources.sh
+++ b/integration-tests/script/copy_resources.sh
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+echo "Copying integration test resources."
+
set -e
# setup client keystore
@@ -21,6 +23,12 @@
rm -rf docker/client_tls
cp -r client_tls docker/client_tls
+# install druid jars
+rm -rf $SHARED_DIR/docker
+mkdir -p $SHARED_DIR
+cp -R docker $SHARED_DIR/docker
+mvn -B dependency:copy-dependencies -DoutputDirectory=$SHARED_DIR/docker/lib
+
# Make directories if they dont exist
mkdir -p $SHARED_DIR/hadoop_xml
mkdir -p $SHARED_DIR/hadoop-dependencies
@@ -29,11 +37,6 @@
mkdir -p $SHARED_DIR/docker/extensions
mkdir -p $SHARED_DIR/docker/credentials
-# install druid jars
-rm -rf $SHARED_DIR/docker
-cp -R docker $SHARED_DIR/docker
-mvn -B dependency:copy-dependencies -DoutputDirectory=$SHARED_DIR/docker/lib
-
# install logging config
cp src/main/resources/log4j2.xml $SHARED_DIR/docker/lib/log4j2.xml
@@ -86,4 +89,4 @@
if [ -n "$DRUID_INTEGRATION_TEST_RESOURCE_FILE_DIR_PATH" ]
then
cp -a $DRUID_INTEGRATION_TEST_RESOURCE_FILE_DIR_PATH/. $SHARED_DIR/docker/credentials/
-fi
\ No newline at end of file
+fi