Skip to content

Commit e6fd54e

Browse files
SNOW-1883649 - wiremock integration
1 parent 563d6c8 commit e6fd54e

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.github/workflows/build-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ jobs:
9090
nodeVersion: ['18.x', '20.x', '22.x']
9191
steps:
9292
- uses: actions/checkout@v4
93+
- uses: actions/setup-java@v4
94+
with:
95+
distribution: 'temurin'
96+
java-version: '17'
97+
java-package: 'jre'
9398
- uses: actions/setup-node@v4
9499
with:
95100
node-version: ${{ matrix.nodeVersion }}

ci/_init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export DRIVER_NAME=nodejs
1818
BUILD_IMAGE_VERSION=1
1919

2020
# Test Images
21-
TEST_IMAGE_VERSION=1
21+
TEST_IMAGE_VERSION=2
2222

2323
declare -A BUILD_IMAGE_NAMES=(
2424
[$DRIVER_NAME-chainguard-node18]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-chainguard-node18-build:$BUILD_IMAGE_VERSION

ci/image/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ FROM $IMAGE
33

44
USER root
55

6-
RUN apk update && apk add python3 jq aws-cli gosu
6+
RUN apk update && apk add python3 python3-dev py3-pip jq aws-cli gosu openjdk-17
77
RUN pip install -U snowflake-connector-python
88

9+
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
10+
911
# workspace
1012
RUN mkdir -p /home/user && \
1113
chmod 777 /home/user

ci/test_authentication.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ docker run \
1313
-v $(cd $THIS_DIR/.. && pwd):/mnt/host \
1414
-v $WORKSPACE:/mnt/workspace \
1515
--rm \
16-
nexus.int.snowflakecomputing.com:8086/docker/snowdrivers-test-external-browser:3 \
16+
nexus.int.snowflakecomputing.com:8086/docker/snowdrivers-test-external-browser:7 \
1717
"/mnt/host/ci/container/test_authentication.sh"

test/wiremockRunner.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ async function runWireMockAsync(port) {
1111
exec(`npx wiremock --enable-browser-proxying --proxy-pass-through false --port ${port} `);
1212
const wireMock = new WireMockRestClient(`http://localhost:${port}`, { logLevel: 'debug' });
1313
const readyWireMock = waitForWiremockStarted(wireMock);
14+
console.log("########## WIREMOCK STARTED ##############")
1415
resolve(readyWireMock);
1516
} catch (err) {
1617
reject(err);
@@ -19,8 +20,8 @@ async function runWireMockAsync(port) {
1920

2021
const timeout = new Promise((resolve, reject) =>
2122
timeoutHandle = setTimeout(
22-
() => reject('Wiremock unavailable after 60s.'),
23-
60000));
23+
() => reject('Wiremock unavailable after 30s.'),
24+
30000));
2425
return Promise.race([waitingWireMockPromise, timeout])
2526
.then(result => {
2627
clearTimeout(timeoutHandle);

0 commit comments

Comments
 (0)