From ea303935a15f5131646253444ac75089fa175df6 Mon Sep 17 00:00:00 2001 From: spalger Date: Mon, 19 Sep 2016 13:15:04 -0700 Subject: [PATCH] [tests/functional] auto-rebuild assets in test:ui:server task While working on some functional tests I had to re-run the `test:ui:server` task several times to rebuild the front-end assets. I'm not sure why that should be necessary, so this updates the server used in that specific task to auto-rebuild the assets. --- .gitignore | 1 + tasks/config/run.js | 22 ++++++++++++++++++++++ tasks/test.js | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 73948dcb6c9da..51e8da1e311b4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ node_modules trash /optimize/bundles /optimize/testdev +/optimize/testUiServer target /build .jruby diff --git a/tasks/config/run.js b/tasks/config/run.js index 780f2362f2821..cd77b19152cd0 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -77,6 +77,28 @@ module.exports = function (grunt) { ] }, + testUIDevServer: { + options: { + wait: false, + ready: /Server running/, + quiet: false, + failOnError: false + }, + cmd: binScript, + args: [ + ...stdDevArgs, + '--server.port=' + uiConfig.servers.kibana.port, + '--elasticsearch.url=' + format(uiConfig.servers.elasticsearch), + '--dev', + '--no-base-path', + '--no-ssl', + '--optimize.lazyPort=5611', + '--optimize.lazyPrebuild=true', + '--optimize.bundleDir=optimize/testUiServer', + ...kbnServerFlags, + ] + }, + testCoverageServer: { options: { wait: false, diff --git a/tasks/test.js b/tasks/test.js index 8c67078ec2e78..185efffdb00d0 100644 --- a/tasks/test.js +++ b/tasks/test.js @@ -62,7 +62,7 @@ module.exports = function (grunt) { grunt.registerTask('test:ui:server', [ 'esvm:ui', - 'run:testUIServer', + 'run:testUIDevServer', 'run:devChromeDriver:keepalive' ]);