-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests against an actual Kibana build #11237
Changes from all commits
7258df4
d9ca7ef
23f920f
1a09380
95359e5
3bc0e8d
a3a8c38
63178af
a862c66
cd4d137
d7b3776
00bed01
a0f0c5d
9648b91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ module.exports = function (grunt) { | |
const root = p => resolve(__dirname, '../../', p); | ||
const binScript = /^win/.test(platform) ? '.\\bin\\kibana.bat' : './bin/kibana'; | ||
const buildScript = /^win/.test(platform) ? '.\\build\\kibana\\bin\\kibana.bat' : './build/kibana/bin/kibana'; | ||
const pkgVersion = grunt.config.get('pkg.version'); | ||
const releaseBinScript = `./build/kibana-${pkgVersion}-linux-x86_64/bin/kibana`; | ||
const uiConfig = require(root('test/server_config')); | ||
|
||
const stdDevArgs = [ | ||
|
@@ -77,6 +79,22 @@ module.exports = function (grunt) { | |
] | ||
}, | ||
|
||
testUIReleaseServer: { | ||
options: { | ||
wait: false, | ||
ready: /Server running/, | ||
quiet: false, | ||
failOnError: false | ||
}, | ||
cmd: releaseBinScript, | ||
args: [ | ||
...stdDevArgs, | ||
'--server.port=' + uiConfig.servers.kibana.port, | ||
'--elasticsearch.url=' + format(uiConfig.servers.elasticsearch), | ||
...kbnServerFlags, | ||
] | ||
}, | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is copypasta from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's your judgement call I'd say :). Something like the below isn't all that unwieldy.
Either way's fine IMHO |
||
testUIDevServer: { | ||
options: { | ||
wait: false, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ module.exports = function (grunt) { | |
'jenkins:env', | ||
'rejectRejFiles', | ||
|
||
'test:ui' | ||
'test:uiRelease' | ||
]); | ||
|
||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,16 @@ module.exports = function (grunt) { | |
'stop:testUIServer' | ||
]); | ||
|
||
grunt.registerTask('test:uiRelease', [ | ||
'checkPlugins', | ||
'esvm:ui', | ||
'run:testUIReleaseServer', | ||
'clean:screenshots', | ||
'functionalTestRunner', | ||
'esvm_shutdown:ui', | ||
'stop:testUIReleaseServer' | ||
]); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also copypasta. Hm. I suppose one could pass in an array that's reused except for certain items, but I don't think it looks so great in this case. Would be super unclear indirection. |
||
grunt.registerTask('test:ui:server', [ | ||
'checkPlugins', | ||
'esvm:ui', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ | |
set -e | ||
source "$(dirname $0)/_jenkins_setup.sh" | ||
|
||
"$(npm bin)/grunt" build --release; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this ok to do? Do we care that we're not running tests against the SNAPSHOT build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know, doesn't look bad to me. Maybe @LeeDr has input? |
||
|
||
xvfb-run "$(npm bin)/grunt" jenkins:selenium; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this dynamic? a combination of os.platform() and os.arch() should get us there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this undone, we will want to revisit and make sure the tests can run on more than just linux-x86_64, but for now this it.