Chapter 1: Error when running the tests

Hello everyone, someone who can help me with the following error. It says it’s an argument not allowed to establish connection.

But in the class where the strings ‘mongodb://’ and ‘mongodb+srv://’ are set, it is a file that cannot be modified.

Hi @Christian_Camilo_74133,

I believe you have resolved the issue. Let me know if you still face any issues.

Kanika

1 Like

Not necessarily, the solution I offered was to run the application with the command “sprin-boot:run”. This problem happens when I run the test classes of chapter 1. Because it tells me that there is an error when processing the text string “mongodb://”.

Can you share the contents of application.properties file where you have changed the connection uri.

Kanika

So I have the class right now

The file and connection string looks good to me. Are you running the tests from mflix directory? If yes, what version of MongoDB you are using?

Kanika