Cannot test on docker container on MacOS

I followed chapter 11. but when I try to run docker-compose up --abort-on-container-exit

I’m pretty sure the password is correct?

I get the following:

til-app_1   | Test Case 'AcronymTests.testAcronymsCanBeRetrievedFromAPI' started at 2018-09-13 12:43:20.768
postgres_1  | 2018-09-13 12:43:20.777 UTC [31] FATAL:  password authentication failed for user "vapor"
postgres_1  | 2018-09-13 12:43:20.777 UTC [31] DETAIL:  Password does not match for user "vapor".
postgres_1  | 	Connection matched pg_hba.conf line 95: "host all all all md5"
til-app_1   | Fatal error: 'try!' expression unexpectedly raised an error: ⚠️ PostgreSQL Error: password authentication failed for user "vapor"
til-app_1   | - id: PostgreSQLError.server.fatal.auth_failed
til-app_1   | : file /home/buildnode/jenkins/workspace/oss-swift-4.1-package-linux-ubuntu-16_04/swift/stdlib/public/core/ErrorType.swift, line 184
til-app_1   | Current stack trace:
til-app_1   | 0    libswiftCore.so                    0x00007f66a8dcb680 _swift_stdlib_reportFatalErrorInFile + 221
til-app_1   | 1    libswiftCore.so                    0x00007f66a8b3a38c <unavailable> + 1368972
til-app_1   | 2    libswiftCore.so                    0x00007f66a8d742f2 <unavailable> + 3703538
til-app_1   | 3    libswiftCore.so                    0x00007f66a8b39a86 <unavailable> + 1366662
til-app_1   | 4    libswiftCore.so                    0x00007f66a8d741f7 <unavailable> + 3703287
til-app_1   | 5    libswiftCore.so                    0x00007f66a8b39a86 <unavailable> + 1366662
til-app_1   | 6    libswiftCore.so                    0x00007f66a8ca70b9 <unavailable> + 2863289
til-app_1   | 7    libswiftCore.so                    0x00007f66a8b77840 swift_unexpectedError + 318
til-app_1   | Exited with signal code 4
tilapp_til-app_1 exited with code 1

Take a look at your docker-compose.yml file.

I’m not where I can test this, but I think that the environment section for til-app should include:

DATABASE_USER: vapor
DATABASE_PASSWORD: password

in addition to the hostname and port.

Hope that helps.

Have fun!

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

I was using a different password than the one in the book “password”. And I’m pretty sure I’ve changed it in the code and in docker-compose file. once I changed it back to password it worked.

1 Like