Skip to content

Commit

Permalink
fix other workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 19, 2025
1 parent 3525837 commit 229610a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/golang-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ jobs:
if: matrix.store == 'mysql'
run: |
docker run -d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=true \
-p 3306:3306 \
--name my-mysql \
mlsmaycon/warmed-mysql:8
Expand All @@ -242,7 +241,7 @@ jobs:
fi
if [ "${{ matrix.store }}" = "mysql" ]; then
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing?parseTime=True"
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing"
fi
CGO_ENABLED=1 GOARCH=${{ matrix.arch }} \
Expand Down Expand Up @@ -356,7 +355,7 @@ jobs:
fi
if [ "${{ matrix.store }}" = "mysql" ]; then
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:netbird@tcp(localhost:3306)/netbird?parseTime=True"
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing"
fi
CGO_ENABLED=1 GOARCH=${{ matrix.arch }} \
Expand Down Expand Up @@ -448,8 +447,6 @@ jobs:
if: matrix.store == 'mysql'
run: |
docker run -d \
-e MYSQL_ROOT_PASSWORD=netbird \
-e MYSQL_DATABASE=netbird \
-p 3306:3306 \
--name my-mysql \
mlsmaycon/warmed-mysql:8
Expand All @@ -475,7 +472,7 @@ jobs:
fi
if [ "${{ matrix.store }}" = "mysql" ]; then
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:netbird@tcp(localhost:3306)/netbird?parseTime=True"
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing"
fi
CGO_ENABLED=1 GOARCH=${{ matrix.arch }} \
Expand Down Expand Up @@ -580,7 +577,7 @@ jobs:
fi
if [ "${{ matrix.store }}" = "mysql" ]; then
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing?parseTime=True"
export NETBIRD_STORE_ENGINE_MYSQL_DSN="root:testing@tcp(localhost:3306)/testing"
fi
CGO_ENABLED=1 GOARCH=${{ matrix.arch }} \
Expand Down
2 changes: 1 addition & 1 deletion management/server/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func getSqlStoreEngine(ctx context.Context, store *SqlStore, kind Engine) (Store
return nil, nil, fmt.Errorf("%s is not set", mysqlDsnEnv)
}

db, err := gorm.Open(mysql.Open(dsn), getGormConfig())
db, err := gorm.Open(mysql.Open(dsn+"?charset=utf8&parseTime=True&loc=Local"), getGormConfig())
if err != nil {
return nil, cleanUp, fmt.Errorf("failed to open mysql connection: %v", err)
}
Expand Down

0 comments on commit 229610a

Please sign in to comment.