cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Capstone 3.2 and 3.6 tests failing

tanaymathur
New Contributor

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"          ""                                               
1 ACCEPTED SOLUTION

megan_mcp
Community Manager Community Manager
Community Manager

Hi @tanaymathur,

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 🙂

View solution in original post

7 REPLIES 7

megan_mcp
Community Manager Community Manager
Community Manager

Hi @tanaymathur,

Can you send your code for these exercises using the spoiler tag?

Thanks,

Megan

Hi Megan,

Please find the code below.

Best Regards,

Tanay

Spoiler
//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 Megan,

I restarted the workspace again and redefined .z.pg as below which sorted out 3.2 but 3.6 is still getting error 

 

Spoiler
hdbH".z.pg:{ user:.z.u;permission:.perm.users[user;`api];test:.perm.parseQuery[x];$[permission~`all;value x;($[test~permission;value x;:`notAuthorized])]}"

 

 

megan_mcp
Community Manager Community Manager
Community Manager

Hi @tanaymathur,

Can I ask you to send me your code for 3.1?

Thanks,

Megan

sure. Here it is

Spoiler
// 3.1
hdbH:hopen`::5099

megan_mcp
Community Manager Community Manager
Community Manager

Hi @tanaymathur,

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 🙂

Thanks Megan. I was able to run the tests after loading the databse and got the certificate