Skip to content

Commit 2b166df

Browse files
authored
Merge pull request #507 from m-lab/fix-enqueue-unit-tests
We changed function names without running the unit tests.
2 parents 8a7f8ee + 7076f93 commit 2b166df

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

.travis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
language: go
1919

2020
before_install:
21+
# Install javascript libraries
22+
- pushd $TRAVIS_BUILD_DIR/functions
23+
- npm install --verbose
24+
- pushd embargo
25+
- npm install --verbose
26+
- popd; popd
27+
2128
# Coverage tools
2229
- go get github.com/mattn/goveralls
2330
- go get github.com/wadey/gocovmerge
@@ -43,7 +50,14 @@ cache:
4350
- "$HOME/google-cloud-sdk/"
4451

4552
script:
46-
# To start, run all the non-integration tests.
53+
# Run all javascript tests.
54+
- pushd $TRAVIS_BUILD_DIR/functions
55+
- npm test
56+
- pushd embargo
57+
- npm test
58+
- popd; popd
59+
60+
# To start the Go tests, run all the non-integration tests.
4761
# Currently skipping storage tests, because they depend on GCS, and there is
4862
# no emulator.
4963
# TODO - separate storage tests into integration and lightweight.

functions/embargo/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
},
99
"dependencies": {
1010
"googleapis": "~19.0.0"
11+
},
12+
"scripts": {
13+
"test": "echo THIS CODE IS UNTESTED"
1114
}
1215
}

functions/enqueue_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const sample_data = { kind: 'storage#object', resourceState: 'exists', id: 'm-la
88
describe("ProcessNotification", function () {
99
it("calls the callback", function () {
1010
var callback = sinon.spy()
11-
enqueue.fileNotification({"data": sample_data}, callback);
11+
enqueue.createStagingTaskOnFileNotification({"data": sample_data}, callback);
1212
assert(callback.called);
1313
});
1414
});

functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"sinon": "~2.1.0"
1616
},
1717
"scripts": {
18-
"test": "nodejs node_modules/.bin/mocha --reporter spec *_test.js"
18+
"test": "node node_modules/.bin/mocha --reporter spec *_test.js"
1919
}
2020
}

0 commit comments

Comments
 (0)