Ticket: User Management Fail test

I’m getting the attached error while running the User_Management ticket, the index “email” already exist under users collection with the option UNIQUE
Please help what is the problem!!

This test verifies if your add user code is implemented correctly by trying to add a user that already exists.

It looks like your code is not returning the appropriate result for this case. You have to make sure that your add user code does not allow this situation.

Firstly i would like to thank you for your reply. The problem was that i’m using db.users.update_one with option upsert=true instead of db.users.insert_one
Thank you @steevej

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.