diff --git a/scripts/docker/ubuntu18.04-xvfb.Dockerfile b/scripts/docker/ubuntu18.04-xvfb.Dockerfile index e1bf4b659d..e91ba85528 100644 --- a/scripts/docker/ubuntu18.04-xvfb.Dockerfile +++ b/scripts/docker/ubuntu18.04-xvfb.Dockerfile @@ -11,6 +11,6 @@ RUN echo "deb-src https://deb.nodesource.com/node_12.x bionic main" | tee -a /et # Install Node.js and vscode dependencies RUN apt-get update -RUN apt-get -y -qq install nodejs libnss3 gnupg libxkbfile1 libsecret-1-0 libgtk-3-0 libxss1 libgbm1 libasound2 xvfb +RUN apt-get -y -qq install nodejs libnss3 gnupg libxkbfile1 libsecret-1-0 libsecret-1-dev libgtk-3-0 libxss1 libgbm1 libasound2 xvfb build-essential pkg-config ENTRYPOINT [ "bash" ] diff --git a/testing/test-vscode.sh b/testing/test-vscode.sh index 21bfcce7f0..54266b142b 100755 --- a/testing/test-vscode.sh +++ b/testing/test-vscode.sh @@ -3,6 +3,9 @@ set -x set -e # just to make sure: we are in the mongosh root dir test -x packages && grep -q '"name": "mongosh"' package.json +# the vscode extension needs npm7 for installing +npm i -g npm@7 +npm -v # we pick a target directory that is not affected by the mongosh node_modules directory mongosh_root_dir=$PWD test_root_dir=/tmp/mongosh-vscode-test @@ -11,7 +14,7 @@ rm -rf "$test_root_dir" && mkdir -p "$test_root_dir" cd "$test_root_dir" git clone --depth=10 https://github.com/mongodb-js/vscode.git cd vscode -npm install +npm install --force rm -rf node_modules/@mongosh (cd node_modules && ln -s "$mongosh_root_dir/packages" @mongosh) npm test