Skip to content

Commit 310b719

Browse files
committed
Create simple snapshot test for oil and gas example
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
1 parent e5e5f19 commit 310b719

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
test -c baseball-card-local.json --snapshot snapshots
5555
5656
- example: oil-gas
57-
path: oil-gas
57+
path: oil-gas-agent-automation
5858
test_commands: |
59-
run -c package-local.json
59+
test -c package-local.json
6060
6161
env:
6262
TZ: 'America/Los_Angeles'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
target
44
h2.db.mv.db
55
cache
6+
.project
67

78

89
# Created by https://www.toptal.com/developers/gitignore/api/python

oil-gas-agent-automation/operations-agent.sqrl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ RecentPressure := SELECT assetId, endOfSecond(timestamp, 10) AS timestamp_normal
2727
FROM Measurement
2828
GROUP BY assetId, timestamp_normalized ORDER BY timestamp_normalized DESC;
2929

30+
/*+ test */
31+
RecentPressureTest := SELECT * FROM RecentPressure ORDER BY timestamp_normalized DESC;
32+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"data":{"RecentPressureTest":[{"assetId":12221.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":3399.59,"temperature_f":189.68},{"assetId":21112.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":1803.95,"temperature_f":189.51},{"assetId":34443.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":3686.41,"temperature_f":190.04},{"assetId":45555.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":2076.75,"temperature_f":189.98},{"assetId":59995.0,"timestamp_normalized":"2025-02-11T12:21:29.999Z","pressure_psi":2999.76,"temperature_f":189.9},{"assetId":12221.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3397.36,"temperature_f":189.41},{"assetId":21112.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":1808.38,"temperature_f":190.25},{"assetId":34443.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3603.5,"temperature_f":190.15},{"assetId":45555.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":2127.65,"temperature_f":189.54},{"assetId":59995.0,"timestamp_normalized":"2025-02-11T12:21:19.999Z","pressure_psi":3000.97,"temperature_f":190.4}]}}

0 commit comments

Comments
 (0)