-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.0.5 - Add action to retrieve devices measures history (#257)
Add a device-manager/devices:getMeasures action to retrieve measures history. This action is the same as the one to retrieve assets measures.
- Loading branch information
Showing
7 changed files
with
177 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Feature: Get measures list | ||
|
||
Scenario: Get device measures history | ||
Given I send the following "dummy-temp" payloads: | ||
| deviceEUI | temperature | | ||
| "linked1" | 42 | | ||
| "linked1" | 41 | | ||
| "linked1" | 40 | | ||
And I refresh the collection "engine-ayse":"measures" | ||
When I successfully execute the action "device-manager/devices":"getMeasures" with args: | ||
| engineId | "engine-ayse" | | ||
| _id | "DummyTemp-linked1" | | ||
| size | 2 | | ||
| body.sort | { "values.temperature": "desc" } | | ||
Then I should receive a result matching: | ||
| total | 3 | | ||
| measures.length | 2 | | ||
Then I should receive a "measures" array of objects matching: | ||
| _source.values.temperature | _source.origin._id | | ||
| 42 | "DummyTemp-linked1" | | ||
| 41 | "DummyTemp-linked1" | | ||
When I successfully execute the action "device-manager/devices":"getMeasures" with args: | ||
| engineId | "engine-ayse" | | ||
| _id | "DummyTemp-linked1" | | ||
| body.query | { equals: { "values.temperature": 40 } } | | ||
Then I should receive a "measures" array of objects matching: | ||
| _source.values.temperature | _source.origin._id | | ||
| 40 | "DummyTemp-linked1" | | ||
When I successfully execute the action "device-manager/devices":"getMeasures" with args: | ||
| engineId | "engine-ayse" | | ||
| _id | "DummyTemp-linked1" | | ||
| type | "position" | | ||
Then I should receive a result matching: | ||
| measures | [] | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters