-
Notifications
You must be signed in to change notification settings - Fork 38
Use entry path for garbage collection #822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cbd31ec to
d0d22c7
Compare
|
|
||
| // Grow the tree several times to check continued correct operation over lifetime of the log. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like it should be possible to extract the stuff below out to a testonly.RunGCTest(t, ...) and make this be more of a black-box "all storages should behave consistently w.r.t. GC" type test.
We've talked in the past about perhaps coming at these sorts of things via a higher-level conformance suite which could run against the conformance binaries, maybe that's a better story.
Anyway, mostly just making a note here from the IRL conversations for posterity.
AlCutter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of little nits/questions.
storage/storage_test.go
Outdated
| @@ -0,0 +1,68 @@ | |||
| // Copyright 2024 The Tessera authors. All Rights Reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Copyright 2024 The Tessera authors. All Rights Reserved. | |
| // Copyright 2025 The Tessera authors. All Rights Reserved. |
storage/storage_test.go
Outdated
| content, err := os.ReadFile(path) | ||
| if err != nil { | ||
| t.Logf("Could not read %s: %v", path, err) | ||
| return nil // Don't fail the test if a file is unreadable, just skip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not fail the test?
storage/storage_test.go
Outdated
|
|
||
| // Check for the forbidden string | ||
| if strings.Contains(string(content), forbiddenName) { | ||
| t.Errorf("\n[FAIL] Found forbidden call '%s' in file: %s", forbiddenName, path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unusual looking log format string :)
- leading
\n - a
[FAIL]should automatically be generated for the test as a whole sinceErrorfwas called (albeit elsewhere in the log) %s-->%q
test WithGarbageCollectionInterval
Bug discovered while investigating transparency-dev/tesseract#644.
Before this PR, Tessera was using
layout.EntriesPath, but Tessera might have been configured to use a different path for entries.