Skip to content

add IP data point State() regression tests - #182

Merged
jens-maus merged 1 commit into
masterfrom
fix-ipdp-state-text
Oct 8, 2026
Merged

jens-maus merged 1 commit into
masterfrom
fix-ipdp-state-text

Conversation

@jens-maus

@jens-maus jens-maus commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Regression tests for OpenCCU/OpenCCU#3048, fixed by OpenCCU/ReGaHss#4.

Background

State() on an IP data point (OT_IPDP) without value type guessed the value type from the text:

  • texts containing a < or starting with a type prefix character (e.g. test, nachricht) were rejected (false, nothing sent),
  • other texts were converted before sending (1,5 was sent as 1.500000, 12:00 as 12:00:00, Wert 2025-03-06 as 1970-01-01),
  • a delayed State(text, ms) always failed.

With OpenCCU/ReGaHss#4 the text is sent unchanged.

Tests (test/13-fixed-bugs.js, IP data point State() tests)

  • starts a local TCP server (one connection per sent text) and creates an OT_IPDP pointing to it,
  • State() with x<y, <empty>, test, nachricht, dim 50%, 1,5, 12:00 and Wert 2025-03-06 returns true, and exactly these texts are received,
  • a delayed State("delayed <x>", 300) returns true and the text is received unchanged,
  • deletes the data point again.

The tests are inserted before the UserSharedObjects() tests, so they don't conflict with #181.

Local verification

Run natively with REGA_BIN (x86_64, npx mocha test/13-fixed-bugs.js, npx xo clean):

Note

The CI of this repository tests the ReGaHss binary of OpenCCU-Base. These tests fail until a ReGaHss release including OpenCCU/ReGaHss#4 is in OpenCCU-Base.

State() on an IP data point (OT_IPDP) without value type guessed the
value type from the text, so texts containing a "<" or starting with
a type prefix character (e.g. "test") were rejected and others were
converted before sending (e.g. "1,5" was sent as "1.500000"), see
OpenCCU/OpenCCU#3048. A delayed State(text, ms) always failed.

The tests point an IP data point to a local TCP server and check that
State() returns true and that the texts, also of a delayed State(),
are received unchanged.

Requires a ReGaHss including OpenCCU/ReGaHss#4.
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 44a6f92c-32e2-4a44-b2f3-5cb627d18670
📥 Commits

Reviewing files that changed from the base of the PR and between 9db0fba and 1457fa6.

📒 Files selected for processing (1)
  • test/13-fixed-bugs.js
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jens-maus
jens-maus marked this pull request as ready for review October 8, 2026 16:04
@jens-maus
jens-maus merged commit 7d83337 into master Oct 8, 2026
7 of 14 checks passed
@jens-maus
jens-maus deleted the fix-ipdp-state-text branch October 16, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant