2019-03-08 20:49:16 +01:00
|
|
|
package remotecache
|
2019-03-03 05:25:17 +01:00
|
|
|
|
2019-03-03 21:48:00 +01:00
|
|
|
import (
|
2023-04-05 11:55:55 +03:00
|
|
|
"os"
|
2019-03-03 21:48:00 +01:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
|
|
|
)
|
2019-03-03 05:25:17 +01:00
|
|
|
|
2023-04-05 11:55:55 +03:00
|
|
|
func TestIntegrationMemcachedCacheStorage(t *testing.T) {
|
|
|
|
|
if testing.Short() {
|
|
|
|
|
t.Skip("skipping integration test")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u, ok := os.LookupEnv("MEMCACHED_HOSTS")
|
|
|
|
|
if !ok || u == "" {
|
|
|
|
|
t.Skip("No Memcached hosts provided")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
opts := &setting.RemoteCacheOptions{Name: memcachedCacheType, ConnStr: u}
|
2019-03-14 08:57:38 +01:00
|
|
|
client := createTestClient(t, opts, nil)
|
|
|
|
|
runTestsForClient(t, client)
|
2023-02-21 16:21:18 +01:00
|
|
|
runCountTestsForClient(t, opts, nil)
|
2019-03-03 05:25:17 +01:00
|
|
|
}
|