File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,14 @@ func contains(s, substr string) bool {
163163// The image parameter is ignored - TestMain uses DOCKER_IMAGE env var
164164// This function validates that DOCKER_IMAGE is set and fails early if not
165165func getSharedMySQLContainer (t * testing.T , image string ) * MySQLTestContainer {
166- // Validate that DOCKER_IMAGE is set (required by TestMain)
166+ // Check if we're in TiDB mode - if so, this function shouldn't be called
167+ tidbVersion := os .Getenv ("TIDB_VERSION" )
168+ if tidbVersion != "" {
169+ t .Fatalf ("ERROR: getSharedMySQLContainer called but TIDB_VERSION is set. " +
170+ "TiDB tests should use the shared TiDB cluster from TestMain, not getSharedMySQLContainer." )
171+ }
172+
173+ // Validate that DOCKER_IMAGE is set (required by TestMain for MySQL/Percona/MariaDB)
167174 dockerImage := os .Getenv ("DOCKER_IMAGE" )
168175 if dockerImage == "" {
169176 t .Fatalf ("ERROR: DOCKER_IMAGE environment variable is not set. This is required for MySQL/Percona/MariaDB tests.\n " +
You can’t perform that action at this time.
0 commit comments