mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
ensure timezone attribute in tests is adhered to (#13121)
* ensure timezone attribute is adhered to Two issues - one the archiver was loading the visualize mapping after the config setting so it was bring overwritten, and two, uiSettings.replace wasn’t working correctly to begin with. * extra line to ensure server is stabilized to prevent transitory failures
This commit is contained in:
parent
b3ffd99542
commit
fa302a16f3
2 changed files with 7 additions and 15 deletions
|
@ -66,7 +66,7 @@ export class KibanaServerUiSettings {
|
|||
|
||||
async replace(doc) {
|
||||
this._log.debug('replacing kibana config doc: %j', doc);
|
||||
await this._savedObjectsClient.create('config', { doc }, {
|
||||
await this._savedObjectsClient.create('config', doc, {
|
||||
id: await this._id(),
|
||||
overwrite: true,
|
||||
});
|
||||
|
|
|
@ -5,21 +5,13 @@ export default function ({ getService, loadTestFile }) {
|
|||
const kibanaServer = getService('kibanaServer');
|
||||
|
||||
describe('visualize app', function () {
|
||||
before(function () {
|
||||
remote.setWindowSize(1280,800);
|
||||
|
||||
before(async function () {
|
||||
log.debug('Starting visualize before method');
|
||||
const logstash = esArchiver.loadIfNeeded('logstash_functional');
|
||||
// delete .kibana index and update configDoc
|
||||
return kibanaServer.uiSettings.replace({ 'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*' })
|
||||
.then(function loadkibanaIndexPattern() {
|
||||
log.debug('load kibana index with default index pattern');
|
||||
return esArchiver.load('visualize');
|
||||
})
|
||||
// wait for the logstash data load to finish if it hasn't already
|
||||
.then(function () {
|
||||
return logstash;
|
||||
});
|
||||
remote.setWindowSize(1280, 800);
|
||||
await esArchiver.loadIfNeeded('logstash_functional');
|
||||
await esArchiver.load('visualize');
|
||||
await kibanaServer.waitForStabilization();
|
||||
await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'UTC', 'defaultIndex': 'logstash-*' });
|
||||
});
|
||||
|
||||
loadTestFile(require.resolve('./_chart_types'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue