Skip to content

Commit d9016f9

Browse files
committed
Update MongoDB version to 7.0.23-jammy in Docker config, tests, and README
1 parent 5996d19 commit d9016f9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ To use MongoDB, you need to have MongoDB running. You can start MongoDB using Do
130130
docker run -d -p 27017:27017 --name mongodb \
131131
-e MONGO_INITDB_ROOT_USERNAME=admin \
132132
-e MONGO_INITDB_ROOT_PASSWORD=password \
133-
mongo:7.0.21-jammy
133+
mongo:7.0.23-jammy
134134
```
135135

136136
Then, set the environment variables and run the application:

app_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func TestApp_InitializeWithMongoDB(t *testing.T) {
119119
ctx := context.Background()
120120

121121
// Start MongoDB container
122-
mongoContainer, err := mongodb.RunContainer(ctx, testcontainers.WithImage("mongo:7.0.21-jammy"))
122+
mongoContainer, err := mongodb.RunContainer(ctx, testcontainers.WithImage("mongo:7.0.23-jammy"))
123123
if err != nil {
124124
t.Fatalf("Failed to start MongoDB container: %v", err)
125125
}

docker-compose.mongodb.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
# MongoDB service
33
mongodb:
4-
image: mongo:7.0.21-jammy
4+
image: mongo:7.0.23-jammy
55
container_name: notes-mongodb
66
environment:
77
- MONGO_INITDB_ROOT_USERNAME=admin

storage/mongodb_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestMongoDBStorage(t *testing.T) {
2727

2828
// Start MongoDB container
2929
mongodbContainer, err := mongodb.Run(ctx,
30-
"mongo:7.0.21-jammy",
30+
"mongo:7.0.23-jammy",
3131
mongodb.WithUsername("admin"),
3232
mongodb.WithPassword("password"),
3333
)
@@ -189,7 +189,7 @@ func TestMongoDBSpecificFeatures(t *testing.T) {
189189

190190
// Define the MongoDB container request
191191
req := testcontainers.ContainerRequest{
192-
Image: "mongo:7.0.21-jammy",
192+
Image: "mongo:7.0.23-jammy",
193193
ExposedPorts: []string{"27017/tcp"},
194194
WaitingFor: wait.ForLog("Waiting for connections"),
195195
Env: map[string]string{

0 commit comments

Comments
 (0)