-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Test suite for storage implementations #58
Comments
This is awesome! It's something a lot of people have requested. There is no test suite that you're asking for currently, but that is a good idea! I will see if I can get around to making one, but anyone else is welcomed to contribute one too. 👍 When you're done with your implementation, let's get it added to the wiki and make sure it can be used in Caddy, too. |
I've implemented a badger-based Storage at https://github.com/oyato/certmagic-storage-badger. I'll add it to the wiki once I've deployed it to production. Since I couldn't find any tests for the storage, I've put ours in another repo at https://github.com/oyato/certmagic-storage-tests. Maybe it's useful as a base for a dedicated certmagic test suite. For now, the semantics are based on what the FileSystem Storage does as opposed to what Storage documents because it seems inconsistent and/or imprecise. e.g. for Also the |
@mholt I've improved the tests to the point where certmagic-storage-badger has 100% test coverage and added a test for FileStorage... but FileStorage is failing for this case for
My understanding is that it should only return |
@DisposaBoy Great, thanks for the update, and the questions!
Good point. I suppose the semantics of
Those are the two that come to mind off the top of my head... so Maybe we could even remove most of that info, I dunno. I figured starting with it was fine and then we could remove it later if we wanted to, before stable 1.0.
Nice!
That might be expected, since you listed
This is a good point, but I suppose is one of the consequences of using a hierarchical storage system. The presence of |
SGTM; I've relaxed that requirement in the tests and removed it from the badger implementation.
Great! nothing more for me to do then.
For now I've left it as-is with the estimated size. If I observe any issues I'll just get the real size - the DB is relatively small so it's probably all cached in memory anyway so it's not like it's slow or anything (FileStorage in /tmp i.e. in memory completes all tests in 1 second while in-memory badger completes in 11 milliseconds)
Makes sense. I've relaxed this requirement in the tests and badger implementation. I'll report if I observe any issues. The previous version's been solid over the last few days. |
Hi,
I would love to write a DynamoDb
certmagic.Storage
implementation (as per #41) - and have done so. What I'm not confident about is whether it correctly implements the interface, e.g. in terms of respective therecursive
parameter forList()
etc.Is there a suite of tests that I can run against my implementation to make sure it is correct?
Thank you for such a wonderful package.
EDIT: The work in progress is here. I haven't implemented locking, etc yet. But might be helpful for discussion purposes https://github.com/glassechidna/awscertmagic/blob/master/dynamodb.go
The text was updated successfully, but these errors were encountered: