[Telemetry] Added unit tests for addition of bounds and domains to telemetry requests

This commit is contained in:
Henry
2017-03-27 14:53:41 -07:00
parent da40f4c96e
commit 09419398e9
2 changed files with 44 additions and 5 deletions

View File

@@ -140,7 +140,8 @@ define(
typeRequest = (type && type.getDefinition().telemetry) || {},
modelTelemetry = domainObject.getModel().telemetry,
fullRequest = Object.create(typeRequest),
bounds;
bounds,
timeSystem;
// Add properties from the telemetry field of this
// specific domain object.
@@ -167,6 +168,13 @@ define(
fullRequest.end = bounds.end;
}
if (request.domain === undefined) {
timeSystem = this.openmct.conductor.timeSystem();
if (timeSystem !== undefined) {
fullRequest.domain = timeSystem.metadata.key;
}
}
return fullRequest;
};