mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-13 16:59:21 +01:00
Use mysql memory instead of fs
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
parent
79f94dd0bb
commit
7e3ff3044c
@ -11,6 +11,7 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types/container"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
"github.com/testcontainers/testcontainers-go/modules/mysql"
|
||||
@ -37,6 +38,10 @@ func CreateMysqlTestContainer() (func(), error) {
|
||||
mysql.WithDatabase("netbird"),
|
||||
mysql.WithUsername("root"),
|
||||
mysql.WithPassword("netbird"),
|
||||
testcontainers.WithHostConfigModifier(func(hostConfig *container.HostConfig) {
|
||||
hostConfig.AutoRemove = true
|
||||
hostConfig.Tmpfs = map[string]string{"/var/lib/mysql": "rw"}
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user