Provide Fake KV Store for Mocking
Bug #1911919 reported by
jarred wilson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Committed
|
Undecided
|
Danny Cocks |
Bug Description
It seems that we have run into several issues surrounding race conditions and the concurrency of tox when using the kv store provided by charm helpers. Examples of this can be found below:
https:/
https:/
https:/
Can we provide a non-SQLite version of the kv for mocking as part of charm helpers? It should reduce the number of independent implementations across our charms.
tags: | added: onboarding |
tags: | added: good-first-bug |
tags: | removed: onboarding |
Changed in charm-helpers: | |
assignee: | nobody → Danny Cocks (dannycocks) |
To post a comment you must log in.
You can make it use an in-memory database by setting this environment var:
UNIT_STATE_ DB=:memory:
Or by doing the following before kv() is called:
charmhelpers. core.unitdata. _KV = charmhelpers. core.unitdata. Storage( ':memory: ')
Reference: https:/ /charm- helpers. readthedocs. io/en/latest/ api/charmhelper s.core. unitdata. html#charmhelpe rs.core. unitdata. Storage