mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-15 17:59:52 +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"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/docker/docker/api/types/container"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/testcontainers/testcontainers-go"
|
"github.com/testcontainers/testcontainers-go"
|
||||||
"github.com/testcontainers/testcontainers-go/modules/mysql"
|
"github.com/testcontainers/testcontainers-go/modules/mysql"
|
||||||
@ -37,6 +38,10 @@ func CreateMysqlTestContainer() (func(), error) {
|
|||||||
mysql.WithDatabase("netbird"),
|
mysql.WithDatabase("netbird"),
|
||||||
mysql.WithUsername("root"),
|
mysql.WithUsername("root"),
|
||||||
mysql.WithPassword("netbird"),
|
mysql.WithPassword("netbird"),
|
||||||
|
testcontainers.WithHostConfigModifier(func(hostConfig *container.HostConfig) {
|
||||||
|
hostConfig.AutoRemove = true
|
||||||
|
hostConfig.Tmpfs = map[string]string{"/var/lib/mysql": "rw"}
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user