Skip to content

Commit f45a222

Browse files
Remove MySQL 5.7 Docker, add MySQL 8.4
1 parent 0aad8e4 commit f45a222

File tree

3 files changed

+15
-38
lines changed

3 files changed

+15
-38
lines changed

metrics/repl.lag/lag_test.go

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,12 @@ import (
1111
"github.com/cashapp/blip/test"
1212
)
1313

14-
func TestPrepareForSingleLevelAndNoSourceOnMySQL57(t *testing.T) {
15-
// default source on MySQL 5.7 should be `blip`
16-
_, db, err := test.Connection("mysql57")
17-
if err != nil {
18-
if test.Build {
19-
t.Skip("mysql57 not running")
20-
} else {
21-
t.Fatal(err)
22-
}
23-
}
24-
defer db.Close()
25-
26-
c := NewLag(db)
27-
28-
defaultPlan := test.ReadPlan(t, "")
29-
_, err = c.Prepare(context.Background(), defaultPlan)
30-
if err != nil {
31-
t.Error(err)
32-
}
33-
34-
assert.Equal(t, "blip", c.lagWriterIn["kpi"])
35-
}
36-
3714
func TestPrepareForSingleLevelAndNoSourceOnMySQL80(t *testing.T) {
3815
// default source on MySQL 8.0 should be `pfs`
3916
_, db, err := test.Connection("mysql80")
4017
if err != nil {
4118
if test.Build {
42-
t.Skip("mysql57 not running")
19+
t.Skip("mysql80 not running")
4320
} else {
4421
t.Fatal(err)
4522
}
@@ -61,7 +38,7 @@ func TestPrepareWithInvalidSource(t *testing.T) {
6138
_, db, err := test.Connection("mysql80")
6239
if err != nil {
6340
if test.Build {
64-
t.Skip("mysql57 not running")
41+
t.Skip("mysql80 not running")
6542
} else {
6643
t.Fatal(err)
6744
}
@@ -81,7 +58,7 @@ func TestCollectWithNoSource(t *testing.T) {
8158
_, db, err := test.Connection("mysql80")
8259
if err != nil {
8360
if test.Build {
84-
t.Skip("mysql57 not running")
61+
t.Skip("mysql80 not running")
8562
} else {
8663
t.Fatal(err)
8764
}
@@ -107,7 +84,7 @@ func TestCollectWithAllSources(t *testing.T) {
10784
_, db, err := test.Connection("mysql80")
10885
if err != nil {
10986
if test.Build {
110-
t.Skip("mysql57 not running")
87+
t.Skip("mysql80 not running")
11188
} else {
11289
t.Fatal(err)
11390
}

test/docker/docker-compose.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
version: '3.1'
22
name: blip
33
services:
4-
mysql57:
5-
# "MySQL 5.7.44 is the final release of the MySQL 5.7 series."
6-
# https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-44.html
7-
image: mysql:5.7.44
8-
platform: linux/amd64
4+
mysql80:
5+
image: mysql:8.0.34
96
command: --default-authentication-plugin=mysql_native_password
107
restart: always
118
environment:
129
- "MYSQL_ROOT_PASSWORD=test"
1310
ports:
14-
- "33570:3306"
15-
mysql80:
16-
image: mysql:8.0.34
17-
platform: linux/amd64
18-
command: --default-authentication-plugin=mysql_native_password
11+
- "33800:3306"
12+
mysql84:
13+
image: mysql:8.4
14+
command:
1915
restart: always
2016
environment:
2117
- "MYSQL_ROOT_PASSWORD=test"
2218
ports:
23-
- "33800:3306"
19+
- "33840:3306"
20+
volumes:
21+
- ./init:/docker-entrypoint-initdb.d

test/docker/init/mysql84-init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
/usr/sbin/mysqld --initialize

0 commit comments

Comments
 (0)