From cc4222fdbc7d62e836eb44db58449fcdb03c847a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 24 Nov 2015 19:47:03 -0800 Subject: [PATCH] add .dockerignore --- .dockerignore | 2 ++ test/.gitignore => .gitignore | 1 + README.md | 2 ++ test/package.json | 2 ++ test/test.js | 10 +++++++++- 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .dockerignore rename test/.gitignore => .gitignore (93%) diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a56a7ef --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules + diff --git a/test/.gitignore b/.gitignore similarity index 93% rename from test/.gitignore rename to .gitignore index c2658d7..d570088 100644 --- a/test/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ + diff --git a/README.md b/README.md index 3f65cc5..b9f992c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ cloudron install The e2e tests are located in the `test/` folder and require [nodejs](http://nodejs.org/). They are creating a fresh build, install the app on your Cloudron, perform tests, backup, restore and test if the repos are still ok. The tests expect port 29418 to be available. +wget https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar + ``` cd gogs-app/test diff --git a/test/package.json b/test/package.json index 44220b0..d0d5a06 100644 --- a/test/package.json +++ b/test/package.json @@ -14,6 +14,8 @@ "mkdirp": "^0.5.1", "mocha": "^2.3.4", "rimraf": "^2.4.4", + "selenium-server-standalone-jar": "^2.47.1", + "selenium-webdriver": "^2.48.2", "superagent": "^1.4.0" } } diff --git a/test/test.js b/test/test.js index 2432952..97e9bd7 100755 --- a/test/test.js +++ b/test/test.js @@ -9,13 +9,21 @@ var execSync = require('child_process').execSync, mkdirp = require('mkdirp'), path = require('path'), rimraf = require('rimraf'), - superagent = require('superagent'); + superagent = require('superagent'), + webdriver = require('selenium-webdriver'); process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; describe('Application life cycle test', function () { this.timeout(0); + before(function () { + var seleniumJar= require('selenium-server-standalone-jar'); + var SeleniumServer = require('selenium-webdriver/remote').SeleniumServer; + var server = new SeleniumServer(seleniumJar.path, { port: 4444 }); + server.start(); + }); + var LOCATION = 'test' + Date.now(); var app; var username = process.env.USERNAME;