test(e2e): clear identities and pins between suites - #174
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wipe the hub, agent and client state directories when the bench sets up, so each suite starts from a clean identity world.
Why
Running the whole suite fails 3 of 56, always with the same hub message:
Bench._reset()tears down namespaces, veths, the bridge and/etc/hosts, but never toucheswork_dir. The hub's TOFU pin database therefore outlives a suite. A later suite that reuses an agent name (truck42,edge) with a key from a different server'sagent-stateis then correctly rejected — the hub is doing exactly what it should, and the bench is lying to it.The three failures are
reconnect.robot(both WAN uplink cases) andsocketcand_write_burst.robot. All three pass in isolation, which is what pointed at ordering rather than a product bug.How
_clear_state()removeshub-state,agent-state,client-stateandweb.dbper server at setup.logs/is deliberately kept — it is the diagnostics for the run, and wiping the wholework_dirwould delete the previous suite's logs.Testing
Notes
Not a product defect and not a release blocker: the e2e suite is not wired into CI yet (TST-1). It does matter if e2e is ever going to be a release gate, which is why it is worth fixing now rather than filing.
Related smell left alone: every agent on a server shares one
agent-state, so two agents on the same host would share an identity. No current suite does that.