Use a separate cache db when running tests.

This commit is contained in:
mikestefanello 2022-02-06 10:07:25 -05:00
parent c43f62a570
commit 156e578dd0
5 changed files with 41 additions and 15 deletions

View file

@ -81,10 +81,12 @@ type (
// CacheConfig stores the cache configuration
CacheConfig struct {
Hostname string `env:"CACHE_HOSTNAME,default=localhost"`
Port uint16 `env:"CACHE_PORT,default=6379"`
Password string `env:"CACHE_PASSWORD"`
Expiration struct {
Hostname string `env:"CACHE_HOSTNAME,default=localhost"`
Port uint16 `env:"CACHE_PORT,default=6379"`
Password string `env:"CACHE_PASSWORD"`
Database int `env:"CACHE_DB,default=0"`
TestDatabase int `env:"CACHE_DB_TEST,default=1"`
Expiration struct {
StaticFile time.Duration `env:"CACHE_EXPIRATION_STATIC_FILE,default=4380h"`
Page time.Duration `env:"CACHE_EXPIRATION_PAGE,default=24h"`
}