Ticket: Connection testcases are failing

Hi All,
My all test cases are failing in db-connection.test.js. In first test case i am getting empty array… and so on. My db is properly loaded and i’ve used
mongodb+srv://admin:admin@cluster0-0j12o.mongodb.net/test as MFLIX_DB_URI.

Here username and password are not original !


Hey @Ashish_29479

This post may help

Hi @natac13,
I removed /test but still its not working.

What does your .env file look like?

Ticket: Connection

Rename this file to .env after filling in your MFLIX_DB_URI and your SECRET_KEY

Do not surround the URI with quotes


In mongoshell i can see all data is loaded correctly.

So the username and password need to be

username: m220student
password: m220password

Please try the following


Thanks @natac13,
Its working with this specific url.
But to use my cluster, I updated my username and password then still it was not working.
my cluster URI cluster0-0j12o.mongodb.net.

Have you followed the steps to Whitelist your IP?

I tried to connect to your cluster with

mongo "mongodb+srv://admin:admin@cluster0-0j12o.mongodb.net"

And that was the error I got.
From the README.rst

Update your IP Whitelist so that your app can talk to the cluster. Click the
Security tab from the Clusters page. Then click IP Whitelist
followed by Add IP Address. Finally, click Allow Access from Anywhere
and click Confirm.