]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/dashboard: feature-toggles: add py unit tests
authorErnesto Puerta <epuertat@redhat.com>
Mon, 4 Feb 2019 09:28:29 +0000 (10:28 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Mon, 11 Feb 2019 11:07:49 +0000 (12:07 +0100)
commit8f29ff5159e7fd0a7669ed3bab29f1a036c3277f
tree7f414ca2fd0342e2d493ed438b0ae228915b694f
parent6bc357b8fb601570597457bb9ae5f96269f963d5
mgr/dashboard: feature-toggles: add py unit tests

Add python unit test for feature toggles plugin, and refactor other
files, and add a new type of function cache decorator based on LRU but
with a TTL.

Fixes: http://tracker.ceph.com/issues/37530
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/pybind/mgr/dashboard/plugins/feature_toggles.py
src/pybind/mgr/dashboard/plugins/lru_cache.py [new file with mode: 0644]
src/pybind/mgr/dashboard/plugins/ttl_cache.py [new file with mode: 0644]
src/pybind/mgr/dashboard/tests/test_feature_toggles.py [new file with mode: 0644]