Browse Source

[Tests] Set up “mocks” directory, and updater script.

Jordan Harband 9 years ago
parent
commit
96afff7af2
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 0
      test/fast/Unit tests/mocks/iojs.org-dist-index.tab
  2. 0
      test/fast/Unit tests/mocks/nodejs.org-dist-index.tab
  3. 2
      test/fast/Unit tests/nvm_ls_remote
  4. 2
      test/fast/Unit tests/nvm_ls_remote_iojs
  5. 17
      update_test_mocks.sh

0
test/fast/Unit tests/iojs.org-dist-index.tab → test/fast/Unit tests/mocks/iojs.org-dist-index.tab

0
test/fast/Unit tests/nodejs.org-dist-index.tab → test/fast/Unit tests/mocks/nodejs.org-dist-index.tab

2
test/fast/Unit tests/nvm_ls_remote

@ -9,7 +9,7 @@ cleanup() { @@ -9,7 +9,7 @@ cleanup() {
. ../../../nvm.sh
# sample output at the time the test was written
TAB_PATH="$PWD/nodejs.org-dist-index.tab"
TAB_PATH="$PWD/mocks/nodejs.org-dist-index.tab"
nvm_download() {
cat "$TAB_PATH"
}

2
test/fast/Unit tests/nvm_ls_remote_iojs

@ -9,7 +9,7 @@ cleanup() { @@ -9,7 +9,7 @@ cleanup() {
. ../../../nvm.sh
# sample output at the time the test was written
TAB_PATH="$PWD/iojs.org-dist-index.tab"
TAB_PATH="$PWD/mocks/iojs.org-dist-index.tab"
nvm_download() {
cat "$TAB_PATH"
}

17
update_test_mocks.sh

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -e
echo 'Updating test mocks...'
MOCKS_DIR="$PWD/test/fast/Unit tests/mocks"
echo "creating $MOCKS_DIR"
mkdir -p MOCKS_DIR
. "$NVM_DIR/nvm.sh"
nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/index.tab" -o - > "$MOCKS_DIR/nodejs.org-dist-index.tab"
nvm_download -L -s "$NVM_IOJS_ORG_MIRROR/index.tab" -o - > "$MOCKS_DIR/iojs.org-dist-index.tab"
echo "done! Don't forget to git commit them."
Loading…
Cancel
Save