Henry Oswald 8 лет назад
Родитель
Сommit
58ab4c72dc

+ 6 - 0
services/filestore/.dockerignore

@@ -1,3 +1,9 @@
 node_modules/*
+gitrev
+.git
+.gitignore
+.npm
+.nvmrc
+nodemon.json
 app.js
 **/js/*

+ 3 - 3
services/filestore/Jenkinsfile

@@ -22,9 +22,9 @@ pipeline {
     }
 
     stage('Acceptance Tests') {
-      steps { 
-        sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_acceptance' 
-      } 
+      steps {
+        sh 'DOCKER_COMPOSE_FLAGS="-f docker-compose.ci.yml" make test_acceptance'
+      }
     }
 
     stage('Package and publish build') {

+ 5 - 5
services/filestore/Makefile

@@ -20,13 +20,13 @@ clean:
 	rm -rf test/unit/js
 	rm -rf test/acceptance/js
 
-test:  test_unit test_acceptance
+test: test_unit test_acceptance
 
-test_unit:
-	@[ ! -d test/unit ] && echo "filestore has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit
+test_unit: 
+	@[ ! -d test/unit ] && echo "filestore has no unit tests" || $(DOCKER_COMPOSE) run --rm test_unit npm run test:unit -- ${MOCHA_ARGS}
 
-test_acceptance: test_clean test_acceptance_pre_run # clear the database before each acceptance test run
-	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance
+test_acceptance:  test_clean test_acceptance_pre_run # clear the database before each acceptance test run
+	@[ ! -d test/acceptance ] && echo "filestore has no acceptance tests" || $(DOCKER_COMPOSE) run --rm test_acceptance npm run test:acceptance -- ${MOCHA_ARGS}
 
 test_clean:
 	$(DOCKER_COMPOSE) down -v -t 0

+ 3 - 3
services/filestore/package.json

@@ -17,14 +17,14 @@
     "compile:all": "npm run compile:app && npm run compile:unit_tests && npm run compile:acceptance_tests",
     "start": "npm run compile:app && node $NODE_APP_OPTIONS app.js",
     "nodemon": "nodemon --config nodemon.json",
-    "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", 
-    "test:unit:_run": "mocha --recursive --exit --reporter spec $@ test/unit/js"
+    "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js",
+    "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js"
   },
   "dependencies": {
     "async": "~0.2.10",
     "aws-sdk": "^2.1.39",
     "coffee-script": "~1.7.1",
-    "express": "^4.2.0", 
+    "express": "^4.2.0",
     "fs-extra": "^1.0.0",
     "heapdump": "^0.3.2",
     "knox": "~0.9.1",