Skip to content

eatonnetwork: add model unit test and simplify the model#3844

Open
thanegill wants to merge 3 commits into
ytti:masterfrom
thanegill:eatonnetwork-spec-data
Open

eatonnetwork: add model unit test and simplify the model#3844
thanegill wants to merge 3 commits into
ytti:masterfrom
thanegill:eatonnetwork-spec-data

Conversation

@thanegill

Copy link
Copy Markdown
Contributor

Pre-Request Checklist

  • Passes rubocop code analysis (try rubocop --auto-correct)
  • Tests added or adapted (try rake test)
  • Changes are reflected in the documentation
  • User-visible changes appended to CHANGELOG.md

Description

  • Adds spec data for the unit test for the EatonNetwork model.
  • Cleanup and simplify the JSON path deletion in the model.

thanegill added 2 commits June 9, 2026 17:52
Add a device-simulation unit test for the EatonNetwork model (Network-M3 card,
firmware 2.2.0) captured from `save_configuration`, plus a secret test covering
cmd :secret redaction. The card's JSON config is sanitized (passphrase, cyphered
blobs, IPs, emails, hostnames and identification scrubbed); the command key uses
the empty passphrase that the test node's nil password produces.
Navigate the JSON config with `dig` instead of long chained `[]` accessors, and
operate on each sub-object inside a `tap`/`each` block instead of intermediate
local variables. Also parse the config via the `keep_lines` refinement, combine
the predefined/created account loops, drop the redundant `cfg = ...; cfg` return
assignments, and fix a comment typo.
@thanegill thanegill changed the title eatonnetwork: add model unit test and simplify the model. eatonnetwork: add model unit test and simplify the model Jun 10, 2026
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