Skip to content

Commit

Permalink
Return attributes when telemetry created instead of whole saved objec…
Browse files Browse the repository at this point in the history
…t. Update integration test
  • Loading branch information
Aaron Caldwell committed May 11, 2020
1 parent a1a157d commit 4f1e58a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ export async function getMapsTelemetry(
showMapVisualizationTypes: config().get('xpack.maps.showMapVisualizationTypes'),
};
const mapsTelemetry = buildMapsTelemetry({ mapSavedObjects, indexPatternSavedObjects, settings });
return await savedObjectsClient.create(TELEMETRY_TYPE, mapsTelemetry, {
const { attributes } = await savedObjectsClient.create(TELEMETRY_TYPE, mapsTelemetry, {
id: TELEMETRY_TYPE,
overwrite: true,
});
return attributes;
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ export default function({ getService }) {
expect(stats.stack_stats.kibana.plugins.apm.services_per_agent).to.be.an('object');
expect(stats.stack_stats.kibana.plugins.infraops.last_24_hours).to.be.an('object');
expect(stats.stack_stats.kibana.plugins.kql.defaultQueryLanguage).to.be.a('string');
expect(stats.stack_stats.kibana.plugins['maps-telemetry'].attributes.timeCaptured).to.be.a(
'string'
);
expect(stats.stack_stats.kibana.plugins['maps-telemetry'].timeCaptured).to.be.a('string');

expect(stats.stack_stats.kibana.plugins.reporting.enabled).to.be(true);
expect(stats.stack_stats.kibana.plugins.rollups.index_patterns).to.be.an('object');
Expand Down

0 comments on commit 4f1e58a

Please sign in to comment.