Skip to content

Commit

Permalink
add host config to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-akolodziejczyk committed Feb 5, 2024
1 parent 375f829 commit 6300543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Snowflake.Data.Tests/parameters.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"testconnection": {
"SNOWFLAKE_TEST_HOST": "snowflake.reg.local.snowflakecomputing.com",
"SNOWFLAKE_TEST_HOST": "snowflake.reg.local",
"SNOWFLAKE_TEST_PROTOCOL": "http",
"SNOWFLAKE_TEST_PORT": "8082",
"SNOWFLAKE_TEST_USER": "snowman",
Expand Down
5 changes: 5 additions & 0 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ ROOT_DIR="$(cd "${THIS_DIR}/.." && pwd)"
source $THIS_DIR/_init.sh
source $THIS_DIR/scripts/login_internal_docker.sh

echo "Use /sbin/ip"
IP_ADDR=$(/sbin/ip -4 addr show scope global dev eth0 | grep inet | awk '{print $2}' | cut -d / -f 1)

declare -A TARGET_TEST_IMAGES
if [[ -n "$TARGET_DOCKER_TEST_IMAGE" ]]; then
echo "[INFO] TARGET_DOCKER_TEST_IMAGE: $TARGET_DOCKER_TEST_IMAGE"
Expand All @@ -28,6 +31,8 @@ for name in "${!TARGET_TEST_IMAGES[@]}"; do
echo "[INFO] Testing $DRIVER_NAME on $name"
docker container run \
--rm \
--add-host=snowflake.reg.local:${IP_ADDR} \
--add-host=s3testaccount.reg.local:${IP_ADDR} \
-v $ROOT_DIR:/mnt/host \
-v $WORKSPACE:/mnt/workspace \
-e LOCAL_USER_ID=$(id -u ${USER}) \
Expand Down

0 comments on commit 6300543

Please sign in to comment.