@@ -239,7 +239,29 @@ func TestGRPCAsk(t *testing.T) {
239
239
expectedAnswer : & types.Answer {
240
240
HasMore : false ,
241
241
Variables : []string {"X" },
242
- Results : []types.Result {{Error : "error(permission_error(execute,forbidden_predicate,block_height/1),block_height/1)" }},
242
+ Results : []types.Result {{Error : "error(permission_error(execute,forbidden_predicate,block_height/1),root)" }},
243
+ },
244
+ },
245
+ {
246
+ program : "contains_forbidden_predicate(X) :- block_height(X)." ,
247
+ query : "contains_forbidden_predicate(X)." ,
248
+ predicateBlacklist : []string {"block_height/1" },
249
+ expectedAnswer : & types.Answer {
250
+ HasMore : false ,
251
+ Variables : []string {"X" },
252
+ Results : []types.Result {{Error : "error(permission_error(execute,forbidden_predicate,block_height/1),contains_forbidden_predicate/1)" }},
253
+ },
254
+ },
255
+ {
256
+ program : "cannot_be_blacklisted(X) :- X = 42." ,
257
+ query : "cannot_be_blacklisted(X)." ,
258
+ predicateBlacklist : []string {"cant_be_blacklisted/1" },
259
+ expectedAnswer : & types.Answer {
260
+ HasMore : false ,
261
+ Variables : []string {"X" },
262
+ Results : []types.Result {{Substitutions : []types.Substitution {{
263
+ Variable : "X" , Expression : "42" ,
264
+ }}}},
243
265
},
244
266
},
245
267
{
0 commit comments