mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[FIX ON MKI] x-pack/.../telemetry_config.ts
(#197036)
## Summary See details: https://github.com/elastic/kibana/issues/197009
This commit is contained in:
parent
5fb1e127ad
commit
9c5946976d
2 changed files with 13 additions and 3 deletions
|
@ -248,6 +248,7 @@ export class CoreAppsService {
|
|||
if (latestOverrideVersion !== persistedOverrides.version) {
|
||||
this.configService.setDynamicConfigOverrides(persistedOverrides.attributes);
|
||||
latestOverrideVersion = persistedOverrides.version;
|
||||
this.logger.info('Succeeded in applying persisted dynamic config overrides');
|
||||
}
|
||||
} catch (err) {
|
||||
// Potential failures:
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { expect } from 'expect';
|
||||
import expect from '@kbn/expect';
|
||||
import { expect as externalExpect } from 'expect';
|
||||
import { SupertestWithRoleScopeType } from '@kbn/test-suites-xpack/api_integration/deployment_agnostic/services';
|
||||
import { FtrProviderContext } from '../../../ftr_provider_context';
|
||||
|
||||
|
@ -13,6 +14,8 @@ export default function telemetryConfigTest({ getService }: FtrProviderContext)
|
|||
const roleScopedSupertest = getService('roleScopedSupertest');
|
||||
let supertestAdminWithApiKey: SupertestWithRoleScopeType;
|
||||
let supertestAdminWithCookieCredentials: SupertestWithRoleScopeType;
|
||||
const retry = getService('retry');
|
||||
const retryTimeout = 20 * 1000;
|
||||
|
||||
describe('/api/telemetry/v2/config API Telemetry config', function () {
|
||||
before(async () => {
|
||||
|
@ -42,7 +45,7 @@ export default function telemetryConfigTest({ getService }: FtrProviderContext)
|
|||
it('GET should get the default config', async () => {
|
||||
const { body } = await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200);
|
||||
|
||||
expect(body).toMatchObject(baseConfig);
|
||||
externalExpect(body).toMatchObject(baseConfig);
|
||||
});
|
||||
|
||||
it('GET should get updated labels after dynamically updating them', async () => {
|
||||
|
@ -71,7 +74,13 @@ export default function telemetryConfigTest({ getService }: FtrProviderContext)
|
|||
.send({ 'telemetry.labels.journeyName': null })
|
||||
.expect(200, { ok: true });
|
||||
|
||||
await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200, initialConfig);
|
||||
await retry.tryForTime(retryTimeout, async function retryTelemetryConfigGetRequest() {
|
||||
const { body } = await supertestAdminWithApiKey.get('/api/telemetry/v2/config').expect(200);
|
||||
expect(body).to.eql(
|
||||
initialConfig,
|
||||
`Expected the response body to match the intitial config, but got: [${body}]`
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue