https://learninghub.kx.com/forums/topic/advanced-capstone-3-2-and-3-6-tests-failing
Hi,
I have completed all the exercises for the advanced capstone final project and can individually run and test all the required functions. But while running the tests for section 3, tests for 3.2 and one of the tests for 3.6 are failing. Can you please advise what is causing the tests to fail even though I can run them manually and can see the results?
quizItem success description error
------------------------------------------------------------------------------------------------------------------
exercise3.2 Fail "abort" "abort in before block due to error "password""
exercise3.3 Pass ".perm.users should exist on HDB process" ""
exercise3.4 Pass "define .z.pw on HDB process" ""
exercise3.4 Pass "give access to users with correct password" ""
exercise3.4 Pass "give access to users with wrong password" ""
exercise3.5 Pass "return first element of parse tree" ""
exercise3.5 Pass "return ! if given update query" ""
exercise3.6 Pass "define .z.pg on remote process" ""
exercise3.6 Fail "fiauser can run one function" "sensor"
exercise3.6 Pass "fiauser cant run tables[]" ""
exercise3.6 Pass "team members can run any function" ""
Hi ,
The issue is that you haven’t loaded the f1 database on port 5099, which might explain why when you run the tests for 3.6, which includes testing that fiauser can run the function getSummaryReport, you are getting a the sensor error as sensor does not exist on port 5099.
If you load in the f1 database, the error should be resolved.
Thanks,
Megan
Hi ,
Can you send your code for these exercises using the spoiler tag?
Thanks,
Megan
Hi Megan,
Please find the code below.
Best Regards,
Tanay
//3.2
.perm.users:("S*S";enlist " ") 0: `$"../AdvancedCapstone.Data/users.txt"
.perm.users:1!(update password:{.Q.sha1 x}each password from .perm.users)
hdbH(set;`.perm.parseQuery;.perm.parseQuery)
// 3.6
hdbH".z.pg:{permission:.perm.users[.z.u;`api];test:.perm.parseQuery[x];$[permission~`all;value x;($[test~permission;value x;:`notAuthorized])]}"
Hi ,
Can I ask you to send me your code for 3.1?
Thanks,
Megan
Thanks Megan. I was able to run the tests after loading the databse and got the certificate
Hi Megan,
I restarted the workspace again and redefined .z.pg as below which sorted out 3.2 but 3.6 is still getting error
hdbH".z.pg:{ user:.z.u;permission:.perm.users[user;`api];test:.perm.parseQuery[x];$[permission~`all;value x;($[test~permission;value x;:`notAuthorized])]}"