2

I can't connect to MongoDB when running my tests on Scrutinizer. My testsuite errors out with

MongoConnectionException: Failed to connect to: localhost:27017: Connection refused

Does it need any credentials? Do I need to enable MongoDB somehow? Do I need to tell PHP that I want to use it?

(Obviously, I haven't found anything on SO, the web or in the Scrutinizer documentation.)

Rudolph Gottesheim
  • 1,671
  • 1
  • 17
  • 30

1 Answers1

2

Did you enable it?

You should do it by adding this:

build:
    environment:
        mongodb: true

In your configuration file.

I found it here: https://scrutinizer-ci.com/docs/guides/configure_mongoDB