diff --git a/.travis.yml b/.travis.yml index b5052c4fe..2ec3f9f54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,37 @@ +dist: trusty language: node_js +sudo: required node_js: -- node + - "7" services: -- docker -- ntp + - docker + - ntp addons: + chrome: stable apt: + sources: + - google-chrome packages: - - libgif-dev + - libgif-dev + - google-chrome-stable hosts: - auth.test.local - home.test.local + - public.test.local - secret.test.local - secret1.test.local - secret2.test.local - mx1.mail.test.local - mx2.mail.test.local -before_install: npm install -g npm@'>=2.13.5' +before_install: + - npm install -g npm@'>=2.13.5' + +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - sleep 3 + script: - ./scripts/travis.sh diff --git a/Gruntfile.js b/Gruntfile.js index ba2c93e8f..c5b590bb7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,17 +12,13 @@ module.exports = function (grunt) { cmd: "./node_modules/.bin/tslint", args: ['-c', 'tslint.json', '-p', 'tsconfig.json'] }, - "test": { + "unit-tests": { cmd: "./node_modules/.bin/mocha", args: ['--compilers', 'ts:ts-node/register', '--recursive', 'test/unit'] }, - "test-int": { - cmd: "./node_modules/.bin/mocha", - args: ['--compilers', 'ts:ts-node/register', '--recursive', 'test/integration'] - }, - "test-system": { - cmd: "./node_modules/.bin/mocha", - args: ['--compilers', 'ts:ts-node/register', '--recursive', 'test/system'] + "integration-tests": { + cmd: "./node_modules/.bin/cucumber-js", + args: ["--compiler", "ts:ts-node/register", "./test/features"] }, "docker-build": { cmd: "docker", @@ -165,5 +161,8 @@ module.exports = function (grunt) { grunt.registerTask('docker-build', ['run:docker-build']); grunt.registerTask('docker-restart', ['run:docker-restart']); - grunt.registerTask('test', ['run:test']); + grunt.registerTask('unit-tests', ['run:unit-tests']); + grunt.registerTask('integration-tests', ['run:unit-tests']); + + grunt.registerTask('test', ['unit-tests']); }; diff --git a/README.md b/README.md index 669960862..aa8d2d07f 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,7 @@ Make sure you don't have anything listening on port 8080. Add the following lines to your **/etc/hosts** to alias multiple subdomains so that nginx can redirect request to the correct virtual host. + 127.0.0.1 public.test.local 127.0.0.1 secret.test.local 127.0.0.1 secret1.test.local 127.0.0.1 secret2.test.local diff --git a/config.template.yml b/config.template.yml index e21ca9967..638b59202 100644 --- a/config.template.yml +++ b/config.template.yml @@ -48,7 +48,7 @@ ldap: # beginning of the pattern. access_control: default: - - home.test.local + - public.test.local groups: admin: - '*.test.local' diff --git a/example/ldap/base.ldif b/example/ldap/base.ldif index f1fbdb887..06e962c04 100644 --- a/example/ldap/base.ldif +++ b/example/ldap/base.ldif @@ -45,3 +45,10 @@ mail: bob.dylan@example.com sn: Bob Dylan userpassword: {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g= +dn: cn=james,ou=users,dc=example,dc=com +cn: james +objectclass: inetOrgPerson +objectclass: top +mail: james.dean@example.com +sn: James Dean +userpassword: {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g= diff --git a/example/nginx/html/index.html b/example/nginx/html/index.html index 8f76ab5b3..f009d515e 100644 --- a/example/nginx/html/index.html +++ b/example/nginx/html/index.html @@ -9,6 +9,9 @@ You need to log in to access the secret!

Try to access it via one of the following links.