Rewrite the store interface (#1335)
* WIP store rewrite * Fix memory store tests * Store hard expiry times rather than duration! * Clarify memory test * Add limit to store interface * Implement suffix option * Don't return nils from noop store * Fix syncmap * Start fixing store service * wip service and cache * Use _ for special characters in cockroachdb namespace * Improve cockroach namespace comment * Use service name as default store namespace * Fixes * Implement Store Scope * Start fixing etcd * implement read and write with expiry and prefix * Fix etcd tests * Fix cockroach store * Fix cloudflare interface * Fix certmagic / cloudflare store * comment lint * cache isn't implemented yet * Only prepare DB staements once Co-authored-by: Ben Toogood <ben@micro.mu> Co-authored-by: ben-toogood <bentoogood@gmail.com>
This commit is contained in:
@@ -32,11 +32,11 @@ func TestSQL(t *testing.T) {
|
||||
store.Nodes(connection),
|
||||
)
|
||||
|
||||
records, err := sqlStore.List()
|
||||
keys, err := sqlStore.List()
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
} else {
|
||||
t.Logf("%# v\n", pretty.Formatter(records))
|
||||
t.Logf("%# v\n", pretty.Formatter(keys))
|
||||
}
|
||||
|
||||
err = sqlStore.Write(
|
||||
@@ -80,7 +80,7 @@ func TestSQL(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
records, err = sqlStore.Read("test")
|
||||
records, err := sqlStore.Read("test")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user