mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:31:48 +00:00
The `DeleteAllKeysWithPrefix` method is now only used in tests to ensure the test keyspace is clear. This PR makes it clear this method is only used in tests, and simplifies the implementation so it no longer needs a script + direct Redis connection. Another tiny Redis refactor to prepare for multi-tenancy work.
37 lines
847 B
Python
37 lines
847 B
Python
load("//dev:go_defs.bzl", "go_test")
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
go_library(
|
|
name = "rcache",
|
|
srcs = [
|
|
"fifo_list.go",
|
|
"rcache.go",
|
|
],
|
|
importpath = "github.com/sourcegraph/sourcegraph/internal/rcache",
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//internal/redispool",
|
|
"//lib/errors",
|
|
"@com_github_gomodule_redigo//redis",
|
|
"@com_github_inconshreveable_log15//:log15",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "rcache_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"fifo_list_test.go",
|
|
"rcache_test.go",
|
|
],
|
|
embed = [":rcache"],
|
|
tags = [
|
|
# Test requires localhost database
|
|
"requires-network",
|
|
],
|
|
deps = [
|
|
"@com_github_stretchr_testify//assert",
|
|
"@com_github_stretchr_testify//require",
|
|
],
|
|
)
|