Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix last_start sequence test inconsistencies #521

Merged
merged 7 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bin/test_sequencer
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fi
site_path=sites/udmi_site_model
device_id=AHU-1

rm -rf $site_path/out/devices/$device_id/tests

serial_no=sequencer-$RANDOM
echo Using pubber with serial $serial_no

Expand Down
2 changes: 0 additions & 2 deletions docs/specs/sequences/generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ Check that the device correctly handles a broken (non-json) config message.
1. Wait for log category `system.config.parse` level `ERROR`
1. Check has not logged category `system.config.apply` level `NOTICE` (**incomplete!**)
1. Force reset config
1. Update config before log category `system.config.receive` level `DEBUG`:
* Add `system.last_start` = _device reported_
1. Wait for log category `system.config.receive` level `DEBUG`
1. Wait for no interesting status
1. Wait for last_config updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ private Config sanitizeConfig(Config deviceConfig) {
if (!SemanticValue.isSemanticString(deviceConfig.version)) {
deviceConfig.version = SemanticValue.describe("cloud udmi version", deviceConfig.version);
}
if (deviceConfig.system != null && !(deviceConfig.system.last_start instanceof SemanticDate)) {
if (deviceConfig.system == null) {
deviceConfig.system = new SystemConfig();
}
if (!(deviceConfig.system.last_start instanceof SemanticDate)) {
deviceConfig.system.last_start = SemanticDate.describe("device reported",
deviceConfig.system.last_start);
}
Expand Down