MCPcopy Create free account
hub / github.com/apache/casbin-server / TestGetLocalConfig

Function TestGetLocalConfig

server/adapter_test.go:13–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestGetLocalConfig(t *testing.T) {
14 assert.Equal(t, configFileDefaultPath, getLocalConfigPath(), "read from default connection config path if environment variable is not set")
15
16 os.Setenv(configFilePathEnvironmentVariable, "dir/custom_path.json")
17 assert.Equal(t, "dir/custom_path.json", getLocalConfigPath())
18}
19
20func runFakeRedis(username string, password string) (host string, port string, err error) {
21 s, err := miniredis.Run()

Callers

nothing calls this directly

Calls 1

getLocalConfigPathFunction · 0.85

Tested by

no test coverage detected