* Add tests for cache backends
* Tests run against everything!
* Get consul passing cache tests
* now mysql tests also pass
* comments
* add mysql cache tests
* Ensure consul cache is flushing timestamp keys
* Ensure etcd cache is flushing timestamp keys
* Update redis cache api to conform to localfs
There was a bug in some of the lookups where it was looking at sub banks
instead of the banks containing the leaf/key nodes. That was fixed. Also
restored the original behaviors, only adding the updated functionality,
namely adding timestamp key/values to redis.
* Fix etcd path inconsistency
Previously on X-Files. Wait nope. Previously on etcd cache files...
😂 if a path were 1/2/3 then etcd would break with IndexError, but
when it was 1/2/3/4/5 then instead of returning the "file" (key?) 5 it
would return `4/5` as the name. Which is probably not correct, and
definitely inconsistent with localfs (and every other cache module).
Now it will always only return the final segment of the cache (e.g. 7
for 1/2/3/4/5/6/7 and 5 for 1/2/5)
* Remove comments and cleanup test setup
Comments were outdated, now they're gone or fixed. Also shifted around
some of the test setup to make it a bit cleaner.
* Add localfs backed memcache to the tests
Fixed an inconsistency when flushing banks with None key. Also added
to the test run. We may want to add other backing caches via alternate
fixtures?
* Bad serial
* No this is wrong
* Probably the right lazy loader fix
* Restore tested mysql cache functionality
Added a force_reconnect function because I couldn't figure out how to
remove the client from the context any other way. There may be a better
way to do that, but there will probably be some loader changes anyway.
* remove silly files
Saltfile never should have been added in the first place and the
integration test wasn't really necessary, functional was better/lighter.
* Fix redis_cache cluster mode import
Fixes#60272 - the import statement was totally incorrect. Now it will
actually attempt to connect to a redis cluster.
* payload should string-ify all the data
* Fix unit tests for parametrization
From what I can tell, previously the query was being built in Python
instead of using mysql to add the parameters, and this probably horked
up the handling of binary strings.
Unless some other version of the DB will be problematic...
* Fix missing docstring complaints
* incorporate PR feedback
* Skip docker if not found and add the rest of mysql
I really really hate the way this is configured but I can't make pytest
use fixtures as parameters in fixtures. I may have to struggle to come
up with another way.
* Tests all passing, woo!
* run black
* Disable pylint here
* Skip when mysql fails during CI
This has been tested locally and it runs all of them. I'm sure with the
CI environment it's possible that it fails for no particularly good
reason. And it's definitely not worth blocking a PR for (though arguably
it could be if *all* of the images fail, but...)