State: atomic save/load with secure dir + quarantine + advisory lock #51
+1,231
−0
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.
Scope
Why
Testing
--- PASS: TestLoadLatestStateBundle_OK (0.02s)
=== RUN TestLoadLatestStateBundle_RejectsInsecureDir
--- PASS: TestLoadLatestStateBundle_RejectsInsecureDir (0.01s)
=== RUN TestLoadLatestStateBundle_MissingLatest
--- PASS: TestLoadLatestStateBundle_MissingLatest (0.00s)
=== RUN TestLoadLatestStateBundle_CorruptLatest
--- PASS: TestLoadLatestStateBundle_CorruptLatest (0.00s)
=== RUN TestLoadLatestStateBundle_UnknownVersion
--- PASS: TestLoadLatestStateBundle_UnknownVersion (0.02s)
=== RUN TestLoadLatestStateBundle_MissingSnapshot
--- PASS: TestLoadLatestStateBundle_MissingSnapshot (0.00s)
=== RUN TestLoadLatestStateBundle_PermissionDenied
--- PASS: TestLoadLatestStateBundle_PermissionDenied (0.01s)
=== RUN TestLoadLatestStateBundle_SnapshotHashMismatch_QuarantineBoth
--- PASS: TestLoadLatestStateBundle_SnapshotHashMismatch_QuarantineBoth (0.02s)
=== RUN TestLoadLatestStateBundle_CorruptSnapshotJSON_QuarantineBoth
--- PASS: TestLoadLatestStateBundle_CorruptSnapshotJSON_QuarantineBoth (0.01s)
=== RUN TestSaveStateBundle_WritesFilesAtomicallyWithPermsAndPointer
--- PASS: TestSaveStateBundle_WritesFilesAtomicallyWithPermsAndPointer (0.02s)
=== RUN TestSaveStateBundle_AdvisoryLock_AllowsSingleWriter
=== PAUSE TestSaveStateBundle_AdvisoryLock_AllowsSingleWriter
=== RUN TestSaveStateBundle_InvalidBundle
--- PASS: TestSaveStateBundle_InvalidBundle (0.00s)
=== RUN TestSaveStateBundle_SanitizesSecretsAndRejectsInsecureDir
--- PASS: TestSaveStateBundle_SanitizesSecretsAndRejectsInsecureDir (0.01s)
=== CONT TestSaveStateBundle_AdvisoryLock_AllowsSingleWriter
--- PASS: TestSaveStateBundle_AdvisoryLock_AllowsSingleWriter (0.11s)
PASS
ok github.com/hyperifyio/goagent/internal/state 0.265s
Relation
Tracking