INNER CODE UNIT · Go
getReplicaSetURL
apache/casbin-mongodb-adapter · adapter_test.go:42
func getReplicaSetURL() string {
if testReplicaSetURL == "" {
testReplicaSetURL = "127.0.0.1:42069"
}
return testReplicaSetURL
}
func testGetPolicy(t *testing.T, e *casbin.Enforcer, res [][]string) {
t.Helper()
myRes, err := e.GetPolicy()
if err != nil {
t.Fatalf("GetPolicy() failed: %v", err)
}
t.Log("Policy: ", myRes)
if !util.Array2DEquals(res, myRes) {
t.Error("Policy: ", myRes, ", supposed to be ", res)
}