Skip to content

test(fleet,infra): use neutral fixture username in operations tests - #333

Merged
jmagar merged 1 commit into
chore/scrub-internal-identifiers-20260805from
test/fleet-infra-devuser-fixture
Aug 5, 2026
Merged

test(fleet,infra): use neutral fixture username in operations tests#333
jmagar merged 1 commit into
chore/scrub-internal-identifiers-20260805from
test/fleet-infra-devuser-fixture

Conversation

@jmagar

@jmagar jmagar commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What

Replaces the real username jmagar with the neutral placeholder devuser in the soma-fleet and soma-infra test fixtures — 26 literals across 8 files.

This covers three shapes of the identifier:

  • SSH user arguments — ssh("devhost", "jmagar")ssh("devhost", "devuser")
  • Home-directory paths — /home/jmagar/.ssh/{id_ed25519,config,known_hosts}/home/devuser/...
  • The user column of the ps-output fixtures in process_tests.rs / process_process_tests.rs

Why

Follows the precedent set by #326, which introduced the neutral devhost fixture hostname for the synapse mutation-exec tests.

#325 already neutralized the host names across these same files (dookiedevhost, squirtsedgehost) but deliberately left the username in place. This PR is stacked on that branch and finishes the job, so no jmagar literal remains anywhere under crates/shared/operations/.

Scope

Test fixture literals only — no behavior change. The diff is exactly symmetric (26 insertions, 26 deletions); every changed line is a string literal inside a test.

The ps fixtures parse on whitespace, so the shorter username does not affect column parsing, and the with_user(...) filter that selects those rows is renamed in the same commit.

Verification

cargo test -p soma-fleet -p soma-infra   # 35 + 66 = 101 passed, 0 failed
cargo clippy -p soma-fleet -p soma-infra --all-targets   # clean
cargo fmt --check                          # clean

Note on base branch

Based on chore/scrub-internal-identifiers-20260805 (#325) rather than main, so the diff shows only the username change. Merge after #325; retarget to main if #325 is closed instead.

Replace the real username 'jmagar' with the neutral placeholder
'devuser' in fleet and infra test fixtures, including the
/home/jmagar/.ssh/* paths in the OpenSSH connector and endpoint
tests and the user column of the ps-output fixtures.

Follows the precedent set by #326 (devhost fixture hostname) and
completes the hostname scrub in #325, which neutralized host names
but left the username in place.

Test fixture literals only; no behavior change.
@jmagar
jmagar merged commit 9408cc2 into chore/scrub-internal-identifiers-20260805 Aug 5, 2026
2 checks passed
@jmagar
jmagar deleted the test/fleet-infra-devuser-fixture branch August 5, 2026 20:13
jmagar added a commit that referenced this pull request Aug 6, 2026
* chore: scrub internal network identifiers

Replace internal IP addresses, the internal tailnet domain, and host
aliases in tracked files with neutral documentation placeholders
(192.0.2.0/24, 198.51.100.0/24, example.ts.net, *.example.internal,
role-based host aliases).

* fix: address review findings on identifier scrub

- Run cargo fmt on topology_tests.rs (line exceeded wrap width
  after the devhost rename)
- Rename old_dookie/new_dookie -> old_devhost/new_devhost in
  cache_tests.rs so local variable names don't retain the raw
  internal hostname substring
- Rename squirts_pos -> edgehost_pos in formatters_tests.rs for
  the same reason
- Re-pad the doc-comment example markdown table in
  formatters/host.rs after the squirts->edgehost substitution
  widened a column

* test(fleet,infra): use neutral fixture username in operations tests (#333)

Replace the real username 'jmagar' with the neutral placeholder
'devuser' in fleet and infra test fixtures, including the
/home/jmagar/.ssh/* paths in the OpenSSH connector and endpoint
tests and the user column of the ps-output fixtures.

Follows the precedent set by #326 (devhost fixture hostname) and
completes the hostname scrub in #325, which neutralized host names
but left the username in place.

Test fixture literals only; no behavior change.
jmagar added a commit that referenced this pull request Aug 22, 2026
Completes the identifier scrub started in #325/#333 by replacing the
last real-username fixture literals with the neutral 'devuser'
placeholder:

- soma-auth sqlite session fixture email
- synapse-application process-row observability fixture
- synapse import syslog/auth log samples (already on 'devhost')

Excludes xtask scaffolding defaults (github_owner) and historical
CHANGELOG commit URLs, which are real values rather than fixtures.

Test fixture literals only; no behavior change.
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