[Tests] fix failing tests on master due to npm registry SSL changes
parent
17c33fd9ae
commit
e7a37f336d
|
@ -26,6 +26,8 @@ nvm install-latest-npm || die 'nvm install-latest-npm failed: 3'
|
||||||
NPM_VERSION="$(npm --version)"
|
NPM_VERSION="$(npm --version)"
|
||||||
[ "${NPM_VERSION}" = '4.6.1' ] || die "io.js v1.x updates to ${NPM_VERSION}; expected v4.6.1"
|
[ "${NPM_VERSION}" = '4.6.1' ] || die "io.js v1.x updates to ${NPM_VERSION}; expected v4.6.1"
|
||||||
|
|
||||||
|
export NPM_CONFIG_STRICT_SSL=false # the npm registry tightened up their SSL certs
|
||||||
|
|
||||||
nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 4'
|
nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 4'
|
||||||
nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'
|
nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'
|
||||||
nvm install-latest-npm || die 'nvm install-latest-npm failed: 4'
|
nvm install-latest-npm || die 'nvm install-latest-npm failed: 4'
|
||||||
|
@ -35,7 +37,6 @@ NPM_VERSION="$(npm --version)"
|
||||||
## Commented to work around travis-ci breaking 0,6 installs
|
## Commented to work around travis-ci breaking 0,6 installs
|
||||||
# nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 5'
|
# nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 5'
|
||||||
# nvm install 0.6.21 >/dev/null 2>&1 || die 'install v0.6 failed'
|
# nvm install 0.6.21 >/dev/null 2>&1 || die 'install v0.6 failed'
|
||||||
# export NPM_CONFIG_STRICT_SSL=false # npm 1 on travis can't handle SSL to npm
|
|
||||||
# nvm install-latest-npm || die 'nvm install-latest-npm failed: 5'
|
# nvm install-latest-npm || die 'nvm install-latest-npm failed: 5'
|
||||||
# NPM_VERSION="$(npm --version)"
|
# NPM_VERSION="$(npm --version)"
|
||||||
# [ "${NPM_VERSION}" = '1.3.26' ] || die "node 0.6.21 updates to ${NPM_VERSION}; expected v1.3.26"
|
# [ "${NPM_VERSION}" = '1.3.26' ] || die "node 0.6.21 updates to ${NPM_VERSION}; expected v1.3.26"
|
||||||
|
|
|
@ -5,29 +5,29 @@ die () { echo "$@" ; exit 1; }
|
||||||
\. ../../nvm.sh
|
\. ../../nvm.sh
|
||||||
|
|
||||||
# Remove the stuff we're clobbering.
|
# Remove the stuff we're clobbering.
|
||||||
[ -e "${NVM_DIR}/v0.9.7" ] && rm -R "${NVM_DIR}/v0.9.7"
|
[ -e "${NVM_DIR}/versions/node/v9.7.0" ] && rm -R "${NVM_DIR}/versions/node/v9.7.0"
|
||||||
[ -e "${NVM_DIR}/v0.9.12" ] && rm -R "${NVM_DIR}/v0.9.12"
|
[ -e "${NVM_DIR}/versions/node/v9.10.0" ] && rm -R "${NVM_DIR}/versions/node/v9.10.0"
|
||||||
|
|
||||||
# Install from binary
|
# Install from binary
|
||||||
nvm install 0.9.7
|
nvm install 9.7.0
|
||||||
|
|
||||||
# Check
|
# Check
|
||||||
[ -d "${NVM_DIR}/v0.9.7" ] || die "nvm install 0.9.7 didn't install"
|
[ -d "${NVM_DIR}/versions/node/v9.7.0" ] || die "nvm install 9.7.0 didn't install"
|
||||||
|
|
||||||
nvm use 0.9.7
|
nvm use 9.7.0
|
||||||
|
|
||||||
node --version | grep v0.9.7 > /dev/null || die "nvm use 0.9.7 failed"
|
node --version | grep v9.7.0 > /dev/null || die "nvm use 9.7.0 failed"
|
||||||
|
|
||||||
npm install -g object-is@0.0.0 || die "npm install -g object-is failed"
|
npm install -g object-is@0.0.0 || die "npm install -g object-is failed"
|
||||||
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
||||||
|
|
||||||
nvm ls 0.9 | grep v0.9.7 > /dev/null || die "nvm ls 0.9 didn't show v0.9.7"
|
nvm ls 9 | grep v9.7.0 > /dev/null || die "nvm ls 9 didn't show v9.7.0"
|
||||||
|
|
||||||
nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed"
|
nvm install 9.10.0 --reinstall-packages-from=9 || die "nvm install 9.10.0 --reinstall-packages-from=9 failed"
|
||||||
|
|
||||||
[ -d "${NVM_DIR}/v0.9.12" ] || die "nvm install 0.9.12 didn't install"
|
[ -d "${NVM_DIR}/versions/node/v9.10.0" ] || die "nvm install 9.10.0 didn't install"
|
||||||
|
|
||||||
nvm use 0.9
|
nvm use 9
|
||||||
node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12"
|
node --version | grep v9.10.0 > /dev/null || die "nvm ls 9 didn't use v9.10.0"
|
||||||
|
|
||||||
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
nvm deactivate
|
nvm deactivate
|
||||||
nvm uninstall v0.10.7
|
nvm uninstall v0.10.7
|
||||||
nvm uninstall v4.2.2
|
nvm uninstall v4.2.2
|
||||||
|
nvm uninstall v0.9.7
|
||||||
|
nvm uninstall v9.7.0
|
||||||
|
nvm uninstall v0.9.12
|
||||||
|
nvm uninstall v9.10.0
|
||||||
|
|
||||||
if [ -f ".nvmrc" ]; then
|
if [ -f ".nvmrc" ]; then
|
||||||
rm .nvmrc
|
rm .nvmrc
|
||||||
|
|
Loading…
Reference in New Issue