Skip to content

Add tests for sensitive data#108

Open
steiler wants to merge 9 commits into
mainfrom
feat/sensitiveData
Open

Add tests for sensitive data#108
steiler wants to merge 9 commits into
mainfrom
feat/sensitiveData

Conversation

@steiler

@steiler steiler commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

General issue ref: sdcio/.github#14

@steiler steiler requested a review from a team as a code owner July 1, 2026 08:11
steiler and others added 7 commits July 6, 2026 15:18
…ow deviation detection

The intent was sent to the data-server as revertive (default). The data-server's
active sync cycle continuously restores the intended value to the device every
~5 seconds, overwriting any manually injected deviation before the 10-second
deviation-manager poll can observe it. As a result, TC4 never saw devs>0.

Setting revertive: false disables auto-correction so a gnmic-injected deviation
persists long enough to be detected and reported back to Kubernetes.

Pairs-with: sdcio/config-server#464
Co-authored-by: Cursor <[email protected]>
…Ignore Error

Suite Teardown was failing with exit code 1 even when all TCs passed because
the `Run Keyword If Any Tests Failed / Delete Config from node` call was not
wrapped — if the gnmic set --delete fails (e.g. target not yet stable after
TC6 pod restart), the teardown propagated a failure. Wrap it consistently with
the other three cleanup steps.

Co-authored-by: Cursor <[email protected]>
…check

A brief srl3 dsctx drop during suite setup sets TargetForConfig=Failed on
configs even after they initially became Ready. The old 2-minute
eventual_timeout was too tight and the setup had no second-pass check,
so the test cases could start with stale Failed conditions.

- Bump eventual_timeout from 2min to 5min to give the targetconfig
  reconciler (config-server fix: reset TargetForConfig on no-op) enough
  time to clear the stale condition after target recovery.
- Add an extra Config Check Ready loop at the end of Setup that waits
  until all intents are genuinely stable before the update/replace test
  cases begin.

Pairs-with: sdcio/config-server#1660
Co-authored-by: Cursor <[email protected]>
The previous pattern `[ \$ROBOT_RC -ne 0 ] && exit \$ROBOT_RC` leaves
the for-loop body's last exit status as 1 when ROBOT_RC=0 (because [ ]
returns false = exit 1). GitHub Actions bash runs with -e, so the for
loop exits with that 1, triggering set -e and failing the step even
though all Robot tests passed.

Replacing with `if [ "\$ROBOT_RC" -ne 0 ]; then exit "\$ROBOT_RC"; fi`
ensures the loop body exits 0 on success and only propagates a real
non-zero code when Robot itself reported failures.

This caused the 04-sensitive suite (6/6 pass, 1 skip) to incorrectly
fail the CI step on its first run.

Co-authored-by: Cursor <[email protected]>
Replace the single-intent/single-secret fixture with two Config intents
each referencing two secrets, exercising the full 2×2 matrix:

- intent-sensitive-srl-1 (srl1, eth-1/6 + eth-1/7) → sensitive-1a, sensitive-1b
- intent-sensitive-srl-2 (srl1, eth-1/8 + eth-1/9) → sensitive-2a, sensitive-2b

All test cases (TC1–TC6) are updated to cover both intents and all four
secret values: k8s pipeline check, device resolution, blame redaction,
deviation masking, missing-secret recovery, and pod-restart recovery.

Co-authored-by: Cursor <[email protected]>
… k8s

The keyword made three kubectl calls per retry, two targeting the
Deviation CR. The first was an unchecked diagnostic call whose rc was
immediately overwritten, producing a NotFound error in the log on every
retry before the CR appeared. The second used a bare pipe so jq's exit
code (always 0) masked real kubectl failures.

Collapse to a single bash -c "set -o pipefail; kubectl … | jq …" call so
that any kubectl error (NotFound, auth, wrong namespace) propagates as a
non-zero rc and lets Wait Until Keyword Succeeds retry cleanly without
printing spurious error output.

Co-authored-by: Cursor <[email protected]>
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