Skip to content

Update the docker compose file#7524

Merged
jinzhu merged 3 commits intogo-gorm:masterfrom
moseszane168:update-docker-compose-file
Aug 4, 2025
Merged

Update the docker compose file#7524
jinzhu merged 3 commits intogo-gorm:masterfrom
moseszane168:update-docker-compose-file

Conversation

@moseszane168
Copy link
Copy Markdown
Contributor

…ccessfully.

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Update the docker compose file to make /Tests/tests_all.sh can run successfully.

@jinzhu
Copy link
Copy Markdown
Member

jinzhu commented Jul 21, 2025

2025/07/21 18:01:38 /home/jinzhu/Projects/gorm/gorm/tests/tests_test.go:75
[error] failed to initialize database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): server error: FATAL: database "gorm" does not exist (SQLSTATE 3D000)
2025/07/21 18:01:38 failed to connect database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): server error: FATAL: database "gorm" does not exist (SQLSTATE 3D000)

@jinzhu
Copy link
Copy Markdown
Member

jinzhu commented Jul 21, 2025

Need to create database gorm in the compose file?

@moseszane168
Copy link
Copy Markdown
Contributor Author

Need to create database gorm in the compose file?

Yes, it seems that the test failed because GaussDB is missing a database named 'gorm'. We need to add the steps to create the database in the Docker compose file. Let me modify the compose file.

@jinzhu
Copy link
Copy Markdown
Member

jinzhu commented Jul 23, 2025

still got error

2025/07/23 12:10:18 /home/jinzhu/Projects/gorm/gorm/tests/tests_test.go:75
[error] failed to initialize database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): failed to receive message: unexpected EOF
2025/07/23 12:10:18 failed to connect database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): failed to receive message: unexpected EOF

@moseszane168
Copy link
Copy Markdown
Contributor Author

still got error

2025/07/23 12:10:18 /home/jinzhu/Projects/gorm/gorm/tests/tests_test.go:75
[error] failed to initialize database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): failed to receive message: unexpected EOF
2025/07/23 12:10:18 failed to connect database, got error failed to connect to `user=gaussdb database=gorm`: 127.0.0.1:9950 (localhost): failed to receive message: unexpected EOF

I have also discovered this issue and am currently debugging it.

…t resulted in

"unexpected EOF" errors during initialization in tests.
@jinzhu jinzhu merged commit 6cc2c01 into go-gorm:master Aug 4, 2025
25 checks passed
phroggyy pushed a commit to incident-io/gorm that referenced this pull request Jan 23, 2026
* Update the docker compose file to make /Tests/tests_all.sh can run successfully.

* Create database gorm in the compose file.

* Fix connection failure to local GaussDB instance (127.0.0.1:9950) that resulted in
"unexpected EOF" errors during initialization in tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants