Skip to content

Commit 4e8f407

Browse files
authored
chore(deps): update spanemuboost v0.3.3 → v0.3.4, use TestMain helper (#561)
chore(deps): update spanemuboost v0.3.3 → v0.3.4, use TestMain helper Use new LazyEmulator.TestMain(m) to replace m.Run() → Close() → os.Exit() boilerplate in TestMain. Remove unused flag and slog imports.
1 parent ff09b1c commit 4e8f407

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/apstndb/gsqlutils v0.0.0-20250517013444-d2334c88d6ae
1616
github.com/apstndb/lox v0.0.0-20241212132733-62f24606dc82
1717
github.com/apstndb/memebridge v0.5.0
18-
github.com/apstndb/spanemuboost v0.3.3
18+
github.com/apstndb/spanemuboost v0.3.4
1919
github.com/apstndb/spannerplan v0.1.3
2020
github.com/apstndb/spantype v0.3.8
2121
github.com/apstndb/spanvalue v0.1.8

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,8 +2485,8 @@ github.com/apstndb/lox v0.0.0-20241212132733-62f24606dc82 h1:l54uIOgcH4r0lTg8xKR
24852485
github.com/apstndb/lox v0.0.0-20241212132733-62f24606dc82/go.mod h1:PbqzTjsPq7Xhn8D7Vk8g/em15kd8vvEL1Y2xkI9CgGs=
24862486
github.com/apstndb/memebridge v0.5.0 h1:WaWD0Wp3Yw1BZwyvT4bIf2XsXAA+vq9ZNxUKXXV/vZQ=
24872487
github.com/apstndb/memebridge v0.5.0/go.mod h1:fPrWYKcg5/eaavD6RovT9qeq8K7bDhgLKOcGhqg6zo4=
2488-
github.com/apstndb/spanemuboost v0.3.3 h1:auQLIR7FUdqujOPjQBrW8kiOQBG419w4pHQTrs5vEaI=
2489-
github.com/apstndb/spanemuboost v0.3.3/go.mod h1:uNXjl80HX4S8hK68HCobxRrNEBLhzE+EVxkwOGuwdRM=
2488+
github.com/apstndb/spanemuboost v0.3.4 h1:0sP11pSdCJv+pOods08pmjE7zCwqOoSef14h1NCjpe4=
2489+
github.com/apstndb/spanemuboost v0.3.4/go.mod h1:uNXjl80HX4S8hK68HCobxRrNEBLhzE+EVxkwOGuwdRM=
24902490
github.com/apstndb/spannerplan v0.1.3 h1:nFzTEvRL4yMzQeFdtWp3V0VaUidNA/o3T7HyIYIGk/U=
24912491
github.com/apstndb/spannerplan v0.1.3/go.mod h1:iPN9r9R2AknoFnBFqA232cUO+2ZkHpk4Q1qeSAU9xEM=
24922492
github.com/apstndb/spantype v0.3.8 h1:xy43Cclc2Hz6SL+3tZYuozOqJv6AML4Mv8cASgYo1O0=

internal/mycli/integration_test.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ package mycli
1919
import (
2020
"context"
2121
"errors"
22-
"flag"
2322
"fmt"
2423
"io"
25-
"log/slog"
2624
"os"
2725
"regexp"
2826
"strings"
@@ -136,16 +134,8 @@ func TestMain(m *testing.M) {
136134
_ = os.Unsetenv("SPANNER_PROJECT_ID")
137135
_ = os.Unsetenv("SPANNER_INSTANCE_ID")
138136
_ = os.Unsetenv("SPANNER_DATABASE_ID")
139-
flag.Parse()
140137

141-
code := m.Run()
142-
if err := lazyEmu.Close(); err != nil { // no-op if no test used the emulator
143-
slog.Error("failed to close emulator container in TestMain", "error", err)
144-
if code == 0 {
145-
code = 1
146-
}
147-
}
148-
os.Exit(code)
138+
lazyEmu.TestMain(m)
149139
}
150140

151141
func initializeSession(ctx context.Context, clients *spanemuboost.Clients) (session *Session, err error) {

0 commit comments

Comments
 (0)