(t *testing.T)
| 27 | ) |
| 28 | |
| 29 | func newTestRedisConfig(t *testing.T) *config.Configuration { |
| 30 | t.Helper() |
| 31 | |
| 32 | mr, err := miniredis.Run() |
| 33 | if err != nil { |
| 34 | t.Fatalf("failed to start miniredis: %v", err) |
| 35 | } |
| 36 | t.Cleanup(mr.Close) |
| 37 | |
| 38 | return &config.Configuration{ |
| 39 | Redis: config.RedisConfig{ |
| 40 | Dns: mr.Addr(), |
| 41 | }, |
| 42 | DataSource: config.DataSourceConfig{ |
| 43 | Dns: "postgres://test:test@localhost/test?sslmode=disable", |
| 44 | }, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | func TestSet(t *testing.T) { |
| 49 | config.ConfigStore.Store(newTestRedisConfig(t)) |
no outgoing calls
no test coverage detected